irb(main):017:0> 100 == 100 * 1.0000000000000001
=> true
irb(main):018:0> 100 == 100 * 1.000000000000001
=> false
Thursday, January 22, 2009
Subscribe to:
Post Comments (Atom)
Hi there. I'm a mid twenties San Francisco web developer. My current job is engineer at Goodreads Inc. Before that I worked at Tickle Inc (subsidiary of Monster Worldwide). I did my undergrad at Appalachian State University (Magna Cum Laude!) and grew up in Raleigh, North Carolina.
My favorite hobbies include surfing, biking, reading, movies, and general mayhem. My favorite color is green and my birthday is July 6th.
[Resume]
2 comments:
dude! you can't use freakin' == with floating-point!! go read this right now:
http://docs.sun.com/source/806-3568/ncg_goldberg.html
How FP Arithmetic is supposed to work != how FP arihmetic works in ruby
Post a Comment