Skip to content

Commit ec218f1

Browse files
make-github-pseudonymous-againAurélien Ooms
authored and
Aurélien Ooms
committed
🐛 fix: Use new js-integer-big-endian API.
1 parent 4db5ca8 commit ec218f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/Integer.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
stringify , convert , _trim_positive ,
55
_alloc , _copy , _zeros ,
66
_jz , _cmp , _eq ,
7-
_add , _sub , _mul , _div , _powd ,
7+
add , _sub , _mul , _idivmod , _powd ,
88
_increment ,
99
} from '@aureooms/js-integer-big-endian' ;
1010

@@ -63,7 +63,7 @@ export class Integer {
6363

6464
const c = _zeros( Math.max( a.length , b.length ) + 1 ) ;
6565

66-
_add( r , a , 0 , a.length , b , 0 , b.length , c , 0 , c.length ) ;
66+
add( r , a , 0 , a.length , b , 0 , b.length , c , 0 , c.length ) ;
6767

6868
return new Integer( r , result_is_negative , c ) ;
6969

@@ -232,7 +232,7 @@ export class Integer {
232232
// Quotient
233233
const q = _zeros( D.length ) ;
234234

235-
_div( r , D , 0 , D.length , d , di , dj , q , 0 , q.length ) ;
235+
_idivmod( r , D , 0 , D.length , d , di , dj , q , 0 , q.length ) ;
236236

237237
const Q = new Integer( r , quotient_is_negative , q ) ; // quotient
238238
const R = new Integer( r , 0 , D ) ; // remainder

0 commit comments

Comments
 (0)