Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

float

float

type: function (subr) 
location: built-in
source file: xlmath.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(float <expr> )
        <expr>          -       integer or floating point number/expression

DESCRIPTION

The FLOAT function takes a numeric expression and returns the result which is forced to be 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


Go to the first, previous, next, last section, table of contents.