This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question regarding div / std::div implementation


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]