MCPcopy Create free account
hub / github.com/blues/note / IsInf

Method IsInf

lib/float16.go:191–194  ·  view source on GitHub ↗

IsInf reports whether f is an infinity (inf). A sign > 0 reports whether f is positive inf. A sign < 0 reports whether f is negative inf. A sign == 0 reports whether f is either inf.

(sign int)

Source from the content-addressed store, hash-verified

189// A sign < 0 reports whether f is negative inf.
190// A sign == 0 reports whether f is either inf.
191func (f Float16) IsInf(sign int) bool {
192 return ((f == 0x7c00) && sign >= 0) ||
193 (f == 0xfc00 && sign <= 0)
194}
195
196// IsFinite returns true if f is neither infinite nor NaN.
197func (f Float16) IsFinite() bool {

Callers 2

processTemplateValueMethod · 0.80
encodeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected