Arithmetic Functions - VTech Power Pad Precomputer Power Pad Plus User Manual

Vtech precomputer power pad plus user's manual
Table of Contents

Advertisement

ARITHMETIC FUNCTIONS

ABS (X)
This gives the absolute (positive) value of the argument.
Example:
PRINT ABS (7-2*4)
1
SGN (X)
This function will give the value of +1 if X is positive, 0 if X is zero, and -1 if X is negative.
So SGN(4.3)=1; SGN(0)=0; SGN(-276)=-1
Example:
A=6
PRINT SGN (A); SGN (A-A)
1 0
INT (X)
This converts numbers which are not whole into the largest whole number below the
argument.
So INT (5.9)=5; also INT (-5.9)=-6.
absolute value of the result returned by INT will be greater than that of the number.
Example:
PRINT INT (-6.7)
-7
RND (X)
This will produce a random number between 1 and X if X is a positive number.
So ABS (-7)=7.
press ENTER
press ENTER
press ENTER
Note that with negative arguments, the
press ENTER
52

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents