Skip to content
Joey Wang
Menu

Search

Tag: ruby

Round Is Not Always What You Expect

Rounding the same float, 2.675, to two decimal places gives different answers in C#, PHP, Go, Python, JavaScript, and Ruby, for concrete reasons.