|
|||||
function | FP_pow |
Related Syntax | Other Library Functions |
Library: Floating Point
Include: omfloat.xin |
Returns: Opaque
The floating point number raised to the power "y". NaN is returned when:
|
define external float function FP_pow (value float x, value y)
An exponential function that raises the floating point number "x" to the power "y".
The following code shows how to use FP_pow
to calculate the future value of a single amount, expressed by the equation:
. . . set One to FP_v "1" set Principle to FP_v "1000" set InterestRate to FP_v ".1" set Time to FP_v "3" set FutureValue to FP_mul (Principle, FP_pow (FP_add (One, InterestRate), Time ) ) output "future amount is " || FP_d (FutureValue,2) || "%n"
If the principle is $1000, the interest rate 10 percent, and the time 3 years, the result would be a future amount of $1331.00.
Related Syntax FP_sqrt FP_exp FP_log FP_log10 |
Other Library Functions FP_abs FP_acos FP_add FP_asin FP_atan FP_atan2 FP_ceil FP_cos FP_cosh FP_d FP_div FP_eq FP_exp FP_floor FP_ge FP_gt FP_hypot FP_isnan FP_isneg FP_ispos FP_iszero FP_j0 FP_j1 FP_jn FP_le FP_log FP_log10 FP_lt FP_mod FP_mul FP_ne FP_nearest FP_neg FP_pow FP_s FP_sin FP_sinh FP_sqrt FP_sub FP_tan FP_tanh FP_trunc FP_v FP_y0 FP_y1 FP_yn |
---- |