Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Win32 MAth Error Double to Int Conversion

2»

Comments

  • LundinLundin Member Posts: 3,711
    I haven't read this thread too carefully, but you should be aware of how float numbers work. They never ever contain a fixed value. So you can never expect them to have a certain value, and you can never check them with the equality operators == and !=.

    Here is a good link: http://c-faq.com/fp/
  • AsmGuru62AsmGuru62 Member Posts: 6,519
    : I haven't read this thread too carefully, but you should be aware of
    : how float numbers work. They never ever contain a fixed value. So
    : you can never expect them to have a certain value, and you can never
    : check them with the equality operators == and !=.
    :
    : Here is a good link: http://c-faq.com/fp/
    [color=Blue]The constants loaded from FPU itself are OK to check for equality, because FPU hardware always loads the same constant (like PI). However, AFTER any FPU operations the precision is lost (in most cases) and equality no longer works.[/color]
2»
Sign In or Register to comment.