Section 13: LPT library function reference
Model 4200A-SCS Parameter Analyzer Reference Manual
13-56
4200A-901-01 Rev. C / February 2017
kfppwr
This command raises a real number to a specified power and assigns the result to a specified variable.
Usage
int kfppwr(double *
x
, double *
y
, double *
z
);
x
A variable that contains a floating point number
y
A variable that contains the exponent
z
A variable where the result of
x
y
is stored
Details
The value referenced by
x
is raised to the power of the value referenced by
y
, and the result is stored
in the location pointed to by
z
. If an overflow occurs, the result is
±Inf
. If an underflow occurs, the
result is zero (0).
If
x
points to a negative number, a power of a negative number error is generated, and the result
returned is
-Inf
.
If
x
points to a value of zero (0) and
y
points to a negative number, a divide by zero (0) error is
generated, and the result returned is
+Inf
.
If
x
points to a value of 1.0, the result is 1.0, regardless of the exponent.
Example
double res2, pwres2, power=3.0;
.
.
measv(SMU1, &res2);/* Measure SMU1; store */
/* result in res2. */
kfppwr(&res2, &power,
&pwres2);/* res2 to the third power; */
/* return result to pwres2. */
.
Raises the variable
res2
by the power of three. The result is stored in
pwres2
.
Also see
None