debugging division
This commit is contained in:
@ -119,12 +119,13 @@ extend MyObject
|
||||
^(a value: 5) * (b value: 6). ## (12 * 5 + 22) * (99 * 6 + 4) => 49036
|
||||
}
|
||||
|
||||
method(#class) testBigintDiv: divd_base divisor: divr_base
|
||||
method(#class) testBigintDiv: divd_base divisor: divr_base count: count
|
||||
{
|
||||
| i q r divd divr |
|
||||
| i q r divd divr ubound |
|
||||
|
||||
i := 1.
|
||||
while (i < 2000)
|
||||
ubound := i + count.
|
||||
while (i < ubound)
|
||||
{
|
||||
divd := divd_base * i.
|
||||
divr := divr_base * i.
|
||||
@ -375,8 +376,13 @@ extend MyObject
|
||||
## 150-154
|
||||
[ (8113063330913503995887611892379812731289731289312898971231 div: 8113063330913503995887611892379812731289731289312898971230) = 1 ],
|
||||
[ (8113063330913503995887611892379812731289731289312898971231 rem: 8113063330913503995887611892379812731289731289312898971230) = 1 ],
|
||||
[ self testBigintDiv: 100919283908998345873248972389472389791283789123712899089034258903482398198123912831 divisor: 129323482374892374238974238974238947328972389128387312892713891728391278 ],
|
||||
[ self testBigintDiv: 234897230919283908998345873248972389472389791283789123712899089034258903482398198123912831 divisor: 129323482374892374238974238974238947328972389128387312892713891728391278 ],
|
||||
[ self testBigintDiv: 100919283908998345873248972389472389791283789123712899089034258903482398198123912831 divisor: 129323482374892374238974238974238947328972389128387312892713891728391278 count: 2000 ],
|
||||
[ self testBigintDiv: 234897230919283908998345873248972389472389791283789123712899089034258903482398198123912831 divisor: 12932348237489237423897423897423894732897238912838731289271389172839127 count: 2000 ],
|
||||
[ self testBigintDiv: 16r1234567812345678123456781234567812345678123456781234567812345678123456781234567812345678 divisor: 16r12345678123456781234567812345678123456781234567812345678 count: 2000 ],
|
||||
[ self testBigintDiv: 16r000089ab0000456700000123 divisor: 1 count: 2000 ],
|
||||
[ self testBigintDiv: 16r000000030000000000008000 divisor: 16r000000010000000000002000 count: 2000 ],
|
||||
[ self testBigintDiv: 16rfffffffe0000000080000000 divisor: 16r0000ffff0000000080000000 count: 12345 ],
|
||||
[ self testBigintDiv: 16rfffffffffffffffe divisor: 16rffffffff count: 2000 ],
|
||||
|
||||
|
||||
## =========================
|
||||
|
Reference in New Issue
Block a user