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:37:07 -0300
committerRenato Botelho <renato@netgate.com>2017-02-23 06:37:07 -0300
commit4ef888db25896b2295f521c736ef04aa2e5e64ec (patch)
tree3fcc00dda536bd32ae85bc09f21be4081d32bad5 /contrib/netbsd-tests/lib/libm/t_ldexp.c
parent272ffd7c3e4e5e27910eb918e2e36556f2a8ec3a (diff)
parentaf015c5bcac0e333adeec07eff0698bad3b91e95 (diff)
downloadFreeBSD-src-4ef888db25896b2295f521c736ef04aa2e5e64ec.zip
FreeBSD-src-4ef888db25896b2295f521c736ef04aa2e5e64ec.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
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