Deleted Added
full compact
test-exponential.c (176375) test-exponential.c (216222)
1/*-
2 * Copyright (c) 2008 David Schultz <das@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * SUCH DAMAGE.
25 */
26
27/*
28 * Tests for corner cases in exp*().
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 David Schultz <das@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * SUCH DAMAGE.
25 */
26
27/*
28 * Tests for corner cases in exp*().
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/tools/regression/lib/msun/test-exponential.c 176375 2008-02-17 22:45:53Z das $");
32__FBSDID("$FreeBSD: head/tools/regression/lib/msun/test-exponential.c 216222 2010-12-06 00:02:49Z das $");
33
34#include <assert.h>
35#include <fenv.h>
36#include <float.h>
37#include <math.h>
38#include <stdio.h>
39
40#ifdef __i386__

--- 43 unchanged lines hidden (view full) ---

84/*
85 * Determine whether x and y are equal, with two special rules:
86 * +0.0 != -0.0
87 * NaN == NaN
88 */
89int
90fpequal(long double x, long double y)
91{
33
34#include <assert.h>
35#include <fenv.h>
36#include <float.h>
37#include <math.h>
38#include <stdio.h>
39
40#ifdef __i386__

--- 43 unchanged lines hidden (view full) ---

84/*
85 * Determine whether x and y are equal, with two special rules:
86 * +0.0 != -0.0
87 * NaN == NaN
88 */
89int
90fpequal(long double x, long double y)
91{
92 return ((x == y && signbit(x) == signbit(y)) || isnan(x) && isnan(y));
92 return ((x == y && !signbit(x) == !signbit(y)) || isnan(x) && isnan(y));
93}
94
95void
96run_generic_tests(void)
97{
98
99 /* exp(0) == 1, no exceptions raised */
100 testall0(0.0, 1.0, ALL_STD_EXCEPT, 0);

--- 70 unchanged lines hidden ---
93}
94
95void
96run_generic_tests(void)
97{
98
99 /* exp(0) == 1, no exceptions raised */
100 testall0(0.0, 1.0, ALL_STD_EXCEPT, 0);

--- 70 unchanged lines hidden ---