 float - Maple Help

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

 > $\mathrm{convert}\left(\frac{1}{2},\mathrm{float}\right)$
 ${0.5000000000}$ (1)
 > $\mathrm{convert}\left(\mathrm{\pi },\mathrm{float}\right)$
 ${3.141592654}$ (2)
 > $\mathrm{convert}\left(\mathrm{\pi },\mathrm{float},3\right)$
 ${3.14}$ (3)
 > $\mathrm{convert}\left(\mathrm{sin}\left(1\right),\mathrm{float}\right)$
 ${0.8414709848}$ (4) Compatibility

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