algorithmic modeling for Rhino
Tags:
Hi David,
it feels funny responding to a post back in 2010, but I had the same problem a few days ago, and coincidentally I just ran into this discussion and decided to respond. The attached file is a part of a larger script where I was filtering numbers < 950. The only number in the data set < 950 was 405.570893 and without adding the rounding component before plugging in the data in the "smaller than component" the booleans yielded wrong results. It was quite annoying to understand why this "error" mas happening before I put the round component in. But it still dosent make any sense, 405.570893 will always be smaller than 950, or 950.0000000001. I eaven tried writing my own smaller than component in python and the output was the same.
Is their a logical mathematic explanation for this? I did hear once that programing languages treat floats in different ways depending on the types of calculations they are used for, and thus can alter the results. But yet again... it still dosen`t make any sense to me.
Thank you
Nicholas
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by