From: "M. Edward (Ed) Borasky" Date: 2006-08-08T13:48:21+09:00 Subject: Re: Profiling Ruby Matrix operations Christian Neukirchen wrote: > "M. Edward (Ed) Borasky" writes: > > >> This is the sort of code I'd *like* to write in pure Ruby, rather than >> having to call a C library for efficiency. The matrix I generated is >> quite ill-conditioned. It's quite possible that a "standard" floating >> point numerical determinant or matrix inversion routine would choke on >> it, while the combination of "matrix", "mathn" and "rational" I used >> had no problem with it. In short, I'm willing to pay for rational >> arithmetic and correct results, but not for an inefficient >> interpreter. :) So if someone is going to rewrite Matrix in C, they >> need to do the underlying arithmetic too. >> > > Tried NArray? > > Not yet ... right now I'm chasing something I think is much better. Apparently there is a SWIG wrapper for GiNaC that generates Python bindings for it. It can't be very difficult to port that to Ruby, and GiNaC will do everything I want to do and is pretty efficient C++ code. So that's the rabbit I'm currently chasing ... I definitely need mixed symbolic and numeric computation capabilities and high-precision arithmetic. GiNaC does that with "CLN". Stay tuned ... :)