In a program that generates C, I'm using big.Float.Text
(
https://golang.org/pkg/math/big/#Float.Text) to produce the exact
value of the C floating point literal. As it turns out, the function
does not support Inf values. Instead of encoding the exact bits of the
Inf value, the resulting string is simply "Inf".
I'm looking for possibly existing, open source Go code that does the
conversion properly both for C floats (Go float32) and C doubles (Go
float64). So far I was not able to find anything. I can surely roll my
own code, but I'd very much like to use a well tested code if someone
can point me to such.
TIA