logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Math::Libm - Perl extension for the C math library, libm

Author

       Daniel S. Lewart, <d-lewart@uiuc.edu>

Bugs

       Only tested on AIX 4.2, FreeBSD 4.0, Linux 2.2.16, and Solaris 2.5.1.  May need some more functions.

perl v5.40.0                                       2024-10-20                                          Libm(3pm)

Description

       This module is a translation of the C math.h file.  It exports the following selected constants and
       functions.

   EXPORT
       None by default.

   Exportableconstants
         M_1_PI
         M_2_PI
         M_2_SQRTPI
         M_E
         M_LN10
         M_LN2
         M_LOG10E
         M_LOG2E
         M_PI
         M_PI_2
         M_PI_4
         M_SQRT1_2
         M_SQRT2

   Exportablefunctions
         double acos(double x)
         double acosh(double x)
         double asin(double x)
         double asinh(double x)
         double atan(double x)
         double atanh(double x)
         double cbrt(double x)
         double ceil(double x)
         double cosh(double x)
         double erf(double x)
         double erfc(double x)
         double expm1(double x)
         double floor(double x)
         double hypot(double x, double y)
         double j0(double x)
         double j1(double x)
         double jn(int n, double x)
         double lgamma_r(double x, int signgam)
         double log10(double x)
         double log1p(double x)
         double pow(double x, double y)
         double rint(double x)
         double sinh(double x)
         double tan(double x)
         double tanh(double x)
         double y0(double x)
         double y1(double x)
         double yn(int n, double x)

Name

       Math::Libm - Perl extension for the C math library, libm

See Also

       perlfunc, Math::Complex, POSIX.

Synopsis

         use Math::Libm ':all';

         print "e = ", M_E, "\n";
         print "pi/2 = ", M_PI_2, "\n";
         print "erf(1) = ", erf(1), "\n";
         print "hypot(3,4) = ", hypot(3,4), "\n";

         my $signgam = 0;
         my $y = lgamma_r(-0.5, $signgam);
         print "signgam=$signgam lgamma=$y\n";

See Also