⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 math::trig.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
📖 第 1 页 / 共 2 页
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...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...\" Set up some character translations and predefined strings.  \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote.  \*(C+ will.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\.    ds -- \(*W-.    ds PI pi.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch.    ds L" "".    ds R" "".    ds C` "".    ds C' ""'br\}.el\{\.    ds -- \|\(em\|.    ds PI \(*p.    ds L" ``.    ds R" '''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 turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD.  Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\.    de IX.    tm Index:\\$1\t\\n%\t"\\$2"...    nr % 0.    rr F.\}.el \{\.    de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear.  Run.  Save yourself.  No user-serviceable parts..    \" fudge factors for nroff and troff.if n \{\.    ds #H 0.    ds #V .8m.    ds #F .3m.    ds #[ \f1.    ds #] \fP.\}.if t \{\.    ds #H ((1u-(\\\\n(.fu%2u))*.13m).    ds #V .6m.    ds #F 0.    ds #[ \&.    ds #] \&.\}.    \" simple accents for nroff and troff.if n \{\.    ds ' \&.    ds ` \&.    ds ^ \&.    ds , \&.    ds ~ ~.    ds /.\}.if t \{\.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u".    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}.    \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E.    \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'.    \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\.    ds : e.    ds 8 ss.    ds o a.    ds d- d\h'-1'\(ga.    ds D- D\h'-1'\(hy.    ds th \o'bp'.    ds Th \o'LP'.    ds ae ae.    ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "Math::Trig 3".TH Math::Trig 3 "2007-12-18" "perl v5.10.0" "Perl Programmers Reference Guide".\" 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::Trig \- trigonometric functions.SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 1\&    use Math::Trig;\&\&    $x = tan(0.9);\&    $y = acos(3.7);\&    $z = asin(2.4);\&\&    $halfpi = pi/2;\&\&    $rad = deg2rad(120);\&\&    # Import constants pi2, pip2, pip4 (2*pi, pi/2, pi/4).\&    use Math::Trig \*(Aq:pi\*(Aq;\&\&    # Import the conversions between cartesian/spherical/cylindrical.\&    use Math::Trig \*(Aq:radial\*(Aq;\&\&        # Import the great circle formulas.\&    use Math::Trig \*(Aq:great_circle\*(Aq;.Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"\&\f(CW\*(C`Math::Trig\*(C'\fR defines many trigonometric functions not defined by thecore Perl which defines only the \f(CW\*(C`sin()\*(C'\fR and \f(CW\*(C`cos()\*(C'\fR.  The constant\&\fBpi\fR is also defined as are a few convenience functions for angleconversions, and \fIgreat circle formulas\fR for spherical movement..SH "TRIGONOMETRIC FUNCTIONS".IX Header "TRIGONOMETRIC FUNCTIONS"The tangent.IP "\fBtan\fR" 4.IX Item "tan".PPThe cofunctions of the sine, cosine, and tangent (cosec/csc and cotan/cotare aliases).PP\&\fBcsc\fR, \fBcosec\fR, \fBsec\fR, \fBsec\fR, \fBcot\fR, \fBcotan\fR.PPThe arcus (also known as the inverse) functions of the sine, cosine,and tangent.PP\&\fBasin\fR, \fBacos\fR, \fBatan\fR.PPThe principal value of the arc tangent of y/x.PP\&\fBatan2\fR(y, x).PPThe arcus cofunctions of the sine, cosine, and tangent (acosec/acscand acotan/acot are aliases).  Note that atan2(0, 0) is not well-defined..PP\&\fBacsc\fR, \fBacosec\fR, \fBasec\fR, \fBacot\fR, \fBacotan\fR.PPThe hyperbolic sine, cosine, and tangent.PP\&\fBsinh\fR, \fBcosh\fR, \fBtanh\fR.PPThe cofunctions of the hyperbolic sine, cosine, and tangent (cosech/cschand cotanh/coth are aliases).PP\&\fBcsch\fR, \fBcosech\fR, \fBsech\fR, \fBcoth\fR, \fBcotanh\fR.PPThe arcus (also known as the inverse) functions of the hyperbolicsine, cosine, and tangent.PP\&\fBasinh\fR, \fBacosh\fR, \fBatanh\fR.PPThe arcus cofunctions of the hyperbolic sine, cosine, and tangent(acsch/acosech and acoth/acotanh are aliases).PP\&\fBacsch\fR, \fBacosech\fR, \fBasech\fR, \fBacoth\fR, \fBacotanh\fR.PPThe trigonometric constant \fBpi\fR and some of handy multiplesof it are also defined..PP\&\fBpi, pi2, pi4, pip2, pip4\fR.Sh "\s-1ERRORS\s0 \s-1DUE\s0 \s-1TO\s0 \s-1DIVISION\s0 \s-1BY\s0 \s-1ZERO\s0".IX Subsection "ERRORS DUE TO DIVISION BY ZERO"The following functions.PP.Vb 10\&    acoth\&    acsc\&    acsch\&    asec\&    asech\&    atanh\&    cot\&    coth\&    csc\&    csch\&    sec\&    sech\&    tan\&    tanh.Ve.PPcannot be computed for all arguments because that would mean dividingby zero or taking logarithm of zero. These situations cause fatalruntime errors looking like this.PP.Vb 3\&    cot(0): Division by zero.\&    (Because in the definition of cot(0), the divisor sin(0) is 0)\&    Died at ....Ve.PPor.PP.Vb 2\&    atanh(\-1): Logarithm of zero.\&    Died at....Ve.PPFor the \f(CW\*(C`csc\*(C'\fR, \f(CW\*(C`cot\*(C'\fR, \f(CW\*(C`asec\*(C'\fR, \f(CW\*(C`acsc\*(C'\fR, \f(CW\*(C`acot\*(C'\fR, \f(CW\*(C`csch\*(C'\fR, \f(CW\*(C`coth\*(C'\fR,\&\f(CW\*(C`asech\*(C'\fR, \f(CW\*(C`acsch\*(C'\fR, the argument cannot be \f(CW0\fR (zero).  For the\&\f(CW\*(C`atanh\*(C'\fR, \f(CW\*(C`acoth\*(C'\fR, the argument cannot be \f(CW1\fR (one).  For the\&\f(CW\*(C`atanh\*(C'\fR, \f(CW\*(C`acoth\*(C'\fR, the argument cannot be \f(CW\*(C`\-1\*(C'\fR (minus one).  For the\&\f(CW\*(C`tan\*(C'\fR, \f(CW\*(C`sec\*(C'\fR, \f(CW\*(C`tanh\*(C'\fR, \f(CW\*(C`sech\*(C'\fR, the argument cannot be \fIpi/2 + k *pi\fR, where \fIk\fR is any integer..PPNote that atan2(0, 0) is not well-defined..Sh "\s-1SIMPLE\s0 (\s-1REAL\s0) \s-1ARGUMENTS\s0, \s-1COMPLEX\s0 \s-1RESULTS\s0".IX Subsection "SIMPLE (REAL) ARGUMENTS, COMPLEX RESULTS"Please note that some of the trigonometric functions can break outfrom the \fBreal axis\fR into the \fBcomplex plane\fR. For example\&\f(CWasin(2)\fR has no definition for plain real numbers but it hasdefinition for complex numbers..PPIn Perl terms this means that supplying the usual Perl numbers (alsoknown as scalars, please see perldata) as input for thetrigonometric functions might produce as output results that no moreare simple real numbers: instead they are complex numbers..PPThe \f(CW\*(C`Math::Trig\*(C'\fR handles this by using the \f(CW\*(C`Math::Complex\*(C'\fR packagewhich knows how to handle complex numbers, please see Math::Complexfor more information. In practice you need not to worry about gettingcomplex numbers as results because the \f(CW\*(C`Math::Complex\*(C'\fR takes care ofdetails like for example how to display complex numbers. For example:.PP.Vb 1\&    print asin(2), "\en";.Ve.PPshould produce something like this (take or leave few last decimals):.PP.Vb 1\&    1.5707963267949\-1.31695789692482i.Ve.PPThat is, a complex number with the real part of approximately \f(CW1.571\fRand the imaginary part of approximately \f(CW\*(C`\-1.317\*(C'\fR..SH "PLANE ANGLE CONVERSIONS".IX Header "PLANE ANGLE CONVERSIONS"(Plane, 2\-dimensional) angles may be converted with the following functions..IP "deg2rad" 4.IX Item "deg2rad".Vb 1\&    $radians  = deg2rad($degrees);.Ve.IP "grad2rad" 4.IX Item "grad2rad".Vb 1\&    $radians  = grad2rad($gradians);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -