in reply to How can I import previously created math functions?
Here's how to print some erf() values, for instance (a function almost certainly available in your maths library):
perl -le 'use Inline C => q{ double erf(double); }, ENABLE => "AUTOWRA +P"; print "$_ ",erf($_) for (0..5)'
You can of course write it into your modules, and use it to access you own libraries.
Other C wrapping options are XS (of course) and Swig.
|
|---|