| Math-Fortran documentation | Contained in the Math-Fortran distribution. |
Math::Fortran - Perl implimentations of Fortrans sign and log10
use Math::Fortran qw(log10 sign);
$v=log10($x);
$v=sign($y);
$v=sign($x,$y);
This module provides and exports some mathematical functions which are built in in Fortran but not in Perl. Currently there are only 2 included.
$Log: Fortran.pm,v $ Revision 1.1 1995/12/26 09:43:01 willijar Initial revision
I welcome other entries for this module and bug reports.
John A.R. Williams <J.A.R.Williams@aston.ac.uk>
| Math-Fortran documentation | Contained in the Math-Fortran distribution. |
# $Id: Fortran.pm,v 1.1 1995/12/26 09:43:01 willijar Exp $
require Exporter; package Math::Fortran; @ISA=qw(Exporter); @EXPORT_OK=qw(sign log10); use strict; sub log10 { log($_[0])/log(10); } sub sign { my ($a1,$a2)=@_; if (defined $a2) { return $a2>=0 ? abs($a1):-abs($a1); } return $a1>=0 ? +1 : -1; } 1;