Create Decimal256 from a long value with specified scale. @param value the long value @param scale the desired scale @return new Decimal256 instance @throws NumericException if scale is invalid
(long value, int scale)
| 588 | * @throws NumericException if scale is invalid |
| 589 | */ |
| 590 | public static Decimal256 fromLong(long value, int scale) { |
| 591 | validateScale(scale); |
| 592 | |
| 593 | Decimal256 result = new Decimal256(); |
| 594 | result.ofLong(value, scale); |
| 595 | return result; |
| 596 | } |
| 597 | |
| 598 | /** |
| 599 | * Extracts the digit at a specific power-of-ten position from a 256-bit decimal number. |