Grasshopper

algorithmic modeling for Rhino

Right when I thought I was starting to understand why some floating numbers get those "junk" digits in the least significant decimal places, I came across this:

Testing the actual value of the numbers (with the format component) in every step of the definition, I realize the error occurs on the subtraction component (the sliders provide "clean" numbers).

Also, trying different sliders' combinations, the first time I get a "false" out of the equality component is at (0.009 - 0.008).

So if someone can explain me why this happens on a simple subtraction and why it doesn't happen on the (0.001 - 0.000), I would be really happy!

ps. I have read most of the conversations about equality errors but I haven't located an explanation about Why or When these occur....

Thanks in advance, 

Nikos

Views: 205

Attachments:

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service