Sha256: d54f051c6799e1c1646d2b5391f68728627d47643f3705ae3983844f201c8b18

Contents?: true

Size: 1.79 KB

Versions: 12

Compression:

Stored size: 1.79 KB

Contents

o:$YARD::CodeObjects::MethodObject:@scope:
class:@visibility:public:
@pathI"Math.lgamma:EF:@parameters[:@files[[I"math.c;T0:@current_file_has_commentsF:
@name:lgamma:@source_type:c:
@tags[:@docstringIC:YARD::Docstring"ÌCalculates the logarithmic gamma of x and
 the sign of gamma of x.

 Math.lgamma(x) is same as
  [Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1]
 but avoid overflow by Math.gamma(x) for large x.;F:@objectIu:YARD::StubProxyMath.lgamma;F:
@summary0:@ref_tags[;[o:YARD::Tags::OverloadTag
:@tag_nameI"
overload;F:
@text0;;:@types0:@signatureI"lgamma(x);F;IC;";F;Iu;Math.lgamma;F;0;[;[o:YARD::Tags::Tag
;I"return;F;I"];F;0;[I"
Array;FI"-1;FI"1;F;0:	@allI"@return [Array,  -1, 1]];F;[[:x0;Iu;Math.lgamma;F; I"þ Calculates the logarithmic gamma of x and
 the sign of gamma of x.

 Math.lgamma(x) is same as
  [Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1]
 but avoid overflow by Math.gamma(x) for large x.


@overload lgamma(x)
  @return [Array,  -1, 1]];F:@namespaceIu;	Math;F:@docstring_extra0:@sourceI"ª/*
 * call-seq:
 *    Math.lgamma(x)  -> [float, -1 or 1]
 *
 *  Calculates the logarithmic gamma of x and
 *  the sign of gamma of x.
 *
 *  Math.lgamma(x) is same as
 *   [Math.log(Math.gamma(x).abs), Math.gamma(x) < 0 ? -1 : 1]
 *  but avoid overflow by Math.gamma(x) for large x.
 */

static VALUE
math_lgamma(VALUE obj, VALUE x)
{
    double d0, d;
    int sign=1;
    VALUE v;
    Need_Float(x);
    d0 = RFLOAT_VALUE(x);
    /* check for domain error */
    if (isinf(d0)) {
    if (signbit(d0)) domain_error("lgamma");
    return rb_assoc_new(DBL2NUM(INFINITY), INT2FIX(1));
    }
    d = lgamma_r(d0, &sign);
    v = DBL2NUM(d);
    return rb_assoc_new(v, INT2FIX(sign));
};F

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_19/objects/Math/lgamma_c.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_19/objects/Math/lgamma_c.dat