Basis entryBasics.truncate
Tests (4)
- elm / FloatEdgeTestFloat edge cases: `round` on halves, NaN in equality, `min` and `compare`, `truncate` of NaN, and an Int power beyond 2^32.
- elm-core / FloatTruncateTest`truncate` rounds a Float toward zero: 2.7 and 2.3 give 2, and -2.3 and -2.7 give -2.
- elm-core / StandardA44TruncateWideTest`truncate` of a Float beyond 32 bits does not wrap.
- elm-core / TruncateToIntTest`truncate` rounds a `Float` towards zero: 2.7 gives 2 and -2.7 gives -2.
Discussions
Discuss this basis entry·Search the discussions on GitHub
Discussions are on GitHub; one about this basis entry has [b:Basics.truncate] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.