[q-lang-users] Floating point arithmetics
Brought to you by:
agraef
From: <jir...@bl...> - 2008-01-04 22:13:37
|
Hello Q users, In order to calculate some linear regressions I ported a few routines from the BLAS library to the Q (solving system of linear equations, matrix inversion). Experimenting with this routines I found that calculations are quite imprecise. E.g. inversion of Hilbert matrix (which behaves very badly in this respect) of size of 5 leads to an error of approximately 1e-5. Realizing the same algorithm in Erlang leads to an error of circa 1e-13. Therefore I would like to ask how Q does represent floating point numbers and whether there is some workaround of that. Many thanks, Jiri Spitz |