&optional
prototype → float
====Arguments and Values====
* number - a real.
* prototype - a float.
* float - a float.
====Description====
float converts a real number to a float.
If a prototype is supplied, a float is returned that is mathematically equal to number but has the same format as prototype.
If prototype is not supplied, then if the number is already a float, it is returned; otherwise, a float is returned that is mathematically equal to number but is a single float.
====Examples====
<blockquote>
(float 0) <r>0.0 </r>
(float 1 .5) <r>1.0 </r>
(float 1.0) <r>1.0</r>
(float 1/2) <r>0.5</r>
(eql (float 1.0 1.0d0) 1.0d0) <r>true</r>
</blockquote>
====Side Effects====
None.
====Affected By====
None.
====Exceptional Situations====
None.
====See Also====
* Function COERCE
====Notes====
None.
\issue{REAL-NUMBER-TYPE:X3J13-MAR-89}