openlibm icon indicating copy to clipboard operation
openlibm copied to clipboard

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

Open kargl opened this issue 5 years ago • 2 comments

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.

kargl avatar Mar 13 '20 22:03 kargl

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

kargl avatar Mar 13 '20 22:03 kargl

This hasn't yet been fixed

oscardssmith avatar May 31 '22 15:05 oscardssmith