Blame math/w_expl_compat.c

Packit 6c4009
/* w_expl.c -- long double version of w_exp.c.
Packit 6c4009
 * Conversion to long double by Ulrich Drepper,
Packit 6c4009
 * Cygnus Support, drepper@cygnus.com.
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * ====================================================
Packit 6c4009
 * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
Packit 6c4009
 *
Packit 6c4009
 * Developed at SunPro, a Sun Microsystems, Inc. business.
Packit 6c4009
 * Permission to use, copy, modify, and distribute this
Packit 6c4009
 * software is freely granted, provided that this notice
Packit 6c4009
 * is preserved.
Packit 6c4009
 * ====================================================
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
#if defined(LIBM_SCCS) && !defined(lint)
Packit 6c4009
static char rcsid[] = "$NetBSD: $";
Packit 6c4009
#endif
Packit 6c4009
Packit 6c4009
/*
Packit 6c4009
 * wrapper expl(x)
Packit 6c4009
 */
Packit 6c4009
Packit 6c4009
#include <math.h>
Packit 6c4009
#include <math_private.h>
Packit 6c4009
#include <math-svid-compat.h>
Packit 6c4009
#include <libm-alias-ldouble.h>
Packit 6c4009
Packit 6c4009
#if LIBM_SVID_COMPAT
Packit 6c4009
long double __expl(long double x)	/* wrapper exp */
Packit 6c4009
{
Packit 6c4009
# ifdef _IEEE_LIBM
Packit 6c4009
	return __ieee754_expl(x);
Packit 6c4009
# else
Packit 6c4009
	long double z = __ieee754_expl (x);
Packit 6c4009
	if (__glibc_unlikely (!isfinite (z) || z == 0)
Packit 6c4009
	    && isfinite (x) && _LIB_VERSION != _IEEE_)
Packit 6c4009
	  return __kernel_standard_l (x, x, 206 + !!signbit (x));
Packit 6c4009
Packit 6c4009
	return z;
Packit 6c4009
# endif
Packit 6c4009
}
Packit 6c4009
libm_hidden_def (__expl)
Packit 6c4009
libm_alias_ldouble (__exp, exp)
Packit 6c4009
#endif