Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!apple!agate!shelby!portia.stanford.edu!earthsea.stanford.edu!gyugyi From: gyugyi@earthsea.stanford.edu (Paul Gyugyi) Newsgroups: comp.windows.ms.programmer Subject: Re: Actor: bad numerical precision? Message-ID: <1990Dec5.155643@earthsea.stanford.edu> Date: 5 Dec 90 23:56:43 GMT References: <20060@rouge.usl.edu> Sender: news@portia.Stanford.EDU Reply-To: gyugyi@earthsea.stanford.edu (Paul Gyugyi) Organization: Stanford University Lines: 37 In article <20060@rouge.usl.edu>, pcb@cacs.usl.edu (Peter C. Bahrs) writes: |> Was: arghh! |> |> I just wrote an inverse method for a matrix class using simple row |> reduction. ... |> 1. 3.343434343-e20 1.2323-316 ... |> ???What gives, I am confident the algorithm is correct. It works most |> of the time. But this is a terrible error factor here that will build |> up in time. Is Actor weak in numerical precison? First, check out _Numerical Recipes_ in C to make sure your algorithm is _numerical analysis-wise correct_, not just logically correct. You`re always going to have round off errors due to the finite precision of floats. So the round off errors are something you're going to be stuck with unless you go to an infinite precision package (for example the bc command under unix). The above book is very good in presenting numerically stable algorithms. On the other hand, Actor doesn't support the math coprocessor, so the handling of some of the more obscure IEEE error states (similar to NaN and Inf) won't work for the same reasons the Microsoft math-emulator library doesn't support them. The added precision of using the math coprocessor will still not keep you from your round off errors. Be aware that there are many ways to take a matrix inverse, and row reduction is subject to some of the most rounding errors. Again, _Numerical Recipies in C_ will have a sufficient discussion, but it's one of the reasons the IMSL math libraries became such a standard on large computers. I guess what we really need is an IMSL Math Library DLL for windows. -- Paul Gyugyi gyugyi@earthsea.stanford.edu