PCSX2 Documentation/Nightmare on Floating-Point Street: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 16: Line 16:


'''Moral of the blog'''  
'''Moral of the blog'''  
When comparing two floating point numbers a and b, never use <code>a == b</code>. Instead use something along the lines of <code>fabs(a-b)< epsilon</code>


where epsilon is some very small number.
When comparing two floating point numbers a and b, never use <code>a == b</code>. Instead use something along the lines of <code>fabs(a-b)< epsilon</code> where epsilon is some very small number.
ninja
782

edits