libdfp
libdfp copied to clipboard
acoshd64(large) is infinity
The following code fails:
/* Prereq: dnf install libdfp-devel */ #define STDC_WANT_DEC_FP 1 #define STDC_WANT_IEC_60559_DFP_EXT 1
#include <assert.h> #include <math.h>
int main(void){ if(1){ _Decimal64 dfp5 = 9.9999999999999990e+384DD; dfp5 = acoshd64(dfp5); assert( !isinf(dfp5) ); } return 0; }
confirm issue,
_Decimal64 dfp5 = 9.9999999999999990e+384DD;
printf( "dfp5 : %.17DE \n", dfp5 );
dfp5 = acoshd64(dfp5);
/// assert( !isinf(dfp5) );
printf( "dfp5 : %.17DE \n", dfp5 );
here produces:
dfp5 : 9.99999999999999900E+384
dfp5 : INF
should rather be something near 887.18840798326753355 .