Math-Cephes

 view release on metacpan or  search on metacpan

pmath  view on Meta::CPAN


 # int k, n;
 # double p, y, nbdtri();

 $p = nbdtri( $k, $n, $y );

 DESCRIPTION:

 Finds the argument p such that nbdtr(k,n,p) is equal to y.

 ',
          'yn' => 'yn:  Bessel function of second kind of integer order

SYNOPSIS:

 # double x, y, yn();
 # int n;

 $y = yn( $n, $x );

DESCRIPTION:

 Returns Bessel function of order n, where n is a
 (possibly negative) integer.

 The function is evaluated by forward recurrence on
 n, starting with values computed by the routines
 y0() and y1().

 If n = 0 or 1 the routine for y0 or y1 is called
 directly.

',
          'igami' => 'igami:  Inverse of complemented imcomplete gamma integral

SYNOPSIS:

 # double a, x, p, igami();

 $x = igami( $a, $p );

 DESCRIPTION:

 Given p, the function finds x such that

  igamc( a, x ) = p.

 Starting with the approximate value

         3
  x = a t

  where

  t = 1 - d - ndtri(p) sqrt(d)
 
 and

  d = 1/9a,

 the routine performs up to 10 Newton iterations to find the
 root of igamc(a,x) - p = 0.

 ',
          'catan' => 'catan:  Complex circular arc tangent

SYNOPSIS:

 # void catan();
 # cmplx z, w;

 $z = cmplx(2, 3);    # $z = 2 + 3 i
 $w = $z->catan;
 print $w->{r}, \'  \', $w->{i};  # prints real and imaginary parts of $w
 print $w->as_string;                 # prints $w as Re(w) + i Im(w)

 DESCRIPTION:

 If
     z = x + iy,

 then
          1       (    2x     )
 Re w  =  - arctan(-----------)  +  k PI
          2       (     2    2)
                  (1 - x  - y )

               ( 2         2)
          1    (x  +  (y+1) )
 Im w  =  - log(------------)
          4    ( 2         2)
               (x  +  (y-1) )

 Where k is an arbitrary integer.

',
          'atanh' => 'atanh:  Inverse hyperbolic tangent

SYNOPSIS:

 # double x, y, atanh();

 $y = atanh( $x );

DESCRIPTION:

 Returns inverse hyperbolic tangent of argument in the range
 MINLOG to MAXLOG.

 If |x| < 0.5, the rational form x + x**3 P(x)/Q(x) is
 employed.  Otherwise,
        atanh(x) = 0.5 * log( (1+x)/(1-x) ).

',
          'yv' => 'yv:  Bessel function Yv with noninteger v

SYNOPSIS:

 # double v, x;

 # double yv( v, x );

pmath  view on Meta::CPAN

SYNOPSIS:

 # double x, y, erfc();

 $y = erfc( $x );

DESCRIPTION:

  1 - erf(x) =

                           inf. 
                             -
                  2         | |          2
   erfc(x)  =  --------     |    exp( - t  ) dt
               sqrt(pi)   | |
                           -
                            x

 For small x, erfc(x) = 1 - erf(x); otherwise rational
 approximations are computed.

',
          'gamma' => 'gamma:  Gamma function

SYNOPSIS:

 # double x, y, gamma();
 # extern int sgngam;

 $y = gamma( $x );

DESCRIPTION:

 Returns gamma function of the argument.  The result is
 correctly signed, and the sign (+1 or -1) is also
 returned in a global (extern) variable named sgngam.
 This variable is also filled in by the logarithmic gamma
 function lgam().

 Arguments |x| <= 34 are reduced by recurrence and the function
 approximated by a rational function of degree 6/7 in the
 interval (2,3).  Large arguments are handled by Stirling\'s
 formula. Large negative arguments are made positive using
 a reflection formula.  

 ',
          'incbi' => 'incbi:  Inverse of imcomplete beta integral

SYNOPSIS:

 # double a, b, x, y, incbi();

 $x = incbi( $a, $b, $y );

DESCRIPTION:

 Given y, the function finds x such that

  incbet( a, b, x ) = y .

 The routine performs interval halving or Newton iterations to find the
 root of incbet(a,b,x) - y = 0.

 ',
          'round' => 'round:  Round double to nearest or even integer valued double

SYNOPSIS:

 # double x, y, round();

 $y = round( $x );

DESCRIPTION:

 Returns the nearest integer to x as a double precision
 floating point result.  If x ends in 0.5 exactly, the
 nearest even integer is chosen.
 

 ',
          'drand' => 'drand:  Pseudorandom number generator

SYNOPSIS:

 # double y, drand();

 ($flag, $y) = drand( );

DESCRIPTION:

 Yields a random number 1.0 <= y < 2.0.

 The three-generator congruential algorithm by Brian
 Wichmann and David Hill (BYTE magazine, March, 1987,
 pp 127-8) is used. The period, given by them, is
 6953607871644.

 Versions invoked by the different arithmetic compile
 time options DEC, IBMPC, and MIEEE, produce
 approximately the same sequences, differing only in the
 least significant bits of the numbers. The UNK option
 implements the algorithm as recommended in the BYTE
 article.  It may be used on all computers. However,
 the low order bits of a double precision number may
 not be adequately random, and may vary due to arithmetic
 implementation details on different computers.

 The other compile options generate an additional random
 integer that overwrites the low order bits of the double
 precision number.  This reduces the period by a factor of
 two but tends to overcome the problems mentioned.



',
          'y0' => 'y0:  Bessel function of the second kind, order zero

SYNOPSIS:

 # double x, y, y0();



( run in 1.099 second using v1.01-cache-2.11-cpan-71847e10f99 )