Beispiel #1
0
func roundFloat64(x exact.Value) exact.Value {
	f, _ := exact.Float64Val(x)
	if !math.IsInf(f, 0) {
		return exact.MakeFloat64(f)
	}
	return nil
}
Beispiel #2
0
func roundFloat32(x exact.Value) exact.Value {
	f32, _ := exact.Float32Val(x)
	f := float64(f32)
	if !math.IsInf(f, 0) {
		return exact.MakeFloat64(f)
	}
	return nil
}