Special number rounding issue

Hi guys,

I’m struggling with the special number, as you can see there are numbers which basically should be rounded correctly but somehow for item index number 3 results came differently. I presumably think that the actual data might be like 3.9999999… but grasshopper shows it as 4.0, so it was rounded to 3 instead of 4 because it’s floor rounding. If in that case how I can extract only the integer?.

By the way, I’ve tried round up as well but it will effect results if the data contains the number that has over 5 value on decimal digit likes 5.7 will become 6.

Have you tried rounding to the nearest integer? It’s the N output

@martinsiegrist yeah I’ve tried it, as I mentioned It will affect the result of the number having over 5 value in the decimal digit, 5.6 becomes 6, but I need 5.