Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Is there a Matrix module that supports BigFloat?

by metadoktor (Hermit)
on May 17, 2002 at 10:50 UTC ( #167267=perlquestion: print w/replies, xml ) Need Help??

metadoktor has asked for the wisdom of the Perl Monks concerning the following question:

I need a Matrix module that uses Math::BigFloat or does something similar to it. Math::Matrix, Math::MatrixReal and PDL::Matrix do not appear to do this. Basically I need a large amount of accuracy and precision in a Matrix datatype.

Btw, I have looked into the Matlab-like Octave (non-Perl) and that also seems to choke on my data.

metadoktor

"The doktor is in."

  • Comment on Is there a Matrix module that supports BigFloat?

Replies are listed 'Best First'.
Re: Is there a Matrix module that supports BigFloat?
by thor (Priest) on May 17, 2002 at 12:33 UTC
    Can you factor out a small number, say 1e-6 or something? This will help the values in your matrix stay "large" (for certain values of large). You can re-factor in the 1e-6 after you have done your matrix calculations. Also, what are you doing with the matricies? If you are attempting to do anything even remotely large or complex(numerical analysis for instance), then matlab is your tool, not perl. Matlab is optimized to handle matricies. You want an LDU decomposition? BAM! It's there. Eigenvalues/eigenvectores? You got it. The list goes on.
      Can you factor out a small number, say 1e-6 or something?

      No, there aren't any small numbers. They are all very big with a large number of significant digits.

      I already know about Matlab (and the version 4.0? compatible one called GNU Octave) but I don't want to shell out cash for something that I might only use a few times besides if I have to I will write a program that will solve the set of simultaneous equations using Math::BigFloat.

      Also, what are you doing with the matrices?

      Solving a set of simultaneous equations with very large coefficients that have a large number of significant digits.

      metadoktor

      "The doktor is in."

Re: Is there a Matrix module that supports BigFloat?
by jepri (Parson) on May 17, 2002 at 15:51 UTC
    Have a look at SciLab. It's an almost exact clone of Matlab - to the point where I did a math course which required matlab, only I used scilab. When submitting my code all I had to change was the comment symbol and the function parameters were back to front. Even the function names are the same.. All your old friends are there, like plot, plot2d and plot3d, as well as some useful expansion toolboxes.

    It goes without saying that it does matrixes very well.

    If you really want a perl solution, there are some CPAN modules called PDL that are apparently as powerful as matlab - the learning curve was too steep for me.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

      Have a look at SciLab

      Thank you. I will look for SciLab.

      there are some CPAN modules called PDL that are apparently

      Yes, I know. I pointed out PDL::Matrix in my post. The documentation for the module doesn't seem to indicate that it handles very large numbers.

      metadoktor

      "The doktor is in."

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://167267]
Approved by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2019-07-19 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?