6 lines
304 B
Mojo
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)
|