Re: [go-nuts] Another divide by zero (float) question

2016-09-11 Thread Ian Lance Taylor
On Sun, Sep 11, 2016 at 11:40 AM, wrote: > https://play.golang.org/p/tLSyUw1Ojq > > This operation is caught by the compiler > > a:=float32(1) / float32(0) > > > ok This has been asked before - but not with a satisfactory answer afaict > > The spec says ( https://golang.org/ref/spec#Arithmetic_o

[go-nuts] Another divide by zero (float) question

2016-09-11 Thread xiiophen
https://play.golang.org/p/tLSyUw1Ojq This operation is caught by the compiler a:=float32(1) / float32(0) ok This has been asked before - but not with a satisfactory answer afaict The spec says ( https://golang.org/ref/spec#Arithmetic_operators ) *The result of a floating-point or complex