Basis entryBasics.modBy
Tests (6)
- elm / StandardCoreEvaluationExamplesTestSmall programs for rules of the dynamic semantics of the Core that other tests reach only in passing, and examples from the Comments of A Standard Definition of Elm?, Chapter 6.
- elm-core / BasicsModByTest`modBy 3` gives 1 for 7, 0 for 9, and 2 for -1: the result takes the sign of the modulus, not of the dividend.
- elm-core / IntModByTestChecks that `modBy` with a positive modulus gives a non-negative result for a positive, a negative and a zero dividend.
- elm-core / StandardA42ModByZeroTest`modBy 0 x` is `0`.
- elm-core / StandardA42ZeroDivisorTest`3 // 0`, `modBy 0 3` and `remainderBy 0 3` are all `0`: the examples A Standard Definition of Elm? gives for ruling A42 in its initial dynamic basis.
- 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.modBy] 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.