Answer the question
In order to leave comments, you need to log in
String to number - incorrectly processed?
Hello. Tell me how to solve this problem correctly? When translating and truncating the length after the decimal point, does it incorrectly process the number ?puts ('2.01').to_f.truncate(3) # 2.009
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question