Mail Archives: djgpp/1999/05/29/17:46:35
but the system is rather simple:
|20 40 10| |20|
|30 10 10| |x| |18|
|10 10 15| times |y| = |12|
|25 20 40| |z| |30|
|15 20 25| |20|
(look below for a latex-version)
I had sometime written the system and the way to get the solutions in
LaTeX2e.
so if you've got LaTeX, you can download the document @
http://www.ndh.net/home/natter/example.tex
(it's in German, look for 'Aufgabe 1')
the thing is that when you solve this system using Gaussian
Elimination, all the factors by which you scale the 'rows' are
rational numbers. the most "complicated" fraction by which you
multiply is probably -1/11 - would this bring the accuracy of a double
to its knees.
Would you recommend that I always use arbitrary precision math for
such algorithms ? (I don't think the idea to set anything to zero if
|x| < SMALL_NUMBER, as this would make the algorithm unusable for
other systems.
Felix Natter
On Sat, 29 May 1999 11:48:03 GMT, XXguille AT XXiies DOT XXes (Guillermo
Rodriguez Garcia) wrote:
>El día Fri, 28 May 1999 18:22:17 GMT, f DOT natter AT ndh DOT net (Felix Natter)
>escribió:
>
>>solution (in this code it's .2, .4, .2), there will be a math
>>inaccuracy: where an entry should have been reduced to 0.0, it becomes
>>something*10^(-15), resulting in the algorithm continuing and giving a
>
>There is a limit on the 'double' accuracy (this doesn't only happen in
>DJGPP; every C compiler will have the same problem), so if you are not
>using some arbitrary-precision math library (gnu has one), that is, if
>you are using the standard double type and the standard math.h, just
>check the values you get and interpret those below a given threshold
>as zero.
>
>Regards:
>GUILLE
>----
>Guillermo Rodriguez Garcia
>XXguille AT XXiies DOT XXes (ya sabes :-)
- Raw text -