示例#1
0
文件: expr.go 项目: xslonepiece/goios
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
}
示例#2
0
文件: expr.go 项目: xslonepiece/goios
func fitsFloat32(x exact.Value) bool {
	f32, _ := exact.Float32Val(x)
	f := float64(f32)
	return !math.IsInf(f, 0)
}