FRACTION inputVector resultVariable

Takes the fractional part of each element in the input vector and copies it to the resultVariable. The sign of the result will match the sign of the original number.

See also: INTEGER

The following program shows the result of the FRACTION command in comparison with the INTEGER command:

NORMAL 10 0 5 vec
INTEGER vec integerVec
FRACTION vec  fractionVec
PRINT table vec integerVec fractionVec

The program's results from one run are as follows:

vec           	integerVec    	fractionVec   	
1.465557      	1             	0.465557      	
-3.083732     	-3            	-8.37324E-02  	
1.847697      	1             	0.847697      	
8.180676      	8             	0.180676      	
-4.539408     	-4            	-0.539408     	
8.583989      	8             	0.583989      	
1.597457      	1             	0.597457      	
6.062903      	6             	6.29028E-02   	
4.173326      	4             	0.173326      	
-0.301672     	-0.0E00       	-0.301672