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)
| 189 | // A sign < 0 reports whether f is negative inf. |
| 190 | // A sign == 0 reports whether f is either inf. |
| 191 | func (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. |
| 197 | func (f Float16) IsFinite() bool { |
no outgoing calls
no test coverage detected