Actions
Bug #15544
closedsprintf returns an unexpected string
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux]
Description
Hello,
I've a little problem with the sprintf function. It returns unexpected results ( in my opinion )
sprintf("%.16g", 8.78)
# returns "8.779999999999999"
# my expected result is "8.78"
Can somebody explain this behavior to me ?
Best Begards
Actions
Like0
Like0Like0