summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libm/t_ldexp.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-02-23 06:28:41 -0300
committerRenato Botelho <renato@netgate.com>2017-02-23 06:28:41 -0300
commit82ceeb2ea625cd9bff60f2863b9a0830f55b7905 (patch)
tree263ca9347bf664a4489743f9302e699ce14de1df /contrib/netbsd-tests/lib/libm/t_ldexp.c
parent4a05f5440acda223e6a0ec5157bc32ecc0f09ff9 (diff)
parentd20dd8b36e7a565be7bfbb22aade51c8ffd753e9 (diff)
downloadFreeBSD-src-82ceeb2ea625cd9bff60f2863b9a0830f55b7905.zip
FreeBSD-src-82ceeb2ea625cd9bff60f2863b9a0830f55b7905.tar.gz
Merge remote-tracking branch 'origin/stable/10' into develdevel
Diffstat (limited to 'contrib/netbsd-tests/lib/libm/t_ldexp.c')
-rw-r--r--contrib/netbsd-tests/lib/libm/t_ldexp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/netbsd-tests/lib/libm/t_ldexp.c b/contrib/netbsd-tests/lib/libm/t_ldexp.c
index eaf8a4b..251f2ae 100644
--- a/contrib/netbsd-tests/lib/libm/t_ldexp.c
+++ b/contrib/netbsd-tests/lib/libm/t_ldexp.c
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $ */
+/* $NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $");
#include <sys/param.h>
@@ -96,10 +96,12 @@ struct ldexp_test ldexp_overflow[] = {
{ 1.0, 1023, 1, " inf" },
{ 1.0, -1022, 2046, " inf" },
{ 1.0, 1025, SKIP, " inf" },
+ { 2.0, INT_MAX,SKIP, " inf" },
{ -1.0, 1024, SKIP, " -inf" },
{ -1.0, 1023, 1, " -inf" },
{ -1.0, -1022, 2046, " -inf" },
{ -1.0, 1025, SKIP, " -inf" },
+ { -2.0, INT_MAX,SKIP, " -inf" },
{ 0, 0, 0, NULL }
};
@@ -170,10 +172,8 @@ run_test(struct ldexp_test *table)
v = ldexp(table->x, table->exp1);
- if (table->exp2 == SKIP)
- continue;
-
- v = ldexp(v, table->exp2);
+ if (table->exp2 != SKIP)
+ v = ldexp(v, table->exp2);
(void)snprintf(outbuf, sizeof(outbuf), FORMAT, v);
OpenPOWER on IntegriCloud