MCPcopy Index your code
hub / github.com/google/mangle / evalFloatMin

Function evalFloatMin

functional/functional.go:1401–1413  ·  view source on GitHub ↗
(it iter.Seq[ast.Constant])

Source from the content-addressed store, hash-verified

1399}
1400
1401func evalFloatMin(it iter.Seq[ast.Constant]) (ast.Constant, error) {
1402 min := math.MaxFloat64
1403 for c := range it {
1404 floatNum, err := c.Float64Value()
1405 if err != nil {
1406 return ast.Constant{}, err
1407 }
1408 if floatNum < min {
1409 min = floatNum
1410 }
1411 }
1412 return ast.Float64(min), nil
1413}
1414
1415func evalSum(it iter.Seq[ast.Constant]) (ast.Constant, error) {
1416 var sum int64

Callers 2

EvalApplyFnFunction · 0.85
EvalReduceFnFunction · 0.85

Calls 2

Float64Function · 0.92
Float64ValueMethod · 0.80

Tested by

no test coverage detected