13: LPT library function reference Model 4200A-SCS Parameter Analyzer
13-58 4200A-901-01 Rev. C / February 2017
kfpsub
This command subtracts two real numbers and stores their difference in a specified variable.
Usage
int kfpsub(double *x, double *y, double *z);
A variable containing the minuend
A variable containing the subtrahend
The variable where the result of x
y is stored
Details
The value referenced by y is subtracted from the value referenced by x. 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).
Example
double res1, res2, diff2;
.
.
measv(SMU1, &res1);/* Measure SMU1; store result */
/* in res1. */
measv(SMU2, &res2);/* Measure SMU2; store result */
/* in res2. */
kfpsub(&res1, &res2, &diff2);/* Subtract res2 from res1; */
./* return the place with */
This example subtracts res2 from res1. The result is returned to diff2.
Also see
None