The difference here is a result of c++ rounding up, and ruby rounding the number down. The read value is 3425000000 (Hz) when converted to Ghz results in 3.425. When this gets rounded to 2 decimals, it ends up as 3.42 in ruby and 3.43 in c++. This only happens when the Ghz value has more than 2 decimals and ends with 5. As a fix we can round the number before formatting: https://github.com/puppetlabs/facter/blob/b9f6c32acb7433f05fe6227cc25d9d1c359b2f5b/lib/facter/util/facts/unit_converter.rb#L22 like