comparison libquadmath/math/tanhq.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents 561a7518be6b
children 1830386684a0
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
70 if (ix < 0x40044000) 70 if (ix < 0x40044000)
71 { 71 {
72 if (u.value == 0) 72 if (u.value == 0)
73 return x; /* x == +- 0 */ 73 return x; /* x == +- 0 */
74 if (ix < 0x3fc60000) /* |x| < 2^-57 */ 74 if (ix < 0x3fc60000) /* |x| < 2^-57 */
75 return x * (one + tiny); /* tanh(small) = small */ 75 {
76 math_check_force_underflow (x);
77 return x * (one + tiny); /* tanh(small) = small */
78 }
76 u.words32.w0 = ix; /* Absolute value of x. */ 79 u.words32.w0 = ix; /* Absolute value of x. */
77 if (ix >= 0x3fff0000) 80 if (ix >= 0x3fff0000)
78 { /* |x| >= 1 */ 81 { /* |x| >= 1 */
79 t = expm1q (two * u.value); 82 t = expm1q (two * u.value);
80 z = one - two / (t + two); 83 z = one - two / (t + two);