Basis entryBasics.round
Tests (5)
- 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 / FloatRoundTest`round` rounds a Float to the nearest Int, with halves rounded up: 2.5 gives 3 and 3.5 gives 4.
- elm-core / RoundToIntTestChecks that `round` converts a `Float` to the nearest `Int`: `2.7` gives `3`, `2.3` gives `2` and `-2.7` gives `-3`.
- elm-core / StandardA44RoundNonFiniteTest`round`, `floor` and `ceiling` of NaN are `0`, and of an infinity an Int.
- elm-core / StandardA45IntNegativeZeroTestInt has one zero: no Int operation gives a negative zero.
Discussions
Discuss this basis entry·Search the discussions on GitHub
Discussions are on GitHub; one about this basis entry has [b:Basics.round] 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.