float - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


convert/float

convert to floating-point

convert/sfloat

convert to software floating-point

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

convert( expr, float, n )

convert( expr, sfloat, n )

Parameters

expr

-

expression

n

-

(optional) positive integer

Description

• 

The convert(expr, float) function converts an expression to floating-point to the precision given by the global variable Digits.

• 

If called with an argument n, the expression is evaluated at a value of n digits.

• 

The convert/float command is a call to evalf.

• 

The commands convert/float and convert/sfloat are identical except that convert/float returns any hardware floating-point numbers it encounters unchanged, while convert/sfloat converts them to software floating-point.

Examples

convert12,float

0.5000000000

(1)

convertπ,float

3.141592654

(2)

convertπ,float,3

3.14

(3)

convertsin1,float

0.8414709848

(4)

Compatibility

• 

The convert/float and convert/sfloat commands were updated in Maple 2015.

See Also

Digits

evalf