Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Perl & Math: A Quick Reference

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

in reply to Perl & Math: A Quick Reference

I wrote a 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

Comment on Re: Perl & Math: A Quick Reference
Download Code
Re: Re: Perl & Math: A Quick Reference
by chunlou (Curate) on Aug 17, 2003 at 22:54 UTC
    Excellent demonstration of the use of Inline::C as well.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://284429]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (11)
As of 2015-03-30 07:23 GMT
Find Nodes?
    Voting Booth?

    When putting a smiley right before a closing parenthesis, do you:

    Results (633 votes), past polls