Skip to content

math: Gamma(x) for -ve half integral values < -170.5 returns +Inf not 0 #11441

@ncw

Description

@ncw

Se here for a demo: http://play.golang.org/p/4npToJjm79

    for i := -100; i >= -200; i-- {
        x := float64(i) - 0.5
        fmt.Printf("gamma(%g) = %g\n", x, math.Gamma(x))
    }

Returns (trimmed)

gamma(-166.5) = -2.7020668623696067e-299
gamma(-167.5) = 1.613174246190816e-301
gamma(-168.5) = -9.573734398758526e-304
gamma(-169.5) = 5.6482208842233304e-306
gamma(-170.5) = -3.3127395215386025e-308
gamma(-171.5) = +Inf
gamma(-172.5) = +Inf
gamma(-173.5) = +Inf
gamma(-174.5) = +Inf
gamma(-175.5) = +Inf

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions