Grasshopper

algorithmic modeling for Rhino

Hi everyone.  I believe I'm experiencing a bug with the components that compare the size of numbers.  At a certain point in a definition I'm working on (relevant excerpt attached) I need to compare the z values of certain points to find out if the point from the first list is higher than the corresponding point from the second list.  A number of the point pairs are at the same height, and here's where the error comes.  

I'm using the Larger Than component and taking the booleans from the larger, but not equal output.  In some, but not all, of the identical cases it's outputting a "True", saying that one number is larger than an identical number.

This bug is the same with "Smaller Than" or "Equality" components.  However, it goes away when I manipulate the tested numbers so that they are no longer decimals.  This makes me suspect a rounding error somewhere.  

Thanks for any help!

Views: 441

Attachments:

Replies to This Discussion

Thanks for the reply Daniel.  Looks like this is a known issue.  Sorry for the duplicate post!

It depends on your definition of 'issue'. It's not a bug, it's just the way numbers work on computers.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service