Negates this Decimal256 in-place using two's complement arithmetic. Changes the sign of the decimal number (positive becomes negative and vice versa).
()
| 1443 | * Changes the sign of the decimal number (positive becomes negative and vice versa). |
| 1444 | */ |
| 1445 | public void negateNonNull() { |
| 1446 | ll = ~ll + 1; |
| 1447 | long c = ll == 0L ? 1L : 0L; |
| 1448 | lh = ~lh + c; |
| 1449 | c = (c == 1L && lh == 0L) ? 1L : 0L; |
| 1450 | hl = ~hl + c; |
| 1451 | c = (c == 1L && hl == 0L) ? 1L : 0L; |
| 1452 | hh = ~hh + c; |
| 1453 | } |
| 1454 | |
| 1455 | /** |
| 1456 | * Sets this Decimal256 to the specified 256-bit value and scale. |