MCPcopy Create free account
hub / github.com/questdb/questdb / fromLong

Method fromLong

core/src/main/java/io/questdb/std/Decimal128.java:404–408  ·  view source on GitHub ↗

Create a Decimal128 from a long value. @param value the long value to convert @param scale the number of decimal places @return a new Decimal128 representing the long value @throws NumericException if scale is invalid

(long value, int scale)

Source from the content-addressed store, hash-verified

402 * @throws NumericException if scale is invalid
403 */
404 public static Decimal128 fromLong(long value, int scale) {
405 validateScale(scale);
406 long h = value < 0 ? -1L : 0L;
407 return new Decimal128(h, value, scale);
408 }
409
410 /**
411 * Extracts the digit at a specific power-of-ten position from a 128-bit decimal number.

Calls 1

validateScaleMethod · 0.95