Generate better start values for nth-root#598
Generate better start values for nth-root#598czurnieden wants to merge 2 commits intolibtom:developfrom
Conversation
|
I'm getting a failure with a = 2147483645^23 b = 23. The start value t2 = 2147483634 is too low. |
|
I had the angst-allowance at the wrong place. Should be added to the The number 2147483645^23 is well chosen: I also found an nasty little bug if Thanks for taking a look! |
|
9999999999900000000000000 ^ 1/53 is coming into the loop with t2 = 2. We used to have the comment "Start value must be larger than root" and this isn't true since 2 is the result we're looking for. It doesn't seem to be working right, but with t2=3 it's fine. Sorry for not triaging past that. |
|
Should work now. (famous last words) |
c4a2ee1 to
02af6fb
Compare
- Implementation of a fixed point exp2 function to get better start-values - fixed treatment of perfect powers - fixed 0^(1/x) == 0 with x != 0 - added test for b == 0 (division by zero)
02af6fb to
2a5d8ed
Compare
|
Could it be that I was a little bit behind? ;-) |
This is the implementation I talked about in DCIT/perl-CryptX#123 with @danaj
The runtime is up to standard now.
Needs some work (there is a TODO list at the top of
mp_root_n.c, but mostly chores).