View source code
Display the source code in std/math/remainder.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.
Calculates the remainder from the calculation x/y.
real fmod (
) nothrow @nogc @trusted;
The value of x - i * y, where i is the number of times that y can be completely subtracted from x. The result has the same sign as x.
.math .operations : feqrel; import std .math .traits : isIdentical, isNaN; assert(isIdentical(fmod(0.0, 1.0), 0.0)); assert(fmod(5.0, 3.0) .feqrel(2.0) > 16); assert(isNaN(fmod(5.0, 0.0)));
Walter Bright, Don Clugston, Conversion of CEPHES math library to D by Iain Buclaw and David Nadlinger
Copyright © 1999-2023 by the D Language Foundation | Page generated by ddox.