
float - evaluation to a floating-point number

Calling sequence:
float(expr)

Parameter:

expr   --  expression

Overloading:

all

Summary:

float evaluates sub-expressions of expr as far as possible to floating-point
numbers. Arithmetic expressions consisting of integers, rational and complex
numbers, floating-point numbers, the constants EULER , PI and E or functions
such as exp and sin are evaluated.

If the parameter is a tableor an array then the elements are not evaluated
to floating-point numbers. Elements of tables and arrays are only evaluated
when they are accessed with their indicies (siehe Abschnitt ??).

The accuracy of the evaluation is determined by the global variable DIGITS.
DIGITS has the default value 10, which means that floating-point numbers

are output with ten digits. The user can set the value of DIGITS to between
0 and 231-1. float is a converting function of the kernel.

>>  float(E+sin(PI/4));

      3.425388609

>>  float(sin(2*a)+5*c/3);

      c*1.666666666 + sin(a*2.0)

>>  float(2/3*I+3);

      3.0 + 0.6666666666*I

See also:  DIGITS

