Floating-point Modulus math.fmod
Ilya Yaroshenko via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Nov 7 01:21:11 PST 2016
On Sunday, 6 November 2016 at 21:45:28 UTC, Fendercaster wrote:
> I'm not quite sure if this is the right forum to ask this
> question:
> I've been trying to implement the "floating-point modulus"
> function from the math library. Equivalently that's what I've
> tried in Python too. Problem is - the results are different and
> not even close. Please have a look at both snippets. Maybe
> someone can help me out:
>
> [...]
Python uses 64-bit doubles. You may want to try with `double` and
`core.stdc.tgmath` -- Ilya
More information about the Digitalmars-d-learn
mailing list