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!
Tags:
Hi Matthew,
See these discussions for more on this topic:
http://www.grasshopper3d.com/forum/topics/equality-component-bug
http://www.grasshopper3d.com/forum/topics/floating-point-error-why-...
http://www.grasshopper3d.com/forum/topics/equality-in-function-does...
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.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by