MCPcopy Create free account
hub / github.com/despiteallobjections/amigo / roundFloat32

Function roundFloat32

types/expr.go:252–259  ·  view source on GitHub ↗
(x constant.Value)

Source from the content-addressed store, hash-verified

250}
251
252func roundFloat32(x constant.Value) constant.Value {
253 f32, _ := constant.Float32Val(x)
254 f := float64(f32)
255 if !math.IsInf(f, 0) {
256 return constant.MakeFloat64(f)
257 }
258 return nil
259}
260
261func fitsFloat64(x constant.Value) bool {
262 f, _ := constant.Float64Val(x)

Callers 1

representableConstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected