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

Re: Perl & Math: A Quick Reference

by barrachois (Pilgrim)
on Aug 17, 2003 at 12:57 UTC ( [id://284429]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Perl & Math: A Quick Reference

I wrote a Vector.pm module when I was exploring how to do perl math with Inline::C, which might be a useful example for people thinking of going that route.

While I didn't try to put in more than the basics, it does let you create and work with big vectors of doubles, like this:

use Vector qw(vector); my $a = vector( size=>10000, first=>0.0, by=>0.01 ); my $b = sin($a); my $c = $a + $b; print $c->[200];
You can find the source code, documentation, and a test suite at http://cs.marlboro.edu/code/perl/modules/Math/Vector/

Replies are listed 'Best First'.
Re: Re: Perl & Math: A Quick Reference
by chunlou (Curate) on Aug 17, 2003 at 18:54 UTC
    Excellent demonstration of the use of Inline::C as well.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://284429]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.