-SCS Parameter Analyzer Reference Manual Section 13:
LPT library function reference
4200A-901-01 Rev. C / February 2017 13-51
LPT commands for math operations
The following commands provide math operations.
kfpabs
This command takes a user-specified positive or negative value and converts it into a positive value that is
returned to a specified variable.
Usage
int kfpabs(double *x, double *z);
Pointer to the variable to be converted to an absolute value
Pointer to the variable where the result is stored
Example
.
.
forcev(SMU1, vb1);/* Output vb1 from SMU1. */
measi(SMU1, &ares2);/* Measure SMU1 current; */
/* store in ares2. */
kfpabs(&ares2, &ares2);/* Convert ares2 to absolute */
/* value; return result to ares2*/
This example takes the absolute value of a current reading. forcev outputs vb1 volts from SMU1. This
current is measured with measi, and the result is stored in location ares2. The absolute value of ares2
then calculated and stored as
.
Also see
None
kfpadd
This command adds two real numbers and stores the result in a specified variable.
Usage
int kfpadd(double *x, double *y, double *z);
The first of two values to add
The second of two values to add
A variable in which the sum x + y is stored
Details
The values referenced by x and y are summed 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).