negateOverflowFlags converts Overflow and SystemOverflow flags into their equivalent Underflows.
()
| 153 | // negateOverflowFlags converts Overflow and SystemOverflow flags into their |
| 154 | // equivalent Underflows. |
| 155 | func (r Condition) negateOverflowFlags() Condition { |
| 156 | if r.Overflow() { |
| 157 | // Underflow always also means Subnormal. See GDA definition. |
| 158 | r |= Underflow | Subnormal |
| 159 | r &= ^Overflow |
| 160 | } |
| 161 | if r.SystemOverflow() { |
| 162 | r |= SystemUnderflow |
| 163 | r &= ^SystemOverflow |
| 164 | } |
| 165 | return r |
| 166 | } |
no test coverage detected