MCPcopy Create free account
hub / github.com/cel-expr/cel-go / sqrt

Function sqrt

ext/math.go:739–750  ·  view source on GitHub ↗
(val ref.Val)

Source from the content-addressed store, hash-verified

737}
738
739func sqrt(val ref.Val) ref.Val {
740 switch v := val.(type) {
741 case types.Double:
742 return types.Double(math.Sqrt(float64(v)))
743 case types.Int:
744 return types.Double(math.Sqrt(float64(v)))
745 case types.Uint:
746 return types.Double(math.Sqrt(float64(v)))
747 default:
748 return types.NewErr("no such overload: sqrt")
749 }
750}
751
752func bitAndPairInt(first, second ref.Val) ref.Val {
753 l := first.(types.Int)

Callers

nothing calls this directly

Calls 2

DoubleTypeAlias · 0.92
NewErrFunction · 0.92

Tested by

no test coverage detected