Mod
Method with 3 overloads
Mod(System.Double,System.Double)
Summary
The floored remainder of two reals, which takes the sign of the divisor, as
Mod(System.Numerics.Complex,System.Numerics.Complex) takes it. Written as
((a % b) + b) % b it is rounded a second time where the first remainder already
had the divisor's sign:2 mod e came out 1.9999999999999996, and
floor(2 mod e) 1, where both evaluate to 2.
Mod(System.Numerics.Complex,System.Numerics.Complex)
Summary
The remainder of one number by another, or NaN where either of them is not real.
Remarks
There is no one remainder of a complex number by another: which multiple of the
divisor to subtract is a choice, and the two usual ones -- rounding the quotient to
the nearest Gaussian integer, or truncating it -- disagree. The interpreter declines
the question and leavesa % b unevaluated; the compiled path has no way to
return an unevaluated node, so it answers NaN, which says the same thing.
For real arguments this is the runtime's own % , and so takes the sign of the
dividend, which is what Evaled does as well.
Mod(System.Single,System.Single)
Summary
The floored remainder of two reals in single precision, as Mod(System.Double,System.Double).
Angouri © 2019-2026 · Project's repo · Site's repo · Octicons · Transparency · 6018 pages online