#include <math-svid-compat.h>
#include <libm-alias-float.h>
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_43)
float
-__sinhf (float x)
+__sinh_compatf (float x)
{
float z = __ieee754_sinhf (x);
if (__builtin_expect (!isfinite (z), 0) && isfinite (x)
return z;
}
-libm_alias_float (__sinh, sinh)
+# ifdef NO_COMPAT_NEEDED
+strong_alias (__sinh_compatf, __sinhf)
+libm_alias_float (__sinh_compat, sinh)
+# else
+compat_symbol (libm, __sinh_compatf, sinhf, GLIBC_2_0);
+# endif
#endif
SOFTWARE.
*/
+#include <errno.h>
#include <math.h>
#include <stdint.h>
#include <libm-alias-finite.h>
+#include <libm-alias-float.h>
+#include <math-svid-compat.h>
#include <math-narrow-eval.h>
#include "math_config.h"
#include "e_sincoshf_data.h"
float
-__ieee754_sinhf (float x)
+__sinhf (float x)
{
static const struct
{
uint32_t ux = asuint (x) << 1;
if (__glibc_unlikely (ux > 0x8565a9f8u))
{ /* |x| >~ 89.4 */
- float sgn = copysignf (2.0f, x);
if (ux >= 0xff000000u)
- {
- if (ux << 8)
- return x + x; /* nan */
- return copysignf (INFINITY, x); /* +-inf */
- }
- float r = math_narrow_eval (sgn * 0x1.fffffep127f);
- return r;
+ return x + x;;
+ return __math_oflowf (x < 0);
}
if (__glibc_unlikely (ux < 0x7c000000u))
{ /* |x| < 0.125 */
}
return ub;
}
+strong_alias (__sinhf, __ieee754_sinhf)
+#if LIBM_SVID_COMPAT
+versioned_symbol (libm, __sinhf, sinhf, GLIBC_2_43);
+libm_alias_float_other (__sinh, sinh)
+#else
+libm_alias_float (__sinh, sinh)
+#endif
libm_alias_finite (__ieee754_sinhf, __sinhf)
--- /dev/null
+/* m68k provides an optimized __ieee754_sinhhf. */
+#ifdef SHARED
+# define NO_COMPAT_NEEDED 1
+# include <math/w_sinhf_compat.c>
+#else
+# include <math-type-macros-float.h>
+# include <w_sinh_template.c>
+#endif