Sign in to follow this  

WANTED: fdiv quotient and remainder optimisation

This topic is 4780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Okay I was wondering if anyone knew of, or had heard of, an optimised way of performing a division & remainder check @ the same time for floating point math. div & ldiv are available for integer division, but what I'm really after is an fdiv or ddiv. Does the floating point structure leave room for implementing an optimisation like this, or would it quite simple be a pain in the butt & more worth performing both operations seperately? Or is there a blatently obvious alternative? Thoughts wanted [Edited by - ProPuke on November 12, 2004 1:38:54 PM]

Share this post


Link to post
Share on other sites
if your compiler supports c99 standard then your can use the function called remquo, highly doubt any of ms's compilers support it considering there mainly C++ compilers (although they have added a thew functions from the C99 standard), note yes C++ is not a superset of C anymore.

EDIT: Okay MS compilers don't support it for definite, how-ever GCC does.

Share this post


Link to post
Share on other sites

This topic is 4780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this