News for hackers. Stuff that matters.
Re:Introduction to Golang by millstone on Sunday August 18, 2013 @06:32PM (#6234560)
Which applies not just to integer math, but also to floating point:

http://play.golang.org/p/vEmiqUyPag

Division by zero in floating point is well defined and useful, and does not produce a runtime exception. So why is this a compile time error?

Edit And it produces the wrong result for division by negative zero: http://play.golang.org/p/DKoVG0Vlaf It should be -Inf, not +Inf. Go's floating point math is whack.

There are no comments on this comment yet.