.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Libm 3pm" .TH Libm 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Math::Libm \- Perl extension for the C math library, libm .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 1 \& use Math::Libm \*(Aq:all\*(Aq; \& \& print "e = ", M_E, "\en"; \& print "pi/2 = ", M_PI_2, "\en"; \& print "erf(1) = ", erf(1), "\en"; \& print "hypot(3,4) = ", hypot(3,4), "\en"; \& \& my $signgam = 0; \& my $y = lgamma_r(\-0.5, $signgam); \& print "signgam=$signgam lgamma=$y\en"; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" This module is a translation of the C \fImath.h\fR file. It exports the following selected constants and functions. .SS EXPORT .IX Subsection "EXPORT" None by default. .SS "Exportable constants" .IX Subsection "Exportable constants" .Vb 10 \& 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 .Ve .SS "Exportable functions" .IX Subsection "Exportable functions" .Vb 10 \& 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) .Ve .SH AUTHOR .IX Header "AUTHOR" Daniel S. Lewart, .SH "SEE ALSO" .IX Header "SEE ALSO" perlfunc, Math::Complex, POSIX. .SH BUGS .IX Header "BUGS" Only tested on AIX 4.2, FreeBSD 4.0, Linux 2.2.16, and Solaris 2.5.1. May need some more functions.