Say I have two rational fractions a/b and c/d that are equal. a, b, c, and d can all be represented as 32 bit signed integers. if i do division with 64 bit floating point numbers will a/b == c/d always?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are cases where compiler optimizations will prevent the equality from being true even if the results are guaranteed identical. The original x86 floating point operations are performed on 80-bit registers; if you compare one of those to a stored 64-bit value it will probably compare unequal.