forked from kscience/kmath
Revert implementing PowerOperations for JBigIntegerField
This commit is contained in:
parent
1614eef452
commit
e96ecaddcf
@ -7,7 +7,7 @@ import java.math.MathContext
|
|||||||
/**
|
/**
|
||||||
* A field wrapper for Java [BigInteger]
|
* A field wrapper for Java [BigInteger]
|
||||||
*/
|
*/
|
||||||
object JBigIntegerField : Field<BigInteger>, PowerOperations<BigInteger> {
|
object JBigIntegerField : Field<BigInteger> {
|
||||||
override val zero: BigInteger
|
override val zero: BigInteger
|
||||||
get() = BigInteger.ZERO
|
get() = BigInteger.ZERO
|
||||||
|
|
||||||
@ -19,8 +19,6 @@ object JBigIntegerField : Field<BigInteger>, PowerOperations<BigInteger> {
|
|||||||
override fun BigInteger.minus(b: BigInteger): BigInteger = this.subtract(b)
|
override fun BigInteger.minus(b: BigInteger): BigInteger = this.subtract(b)
|
||||||
override fun multiply(a: BigInteger, k: Number): BigInteger = a.multiply(k.toInt().toBigInteger())
|
override fun multiply(a: BigInteger, k: Number): BigInteger = a.multiply(k.toInt().toBigInteger())
|
||||||
override fun multiply(a: BigInteger, b: BigInteger): BigInteger = a.multiply(b)
|
override fun multiply(a: BigInteger, b: BigInteger): BigInteger = a.multiply(b)
|
||||||
override fun power(arg: BigInteger, pow: Number): BigInteger = arg.pow(pow.toInt())
|
|
||||||
override fun sqrt(arg: BigInteger): BigInteger = arg.sqrt()
|
|
||||||
override fun BigInteger.unaryMinus(): BigInteger = negate()
|
override fun BigInteger.unaryMinus(): BigInteger = negate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user