question regarding div / std::div implementation
Paul Eggert
eggert@cs.ucla.edu
Wed Apr 20 22:10:00 GMT 2016
On 04/20/2016 02:55 PM, Daniel Gutson wrote:
> That fools the compiler.
Yes, bizarre C code can fool the compiler. I was talking about realistic
code, not contrived examples.
glibc itself uses % and / in places where div/ldiv/lldiv might plausibly
be used internally, and this is portable and maintainable and efficient
and there is no real reason to change this, even if div/ldiv/lldiv were
tuned. Similarly for other C applications.
More information about the Libc-alpha
mailing list