Fuzion Logo
flang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

float

🌌float

float -- floating point values


float is the abstract parent of concrete floating point features such as
f32 or f64.

convert a float value to i64 dropping any fraction.
the value must be in the range of i64

ceiling: the smallest integer greater or equal to this

floor: the greatest integer lower or equal to this


redefines numeric.infix %!:


redefines numeric.infix *!:


redefines numeric.infix **!:


redefines numeric.infix +!:


redefines numeric.infix -!:


redefines numeric.infix /!:

preconditions for basic operations: true if the operation's result is
representable for the given values. For IEEE_754, all operations are
defined for all values.

redefines numeric.prefix +!:
preconditions for basic operations: true if the operation's result is
representable for the given values

This does not check if the operation is defined (i.e, it
returns true for '3/!0' or '0**!0'.


redefines numeric.prefix -!:

round floating point number
ties to away (0.5 => 1; -0.5 => -1; etc.)

NYI this could be made faster, see here:
https://cs.opensource.google/go/go/+/refs/tags/go1.18.1:src/math/floor.go;l=79