JuliaMath / openlibm

High quality system independent, portable, open source libm implementation

Home Page:https://openlibm.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lgamma(-n) for n = 0, 1, 2, .. does not raise FE_DIVBYZERO.

kargl opened this issue · comments

commented

Tests with olibm:
lgammaf( 1) = 0. Got no exception. Expected 0 without exception.
lgammaf( 2) = 0. Got no exception. Expected 0 without exception.
lgammaf( 0) = inf. Got no exception. Expected inf with FE_DIVBYZERO.
lgammaf(-0) = inf. Got no exception. Expected inf with FE_DIVBYZERO.
lgammaf(-1) = inf. Got no exception. Expected inf with FE_DIVBYZERO.

Tests with FreeBSD libm.
lgammaf( 1) = 0. Got no exception. Expected 0 without exception.
lgammaf( 2) = 0. Got no exception. Expected 0 without exception.
lgammaf( 0) = inf. Got FE_DIVBYZERO. Expected inf with FE_DIVBYZERO.
lgammaf(-0) = inf. Got FE_DIVBYZERO. Expected inf with FE_DIVBYZERO.
lgammaf(-1) = inf. Got FE_DIVBYZERO. Expected inf with FE_DIVBYZERO.

commented

Note, lgammal(-n) correctly raises the FE_DIVBYZERO exception. lgammaf and lgamma have issues.

This hasn't yet been fixed