mersenneforum.org Calculator that can factor and find exact roots of polynomials
 Register FAQ Search Today's Posts Mark Forums Read

 2019-11-15, 02:40 #12 alpertron     Aug 2002 Buenos Aires, Argentina 22×3×5×23 Posts I've fixed several errors, including the number of digits in groups, a fix on biquadratic equations, now it works on Web browsers that do not support WebAssembly and other minor errors. With respect to the equation mentioned by Dr Sardonicus, I fixed a few errors, but the support from the application is incomplete when the Galois group has order 5. I will continue working on this.
 2019-11-15, 20:13 #13 ewmayer ∂2ω=0     Sep 2002 República de California 2×3×29×67 Posts Thanks, Dario! That works even on my old FF-for-Mac-OS-10.6.8. Was it much work to remove the WebAs dependence? I always say, if you can gain a lot of portability without having to expend inordinate effort, it's worth doing. But then again, I'm an old-timer - I realize much of the New Economy is based on domain fragmentation, getting folks to pay multiple times for what is basically the same thing. :)
2019-11-15, 21:07   #14
alpertron

Aug 2002
Buenos Aires, Argentina

138010 Posts

Quote:
 Originally Posted by ewmayer Thanks, Dario! That works even on my old FF-for-Mac-OS-10.6.8. Was it much work to remove the WebAs dependence? I always say, if you can gain a lot of portability without having to expend inordinate effort, it's worth doing. But then again, I'm an old-timer - I realize much of the New Economy is based on domain fragmentation, getting folks to pay multiple times for what is basically the same thing. :)
Thanks for testing. Actually, it detects whether the Web browser supports WebAssembly or not, so in the second case it uses asm.js (which is a subset of JavaScript that can be executed efficiently in the Web browser).

All my Web applications use WebAssembly because it runs 2 to 3 times faster than asm.js. This is important when you try to factor a big polynomial (or big number in https://www.alpertron.com.ar/ECM.HTM).

Last fiddled with by alpertron on 2019-11-15 at 21:18 Reason: typo

 2020-09-27, 22:47 #15 alpertron     Aug 2002 Buenos Aires, Argentina 101011001002 Posts Hello folks, I have added more features to this calculator at https://www.alpertron.com.ar/POLFACT.HTM Now it quickly factors integer polynomials with degree up to 1000 using Van Hoeij algorithm (which includes LLL), but notice that with some big polynomials it is possible to get an out of memory bounds so the factorization cannot complete. Then it shows the roots of polynomials with degree up to 5 with radicals and trigonometric functions. Notice that the roots of most fifth-degree polynomials cannot be expressed with radicals or trigonometric functions. It also shows the roots of cyclotomic polynomials (x^n - 1 and their divisors) and polynomials of the form ax^n + b and ax^(2n) + bx + c. For example, one of the roots of x^51 - 1 found by this calculator is: x44 = cos(80*pi/51) + i * sin(80*pi/51) = -(1/32)*(-1+17^(1/2)-(34-2*17^(1/2))^(1/2)+2*(17+3*17^(1/2)+(170+38*17^(1/2))^(1/2))^(1/2)) + (1/16)*(3)^(1/2)*(34-2*17^(1/2)-2*(34-2*17^(1/2))^(1/2)+4*(17+3*17^(1/2)-(170+38*17^(1/2))^(1/2))^(1/2))^(1/2)-(i/32)*(3)^(1/2)*(-1+17^(1/2)-(34-2*17^(1/2))^(1/2)+2*(17+3*17^(1/2)+(170+38*17^(1/2))^(1/2))^(1/2))-(i/16)*(34-2*17^(1/2)-2*(34-2*17^(1/2))^(1/2)+4*(17+3*17^(1/2)-(170+38*17^(1/2))^(1/2))^(1/2))^(1/2) I have also added compatibility with screen readers so more people can access it. I tested it with NVDA and Narrator on Windows and Talkback on Android. Please let me know if you find some error.
2020-09-29, 16:02   #16
Dr Sardonicus

Feb 2017
Nowhere

115538 Posts

Quote:
 Originally Posted by alpertron Please let me know if you find some error.
Try factoring the polynomial x^5 - 5.

 2020-09-30, 02:53 #17 alpertron     Aug 2002 Buenos Aires, Argentina 22×3×5×23 Posts The values found by the solver are correct as you can see by unsetting pretty print, and then factoring it again. This is the output of the calculator. Code: R1 = 0 R2 = (15625)^(1/5) R3 = 0 R4 = 0 S1 = (-1+5^(1/2))*(R1 + R4) + (-1-5^(1/2))*(R2 + R3) S2 = (-1+5^(1/2))*(R2 + R3) + (-1-5^(1/2))*(R1 + R4) T1 = (10 + 2 * 5^(1/2))^(1/2)*(R4 - R1) + (10 - 2 * 5^(1/2))^(1/2)*(R3 - R2) T2 = (10 + 2 * 5^(1/2))^(1/2)*(R3 - R2) + (10 - 2 * 5^(1/2))^(1/2)*(R4 - R1) x1 = (R1 + R2 + R3 + R4) / 5 x2 = (S1 + i * T1) / 20 x3 = (S1 - i * T1) / 20 x4 = (S2 + i * T2) / 20 x5 = (S2 - i * T2) / 20 Using Pari, we get: Code: %1 = I (23:47) gp > R1 = 0 %2 = 0 (23:47) gp > R2 = (15625)^(1/5) %3 = 6.8986483073060741619503173210800884643 (23:47) gp > R3 = 0 %4 = 0 (23:47) gp > R4 = 0 %5 = 0 (23:47) gp > S1 = (-1+5^(1/2))*(R1 + R4) + (-1-5^(1/2))*(R2 + R3) %6 = -22.324494875306315076216696369277540320 (23:47) gp > S2 = (-1+5^(1/2))*(R2 + R3) + (-1-5^(1/2))*(R1 + R4) %7 = 8.5271982606941667523160617271173633913 <^(1/2))^(1/2)*(R4 - R1) + (10 - 2 * 5^(1/2))^(1/2)*(R3 - R2) %8 = -16.219694943147773999539440789223925778 <^(1/2))^(1/2)*(R3 - R2) + (10 - 2 * 5^(1/2))^(1/2)*(R4 - R1) %9 = -26.244017705167891715114016211195788877 (23:47) gp > x1 = (R1 + R2 + R3 + R4) / 5 %10 = 1.3797296614612148323900634642160176929 (23:47) gp > x2 = (S1 + i * T1) / 20 %11 = -1.1162247437653157538108348184638770160 - 0.81098474715738869997697203946119628889*I (23:47) gp > x3 = (S1 - i * T1) / 20 %12 = -1.1162247437653157538108348184638770160 + 0.81098474715738869997697203946119628889*I (23:47) gp > x4 = (S2 + i * T2) / 20 %13 = 0.42635991303470833761580308635586816957 - 1.3122008852583945857557008105597894439*I (23:47) gp > x5 = (S2 - i * T2) / 20 %14 = 0.42635991303470833761580308635586816957 + 1.3122008852583945857557008105597894439*I (23:47) gp > f(x)=x^5-5 %15 = (x)->x^5-5 (23:48) gp > f(%11) %16 = -2.350988701644575016 E-38 + 4.701977403289150032 E-38*I (23:48) gp > f(%12) %17 = -2.350988701644575016 E-38 - 4.701977403289150032 E-38*I (23:48) gp > f(%13) %18 = 2.350988701644575016 E-38 - 2.938735877055718770 E-38*I (23:48) gp > f(%14) %19 = 2.350988701644575016 E-38 + 2.938735877055718770 E-38*I (23:48) gp > f(%10) %20 = 4.701977403289150032 E-38 It is clear the some optimization is required in the program to delete the extra zeros so the output is reduced.
 2020-09-30, 03:40 #18 alpertron     Aug 2002 Buenos Aires, Argentina 25448 Posts Now the response of the Web application is shorter for polynomials of the form x5+n (n = integer).
2020-10-01, 12:39   #19
Dr Sardonicus

Feb 2017
Nowhere

3×1,657 Posts

Quote:
 Originally Posted by alpertron The values found by the solver are correct as you can see by unsetting pretty print, and then factoring it again. It is clear the some optimization is required in the program to delete the extra zeros so the output is reduced.
My mistake, I was merely having trouble reading the output. New version with sine/cosine renderings of roots of unity is much easier on my dim old eyes, thanks!

2020-10-01, 12:59   #20
jwaltos

Apr 2012

401 Posts

Quote:
 Originally Posted by alpertron Now the response of the Web application is shorter for polynomials of the form x5+n (n = integer).
Cheers.

Last fiddled with by jwaltos on 2020-10-01 at 13:03

2020-10-01, 15:24   #21
R. Gerbicz

"Robert Gerbicz"
Oct 2005
Hungary

5D516 Posts

Quote:
 Originally Posted by alpertron I have added more features to this calculator at https://www.alpertron.com.ar/POLFACT.HTM Now it quickly factors integer polynomials with degree up to 1000 using Van Hoeij algorithm (which includes LLL), but notice that with some big polynomials it is possible to get an out of memory bounds so the factorization cannot complete. .. Please let me know if you find some error.
There is a bug even in the polynom evaluation part, try for: x*(x+1)-(x+1)
it shows:
−1
Clearly wrong.

2020-10-01, 18:32   #22
alpertron

Aug 2002
Buenos Aires, Argentina

22×3×5×23 Posts

Quote:
 Originally Posted by R. Gerbicz There is a bug even in the polynom evaluation part, try for: x*(x+1)-(x+1) it shows: Your polynomial −1 Clearly wrong.
I've just fixed this error. Please refresh the page so the Web page is dated 1 October 2020 and try again.

 Similar Threads Thread Thread Starter Forum Replies Last Post ONeil Information & Answers 9 2018-04-17 18:18 fivemack Computer Science & Computational Number Theory 2 2015-09-18 12:54 Drdmitry Computer Science & Computational Number Theory 18 2015-09-10 12:23 geoff Factoring 5 2004-09-29 20:14 dsouza123 Software 3 2003-12-11 00:48

All times are UTC. The time now is 08:04.

Sun Oct 17 08:04:26 UTC 2021 up 86 days, 2:33, 0 users, load averages: 1.46, 1.63, 1.51