Home / Docs / Standard library / Prelude

Rounding

Release v0.4.0Edition 0.5 preview

A kind of the prelude, in scope in every module. Edition 0.5 preview.

una
pub kind Rounding = HalfEven | HalfAwayFromZero | HalfTowardZero | TowardZero | AwayFromZero | TowardPositive | TowardNegative

How a decimal operation rounds an exact value to the units of its result's scale (spec/29 §16): on the magnitude, then the sign. No operation has a default mode.

Specification

Generated from the standard modules of una v0.4.0 (docs/std/listing.json, which is not part of the specification). The specification governs: spec/14 §1.