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

Function roundFloat64

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

Source from the content-addressed store, hash-verified

264}
265
266func roundFloat64(x constant.Value) constant.Value {
267 f, _ := constant.Float64Val(x)
268 if !math.IsInf(f, 0) {
269 return constant.MakeFloat64(f)
270 }
271 return nil
272}
273
274// representableConst reports whether x can be represented as
275// value of the given basic type and for the configuration

Callers 1

representableConstFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected