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

Method divide

core/src/main/java/io/questdb/std/Decimal256.java:411–418  ·  view source on GitHub ↗

Static division method. @param dividend the dividend @param divisor the divisor @param result the result @param scale the desired scale of the result @param roundingMode the rounding mode @throws NumericException if division by zero or overflow occurs

(Decimal256 dividend, Decimal256 divisor, Decimal256 result, int scale, RoundingMode roundingMode)

Source from the content-addressed store, hash-verified

409 * @throws NumericException if division by zero or overflow occurs
410 */
411 public static void divide(Decimal256 dividend, Decimal256 divisor, Decimal256 result, int scale, RoundingMode roundingMode) {
412 divide(
413 result.divider,
414 dividend.hh, dividend.hl, dividend.lh, dividend.ll, dividend.scale,
415 divisor.hh, divisor.hl, divisor.lh, divisor.ll, divisor.scale,
416 result, scale, roundingMode
417 );
418 }
419
420 /**
421 * Static division method using raw 256-bit values.

Callers 15

testDivideMethod · 0.95
testDivide64Method · 0.95
testDivideAddBackMethod · 0.95
testDivideLargeMethod · 0.95
testDivideLargeScaleMethod · 0.95
testDivideNullMethod · 0.95
testDivideNullOtherMethod · 0.95
testDivideOverflowMethod · 0.95
testDivisionByOneMethod · 0.95
testDivisionByZeroMethod · 0.95

Calls 12

isNullMethod · 0.95
validateScaleMethod · 0.95
instanceMethod · 0.95
ofDividendMethod · 0.80
ofDivisorMethod · 0.80
ofNullMethod · 0.65
putMethod · 0.65
ofMethod · 0.65
clearMethod · 0.65
sinkMethod · 0.65
negateMethod · 0.65

Tested by 15

testDivideMethod · 0.76
testDivide64Method · 0.76
testDivideAddBackMethod · 0.76
testDivideLargeMethod · 0.76
testDivideLargeScaleMethod · 0.76
testDivideNullMethod · 0.76
testDivideNullOtherMethod · 0.76
testDivideOverflowMethod · 0.76
testDivisionByOneMethod · 0.76
testDivisionByZeroMethod · 0.76