Welcome to the Monastery  
PerlMonks 
Re: While loop with addition goes weird (binary float rounding error)by LanX (Cardinal) 
on Apr 08, 2018 at 13:08 UTC ( #1212530=note: print w/replies, xml )  Need Help?? 
Because 0.01 = 1/(2*2*5*5) is a decimal not a binary fraction. That means it can't be expressed without rounding error as a binary floating point number.(5 and 2 are different primes), pretty much like how you can't express 1/3 as a finite decimal floating point number without. see also Humans have too many fingers and What Every Computer Scientist Should Know About FloatingPoint Arithmetic
Cheers Rolf
In Section
Seekers of Perl Wisdom

