Files
pplus-library/mojo/probes/float32-literal.mojo
T
alexm 568474d52f
Test (in pplus-core) / in-core (push) Failing after 28m44s
Initial commit
2026-11-12 22:23:48 -05:00

6 lines
304 B
Mojo

# probe: what type does a float literal take beside a Float32? (the Float32: x == 0.1 is True for a Float32 x holding 0.1)
def main():
var x: Float32 = 0.1
print(x == 0.1, Float64(x) == 0.1, x + 0.1, x * 3.0, 0.1 + x, 1.0 - x, x < 0.1, x / 3)
print(Float32(0.1) >= x, x >= 0.1, 2 * x, x - 1)