()
| 355 | } |
| 356 | |
| 357 | abs(): BigDecimal { |
| 358 | if (this._special === SpecialValue.NAN) return this |
| 359 | if (this._special === SpecialValue.NEGATIVE_INFINITY) { |
| 360 | return BigDecimal._create(0n, 0, SpecialValue.POSITIVE_INFINITY, false) |
| 361 | } |
| 362 | return BigDecimal._create( |
| 363 | bigintAbs(this._mantissa), |
| 364 | this._exponent, |
| 365 | this._special, |
| 366 | false |
| 367 | ) |
| 368 | } |
| 369 | |
| 370 | negated(): BigDecimal { |
| 371 | if (this._special === SpecialValue.NAN) return this |
no test coverage detected