From help-request at octave dot org Thu Jan 5 19:50:07 2006 Subject: Re: rational numbers only From: Paul Kienzle To: "John W. Eaton" Cc: help at octave dot org, Jordi Gutierrez Hermoso Date: Thu, 5 Jan 2006 20:48:27 -0500 On Jan 5, 2006, at 4:46 PM, John W. Eaton wrote: > On 5-Jan-2006, Jordi Gutierrez Hermoso wrote: > > | On 1/5/06, Jorge Barros de Abreu wrote: > | > Hi. > | > > | > ?????Which the variable name that force maxima to work with > ratonal numbers > | > only??? > | > | Octave really isn't built for that kind of operations. There are > | functions that do it as other people in this thread have mentioned, > | but if you want a symbolic calculator, you're better off using a > | dedicated CAS like Maxima or YACAS. > > You could also write a new user-defined data type for rational > numbers. Simple arithmetic for scalars and maybe even matrices would > not be too hard. But unless there are existing libraries for other > operations, it would be a lot of work to get something like svd of a > rational matrix working (if that would even make sense). tnt+jama provide template based SVD, QR, LU, EIG and CHOL. I had to do some mods to make it accept 100 digit floats, but these should also work for a rational type. Anyone who wants to work on this (e.g., for vpa support) should let me know and I can send the patches. - Paul ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------