You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+A float consists of an integer part (which may be prefixed with a plus or minus
+sign) followed by a fractional part and/or an exponent part. If both a
+fractional part and exponent part are present, the fractional part must precede
+the exponent part.
+A fractional part is a decimal point followed by one or more digits.
+
+An exponent part is an E (upper or lower case) followed by an integer part
+(which may be prefixed with a plus or minus sign).
+
+64-bit (double) precision expected.
---
+# fractional
++1.0
3.1415
-0.01
+
+# exponent
+5e+22
+1e6
+-2E-2
+
+# both
6.626e-34
The text was updated successfully, but these errors were encountered:
Floats should be implemented as IEEE 754 binary64 values.
A float consists of an integer part (which follows the same rules as decimal integer values) followed by a fractional part and/or an exponent part. If both a fractional part and exponent part are present, the fractional part must precede the exponent part.
fractional
flt1 = +1.0
flt2 = 3.1415
flt3 = -0.01
exponent
flt4 = 5e+22
flt5 = 1e06
flt6 = -2E-2
both
flt7 = 6.626e-34
A fractional part is a decimal point followed by one or more digits.
An exponent part is an E (upper or lower case) followed by an integer part (which follows the same rules as decimal integer values but may include leading zeros).
The decimal point, if used, must be surrounded by at least one digit on each side.
INVALID FLOATS
invalid_float_1 = .7
invalid_float_2 = 7.
invalid_float_3 = 3.e+20
Similar to integers, you may use underscores to enhance readability. Each underscore must be surrounded by at least one digit.
flt8 = 224_617.445_991_228
Float values -0.0 and +0.0 are valid and should map according to IEEE 754.
Special float values can also be expressed. They are always lowercase.
sf4 = nan # actual sNaN/qNaN encoding is implementation-specific
sf5 = +nan # same as nan
sf6 = -nan # valid, actual encoding is implementation-specific
The text was updated successfully, but these errors were encountered: