-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
#include <math.h>
-#include "math_private.h"
-
+#include <math_private.h>
+#include <float.h>
+#include <libm-alias-finite.h>
long double
__ieee754_exp10l (long double arg)
{
- /* This is a very stupid and inprecise implementation. It'll get
- replaced sometime (soon?). */
- return __ieee754_expl (M_LN10l * arg);
+ if (isfinite (arg) && arg < LDBL_MIN_10_EXP - LDBL_DIG - 10)
+ return LDBL_MIN * LDBL_MIN;
+ else
+ /* This is a very stupid and inprecise implementation. It'll get
+ replaced sometime (soon?). */
+ return __ieee754_expl (M_LN10l * arg);
}
+libm_alias_finite (__ieee754_exp10, __exp10)