# Differences

This shows you the differences between two versions of the page.

 cl:functions:float [2019/06/15 02:00] cl:functions:float [2019/08/19 17:00] (current) Line 1: Line 1: + ====== Function FLOAT ====== + + ====Syntax==== + * **float //number** ''&​optional''​ prototype// → //float// + + ====Arguments and Values==== + * //number// - a //​[[CL:​Glossary:​real]]//​. + * //​prototype//​ - a //​[[CL:​Glossary:​float]]//​. + * //float// - a //​[[CL:​Glossary:​float]]//​. + + ====Description==== + **float** converts a //​[[CL:​Glossary:​real]]//​ number to a //​[[CL:​Glossary:​float]]//​. + + If a //​prototype//​ is supplied, a //​[[CL:​Glossary:​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 //​[[CL:​Glossary:​float]]//,​ it is returned; otherwise, a //​[[CL:​Glossary:​float]]//​ is returned that is mathematically equal to //number// but is a //​[[CL:​Glossary:​single float]]//. + + ====Examples==== + <​blockquote>​ + (float 0) <​r>​0.0 + (float 1 .5) <​r>​1.0 + (float 1.0) <​r>​1.0​ + (float 1/2) <​r>​0.5​ + ([[CL:​Functions:​eql]] (float 1.0 1.0d0) 1.0d0) <​r>//​[[CL:​Glossary:​true]]//​ + ​ + + ====Side Effects==== + None. + + ====Affected By==== + None. + + ====Exceptional Situations==== + None. + + ====See Also==== + * **[[CL:​Functions:​coerce|Function COERCE]]** + + ====Notes==== + None. + + \issue{REAL-NUMBER-TYPE:​X3J13-MAR-89}

### Page Tools 