Nyquist / XLISP 2.0  - 
Contents |
Tutorials |
Examples |
Reference
float
  | Type: | - | function (subr) | 
  | Source: | - | xlmath.c | 
Syntax
- (float expr)
- expr - integer or floating point number/expression
 returns - the result as a floating point number
Description
The 'float' function takes a numeric expression and returns the result
as a floating point number.
Examples
(/ 1 2)            ; returns 0 (integer division)
(/ (float 1) 2)    ; returns 0.5
(float (/ 1 2))    ; returns 0 (integer division)
(/ 1 2 3)          ; returns 0 (integer division)
(/ (float 1) 2 3)  ; returns 0.166667
See the
float
function in the XLISP 2.0 manual.
  Back to Top
Nyquist / XLISP 2.0  - 
Contents |
Tutorials |
Examples |
Reference