Skip to content
Snippets Groups Projects
Commit 32ad7431 authored by Raymond Toy's avatar Raymond Toy
Browse files

Use fdlibm_setexception to signal appropriate exceptions.

parent 68d2565d
No related branches found
No related tags found
No related merge requests found
......@@ -77,8 +77,8 @@ static double zero = 0.0;
k=0;
if (hx < 0x00100000) { /* x < 2**-1022 */
if (((hx&0x7fffffff)|lx)==0)
return -two54/zero; /* log(+-0)=-inf */
if (hx<0) return (x-x)/zero; /* log(-#) = NaN */
return fdlibm_setexception(-1.0, FDLIBM_DIVIDE_BY_ZERO); /* log(+-0)=-inf */
if (hx<0) return fdlibm_setexception(x-x, FDLIBM_INVALID); /* log(-#) = NaN */
k -= 54; x *= two54; /* subnormal number, scale up x */
ux.d = x;
hx = ux.i[HIWORD];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment