User Tools

Site Tools


math_library

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
math_library [2022/04/29 23:16]
max created
math_library [2022/04/29 23:41]
max
Line 14: Line 14:
 ===== Float comparison ===== ===== Float comparison =====
  
-Floating-point numbers are almost always stored inaccurately in computers' memory. This is because of the [[https://en.wikipedia.org/wiki/IEEE_754||IEEE-754]] standard that is used to store the number. +Floating-point numbers are almost always stored inaccurately in computers' memory. This is because of the [[https://en.wikipedia.org/wiki/IEEE_754|IEEE-754]] standard that is used to store the number.
- +
-It also means that for example, 0.2 + 0.1 is not equal to 0.3; rather it is equal to 0.30000000000000004. +
-Since computers are exact in comparison by default, you can see how you can run into issues with this. +
  
 +To learn which methods Impulse Physics offers to compare floating-point numbers, visit [[floating point comparison]].
math_library.txt · Last modified: 2022/05/01 18:38 by max