in reply to can't Understand output

Perl uses your CPU's floating point numbers under the hood which have some inaccuracies.

You can use bigrat instead, or rely only on integers, or round after a few digits.