MCPcopy Create free account
hub / github.com/cockroachdb/apd / shouldSetAsNaN

Method shouldSetAsNaN

context.go:99–102  ·  view source on GitHub ↗

shouldSetAsNaN determines whether setAsNaN should be called, given the provided values, where x is required and y is optional. It is split from setAsNaN to permit inlining of this function. gcassert:inline

(x, y *Decimal)

Source from the content-addressed store, hash-verified

97// split from setAsNaN to permit inlining of this function.
98//gcassert:inline
99func (c *Context) shouldSetAsNaN(x, y *Decimal) bool {
100 return x.Form == NaNSignaling || x.Form == NaN ||
101 (y != nil && (y.Form == NaNSignaling || y.Form == NaN))
102}
103
104// setAsNaN sets d to the first NaNSignaling, or otherwise first NaN, of
105// x and y. x is required, y is optional. Expects one of the two inputs

Callers 14

addMethod · 0.95
AbsMethod · 0.95
NegMethod · 0.95
MulMethod · 0.95
quoSpecialsMethod · 0.95
RemMethod · 0.95
rootSpecialsMethod · 0.95
logSpecialsMethod · 0.95
ExpMethod · 0.95
PowMethod · 0.95
QuantizeMethod · 0.95
toIntegralSpecialsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected