From: shyouhei@... Date: 2019-01-17T22:44:26+00:00 Subject: [ruby-core:91152] [Ruby trunk Bug#15544] sprintf returns an unexpected string Issue #15544 has been updated by shyouhei (Shyouhei Urabe). Status changed from Open to Rejected Please visit https://bugs.ruby-lang.org/ and read the FAQ part. Next time consider doing so before posting an issue. ---------------------------------------- Bug #15544: sprintf returns an unexpected string https://bugs.ruby-lang.org/issues/15544#change-76383 * Author: areman01 (Andr�� Kullmann) * Status: Rejected * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- Hello, I've a little problem with the sprintf function. It returns unexpected results ( in my opinion ) ``` ruby sprintf("%.16g", 8.78) # returns "8.779999999999999" # my expected result is "8.78" ``` Can somebody explain this behavior to me ? Best Begards -- https://bugs.ruby-lang.org/ Unsubscribe: