Deleted Added
full compact
test-logarithm.c (216214) test-logarithm.c (216222)
1/*-
2 * Copyright (c) 2008-2010 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 log*().
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008-2010 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 log*().
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/tools/regression/lib/msun/test-logarithm.c 216214 2010-12-05 22:18:35Z das $");
32__FBSDID("$FreeBSD: head/tools/regression/lib/msun/test-logarithm.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__

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

85/*
86 * Determine whether x and y are equal, with two special rules:
87 * +0.0 != -0.0
88 * NaN == NaN
89 */
90int
91fpequal(long double x, long double y)
92{
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__

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

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

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

--- 57 unchanged lines hidden ---