<?xml version="1.0" encoding="windows-1252"?>
<node id="284429" title="Re: Perl &amp; Math: A Quick Reference" created="2003-08-17 12:57:08" updated="2005-07-07 15:13:34">
<type id="11">
note</type>
<author id="190610">
barrachois</author>
<data>
<field name="doctext">
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.  

&lt;p&gt;

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:

&lt;code&gt;
 use Vector qw(vector);
 my $a = vector( size=&gt;10000, first=&gt;0.0, by=&gt;0.01 );
 my $b = sin($a);
 my $c = $a + $b;
 print $c-&gt;[200];
&lt;/code&gt;

You can find 
the source code, documentation, and a test suite at &lt;a href="http://cs.marlboro.edu/code/perl/modules/Math/Vector/"&gt;http://cs.marlboro.edu/code/perl/modules/Math/Vector/&lt;/a&gt;



</field>
<field name="root_node">
284324</field>
<field name="parent_node">
284324</field>
</data>
</node>
