![]() |
|
|
#45 | |
|
May 2008
Worcester, United Kingdom
22·7·19 Posts |
Quote:
Would double precision Jenkins-Traub followed by multiple precision root refinement be likely to work? Or are the distinct (non-multiple) roots too close together to be resolved in double precision? |
|
|
|
|
|
|
#46 | |
|
Tribal Bullet
Oct 2004
67258 Posts |
Quote:
I didn't mean to disparage the work you did porting that terrible Fortran code, and even cleaned it up a little bit before giving up trying to make it better. It's just that I don't want to resort to something I can't understand if I can possibly help it. |
|
|
|
|
|
|
#47 | |
|
Oct 2006
vomit_frame_pointer
23×32×5 Posts |
Quote:
But the problem still remains: if I muddle my way through an implementation, will it be understandable enough that it won't be a black box to other developers (i.e.: you)? Another black box would defeat the purpose of having maintainable, comprehensible code. |
|
|
|
|
|
|
#48 | |
|
May 2008
Worcester, United Kingdom
22·7·19 Posts |
Quote:
I didn't publish this code but if anyone wants to use it as a starting point for something better I will be happy to lete them have it. |
|
|
|
|
|
|
#49 | |
|
"Frank <^>"
Dec 2004
CDP Janesville
41128 Posts |
Quote:
|
|
|
|
|
|
|
#50 |
|
May 2008
Worcester, United Kingdom
22×7×19 Posts |
Here it is for those who are brave enough to take a look at it. It is supposed to be a translation of CACM algorithm 493 from Fortran to C but it may well contain conversion errors and really needs checking against the original Fortran. I would appreciate reports if anyone does find any such errors.
There is one subroutine where the logic is difficult to translate into structured code so I have left the original Fortran gotos in place. This is a challenge for those who feel that all gotos should be replaced by structured, transparent and efficient code! Brian Gladman |
|
|
|
|
|
#51 |
|
Nov 2007
3×52 Posts |
At the link below is posted a C++ translation of the FORTRAN routine RPOLY.FOR, which is posted off the NETLIB site as TOMS/493.
http://www.akiti.ca/rpoly_ak1_Intro.html http://math.fullerton.edu/mathews/n2...Bib_lnk_1.html http://www.hvks.com/Numerical/winsolve.htm Last fiddled with by miklin on 2009-04-09 at 17:45 |
|
|
|
|
|
#52 | |
|
Oct 2007
2·53 Posts |
Quote:
http://www.crbond.com/download/misc/rpoly.cpp |
|
|
|
|
|
|
#53 |
|
Mar 2006
1DF16 Posts |
Question... Jason mentioned needing a polynomial solver that can handle polynomials with complex roots. But the algorithm that Brian converted is 493. All the references I've seen online say that 493 is for polys with real coefficients and algorithm 419 is for polys with complex coefficients. And the links recently posted point to the rpoly (real polynomial) fortran code, and not the cpoly (complex polynomial) fortran code. Am I mixing these up? Will either of these work for Jason, or does he need specifically one or the other?
|
|
|
|
|
|
#54 |
|
Tribal Bullet
Oct 2004
1101110101012 Posts |
The specialization in these methods is for polynomials whose coefficients are real numbers, but all the methods (Jenkins-Traub included) can find the complex roots of these polynomials that the code needs.
Some of these rewritings of TOMS493 are actually quite nice. |
|
|
|
|
|
#55 | |
|
May 2008
Worcester, United Kingdom
53210 Posts |
Quote:
![]() The original Fortran code used quad precision but all the conversions I have tried use only double precision. So I am now in the process of reconverting the original Fortran in a way that sllows MPFR to be used to obtain multiple precision FP operations in C. |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Msieve 1.53 feedback | xilman | Msieve | 149 | 2018-11-12 06:37 |
| Msieve 1.50 feedback | firejuggler | Msieve | 99 | 2013-02-17 11:53 |
| Msieve v1.48 feedback | Jeff Gilchrist | Msieve | 48 | 2011-06-10 18:18 |
| Msieve 1.43 feedback | Jeff Gilchrist | Msieve | 47 | 2009-11-24 15:53 |
| Msieve 1.42 feedback | Andi47 | Msieve | 167 | 2009-10-18 19:37 |