From: N. Brouard Date: Wed, 24 Apr 2024 20:53:06 +0000 (+0000) Subject: Summary: First IMaCh version using praxis method and adapted C code from Gegenfürtner X-Git-Tag: imach-099s7~30 X-Git-Url: https://henry.ined.fr/git/?a=commitdiff_plain;h=4a1123a87e9318ae45e00e60b8dcd1fe5942ef3f;p=.git Summary: First IMaCh version using praxis method and adapted C code from Gegenfürtner --- diff --git a/src/ChangeLog b/src/ChangeLog index 9831c4a..c0b0caa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,60 @@ +2024-04-24 Nicolas Brouard + + * (Module): This version comes late after having tested + successfully the praxis C version of Buckhardt. But Buckardt's + version was difficult to read and Gegenfurtner's version had a few + typos which made its results less reliable than Buckhardt's + results. The most important work consisted in retyping the Brent + original PRAXIS program written in Algol W (published with errors, + ommitting the transposition of matrix V before its QR reduction + from Golub. I used the recent "awe" compiler from Gkynn Webster. + The awe library had errors, for example in arc tangent function + which have been fixed. + + The main objective was to get identical results with the three + versions: (1) Algol W, (2) Buckhardt'C version as well (3) + Gegenfürtner C versions on the various test functions published by + Brent in 1973 in Algol W. + + Also, in order to compare them, the random function had to produce + the same sequence for the 3 softwares. The random function used in + imach corresponds to original Brent's random function written in + Algol W. Other point, in Algol W, the arrays of dimension n are + 'normal' mathematical arrays starting from 1 to n. But this is a + real issue in C where, by default, arrays are starting from 0 to + n-1. In Buckhardt, as well as in Gegenfürtner C code, it can be + seen that authors while trying to mimick original Brent Algol W + code are hesitating by changing either a loop originally from 1 to + n in a loop from 0 to n-1, or keeping Brent's loop from 1 to n and + shifting the index from original X(I) in Algol W to x[i-1] in C. + But as IMaCh is using, since the beginning, the Numerical Recipes + functions vector or matrix, I changed Geggenfürtner code to mimick + the original Algol W arrays. Thus the X(I) is translated in C as + x[i] which minimizes the errors. The Golub QR algorithm was + published in Algol with overflow errors which were reproduced in + Brent's Algol W code. Buckhardt code fixed these errors which are + much more problematic in C than in Algol W. Thus Buckhardt code + seems very safe, but i haven't chosen it for IMaCh because the C + style is horrible and almost unreadable compared to Gegenfürtner + CO code which is very close to Brent's original. Also what makes + Buckhardt code more difficult to read is, instead of passing the + minimum of parameters in the functions calls, as it is in Algol + Brent's code or Gegenfürtner's code, the list of parameters is + high. For example, the flin function LONG REAL PROCEDURE FLIN + (LONG REAL VALUE L) has only one parameter in Algol W, the + Gegenfürtner flin function had two parameters: static double + flin(l, j) double l; { int i; double tflin[N];} but Buckhardt + function has 14 parameters which makes the code unreadable and + useless. Gegenfürtner used a lot of static variables or functions + which I tried to minimize. Also in Gegefürtner, array dimensions + were fixed to N. In my adaptation the flin is static double + flin(double l, int j) and the parameter used are global variables. + +2023-06-14 Nicolas Brouard + + * imach.c (Module): Testing if conjugate gradient could be quicker + when lot of variables POWELLORIGINCONJUGATE + 2023-05-23 Nicolas Brouard * imach.c (Module): Fixed PROB_r