@@ -481,11 +481,11 @@ extends ScalaNumber with ScalaNumericConversions with Serializable with Ordered[
481
481
482
482
/** Addition of BigDecimals
483
483
*/
484
- def + (that : BigDecimal ): BigDecimal = new BigDecimal (this .bigDecimal add that.bigDecimal, mc)
484
+ def + (that : BigDecimal ): BigDecimal = new BigDecimal (this .bigDecimal. add( that.bigDecimal, mc) , mc)
485
485
486
486
/** Subtraction of BigDecimals
487
487
*/
488
- def - (that : BigDecimal ): BigDecimal = new BigDecimal (this .bigDecimal subtract that.bigDecimal, mc)
488
+ def - (that : BigDecimal ): BigDecimal = new BigDecimal (this .bigDecimal. subtract( that.bigDecimal, mc) , mc)
489
489
490
490
/** Multiplication of BigDecimals
491
491
*/
@@ -499,14 +499,14 @@ extends ScalaNumber with ScalaNumericConversions with Serializable with Ordered[
499
499
* divideToIntegralValue and the remainder. The computation is exact: no rounding is applied.
500
500
*/
501
501
def /% (that : BigDecimal ): (BigDecimal , BigDecimal ) =
502
- this .bigDecimal.divideAndRemainder(that.bigDecimal) match {
502
+ this .bigDecimal.divideAndRemainder(that.bigDecimal, mc ) match {
503
503
case Array (q, r) => (new BigDecimal (q, mc), new BigDecimal (r, mc))
504
504
}
505
505
506
506
/** Divide to Integral value.
507
507
*/
508
508
def quot (that : BigDecimal ): BigDecimal =
509
- new BigDecimal (this .bigDecimal divideToIntegralValue that.bigDecimal, mc)
509
+ new BigDecimal (this .bigDecimal. divideToIntegralValue( that.bigDecimal, mc) , mc)
510
510
511
511
/** Returns the minimum of this and that, or this if the two are equal
512
512
*/
@@ -524,19 +524,19 @@ extends ScalaNumber with ScalaNumericConversions with Serializable with Ordered[
524
524
525
525
/** Remainder after dividing this by that.
526
526
*/
527
- def remainder (that : BigDecimal ): BigDecimal = new BigDecimal (this .bigDecimal remainder that.bigDecimal, mc)
527
+ def remainder (that : BigDecimal ): BigDecimal = new BigDecimal (this .bigDecimal. remainder( that.bigDecimal, mc) , mc)
528
528
529
529
/** Remainder after dividing this by that.
530
530
*/
531
- def % (that : BigDecimal ): BigDecimal = this remainder that
531
+ def % (that : BigDecimal ): BigDecimal = this . remainder( that)
532
532
533
533
/** Returns a BigDecimal whose value is this ** n.
534
534
*/
535
535
def pow (n : Int ): BigDecimal = new BigDecimal (this .bigDecimal.pow(n, mc), mc)
536
536
537
537
/** Returns a BigDecimal whose value is the negation of this BigDecimal
538
538
*/
539
- def unary_- : BigDecimal = new BigDecimal (this .bigDecimal.negate(), mc)
539
+ def unary_- : BigDecimal = new BigDecimal (this .bigDecimal.negate(mc ), mc)
540
540
541
541
/** Returns the absolute value of this BigDecimal
542
542
*/
0 commit comments