floating point - Javascript precision while dividing -


Is there a way to determine that dividing one number from another will result in the whole number in javascript? As 18.4 / 0.002 gives us 9200 , but 18.4 / 0.1 gives us 183.99999999999997 . The problem is that any of them may be float numbers (like 0.1, 0.01, 1, 10, ...), which makes modules of standard functions impossible to try or subtract, and point point means precise issues That we sometimes get non-full-result results for those numbers that are complete, or do not allow the full number of results for those people.

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -