Garden 🌻

Float type

A 64-bit floating point number, such as 1.5 or -1_000.00.

Floats are compared by value. Positive and negative zero are equal.

1.5 == 1.5 //-> True
0.0 == -0.0 //-> True

Floats have limited precision, so arithmetic can produce results that are close but not exactly equal. Comparing computed floats with == is usually a mistake.

0.1 +. 0.2 == 0.3 //-> False
Source Code
struct Float {
  __BUILT_IN_IMPLEMENTATION: NoValue,
}

Methods