erg/crates/erg_compiler/lib/std.d/Float.d.er
Shunsuke Shibayama 677ced0fcd feat: add std.d
2023-02-17 21:09:23 +09:00

32 lines
683 B
Python

.Float: ClassType
.Float.
'''
the real part of a complex number
'''
'''japanese
複素数の実部
'''
Real: Float
'''
the imaginary part of a complex number
'''
'''japanese
複素数の虚部
'''
Imag: Float
'''
Return a hexadecimal representation of a floating-point number.
'''
'''erg
assert (100.0).hex() == "0x1.9000000000000p+6"
assert (12.34).hex() == "0x1.8ae147ae147aep+3"
'''
hex: (self: .Float) -> Str
'''
Return True if the float is an integer.
'''
'''erg
assert (1.0).is_integer()
assert not (1.1).is_integer()
'''
is_integer: (self: .Float) -> Bool