Floating point innacuracy?

Hello. I want to make a looping system for my animation player that will do this
image
(cut off the end time of the loop and add it to the start time)

Sometimes however I would get these bogus numbers like adding 5 to the loop thing, I looked at my code and did a bit of print debugging and I think I came across a floating point imprecision (but if there is a fix I would like to know)

In roblox, running this code

print(1.0000001245643944 - 1)

will result in ~1.24 as seen here
image

edit: I am an idiot just now realizing that they got converted into scientific form

1 Like

if you want to read the values easier because I personally find it hard to understand scientific form you can do this

print(string.format("%.16f", 1.0000001245643944 - 1))