convert to floating-point - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Data Types : Conversion : convert/float

convert/float - convert to floating-point

convert/sfloat - convert to software floating-point

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)

See Also

Digits, evalf


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam