ok I want to assign +Inf as a float32.

Currently I work around like this :

package main

import (
"fmt"
)

func main() {
var a,b,c float32
a=1
b=0
//c=float32(1.0)/float32(0.0) //can't do it
//c=+Inf //doesn't work - not a keyword
c=a/b //kludge
fmt.Println (a,b,c)
}


Couldn't find a way to do this - not even in the math package .. (I see 
that +Inf is in the math package but it is not exported) ie lines 8-10 in 
math/bits.go

Am I missing something obvious.?

In https://golang.org/ref/spec#Numeric_types it states "*float32   the set 
of all IEEE-754 32-bit floating-point numbers" *

If not is a request that +Inf etc be exported from math reasonable  ? (also 
signed zeros etc)

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to