Hey everyone!
I recently wrote a cranelift backend for a project, and I wanted to confirm that cranelift had no floating point modulo instruction? I don't see it here, but I wanted to confirm that there wasn't another place to look.
The way to do floating-point modulo is to call "fmod" in libm
Compilers that have an fmod
or frem
instruction in their IR just call that same library routine in their backends :-)
Thanks!
Indeed; that's what I've been doing. But I didn't know that detail about other folks doing exactly that. Thanks for the context :)
Last updated: Dec 23 2024 at 13:07 UTC