Ansicht
Dokumentation

ABENPOWER_FUNCTION - POWER FUNCTION

ABENPOWER_FUNCTION - POWER FUNCTION

rdisp/max_wprun_time - Maximum work process run time   Vendor Master (General Section)  
This documentation is copyright by SAP AG.
SAP E-Book

- ipow

... ipow( base = arg exp = n ) ...

Effect

This built-in function raises the argument arg passed to base to the exponent n passed to exp. The arguments arg and n are numeric expression positions. Any numeric data object can be specified for arg. n expects the type i and exponents of other types are converted to i. If the argument arg has the value 0, the value of the exponent n must be greater than or equal to 0.

The function ipow is overloaded in such a way that the return value can have different numeric types.

  • Outside of an arithmetic expression, the data type of the argument arg determines the data type of the return value.
  • Within an arithmetic expression, the argument arg contributes to the calculation type of the entire expression and the function is calculated using the calculation type.

This function can be specified in general and numeric expression positions. The calculation type is determined from the argument arg in the same way as with the other numeric functions. The argument n does not have any effect on the data type of the return value.

Notes

  • The power function ipow can replace arg ** n calculations, if the calculation type f is to be avoided. This makes sense if the type f is not precise enough.
  • In many cases, the power function ipow has better performance than using the arithmetic operator **.

Example

The results are 1.4399999999999999 for ** and 1.4400 for ipow. The result of ipow is more precise.

Power Function ipow






PERFORM Short Reference   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.

Length: 3736 Date: 20240425 Time: 184313     sap01-206 ( 42 ms )