public static String doubleToGoString ( double d ) { if ( d == Double . POSITIVE_INFINITY ) { return "+Inf" ; } if ( d == Double . NEGATIVE_INFINITY ) { return "-Inf" ; } if ( Double . isNaN ( d ) ) { return "NaN" ; } return Double . toString ( d ) ; }
Convert a double to its string representation in Go .