Deleted Added
full compact
test-invtrig.c (181206) test-invtrig.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

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

26
27/*
28 * Tests for corner cases in the inverse trigonometric functions. Some
29 * accuracy tests are included as well, but these are very basic
30 * sanity checks, not intended to be comprehensive.
31 */
32
33#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

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

26
27/*
28 * Tests for corner cases in the inverse trigonometric functions. Some
29 * accuracy tests are included as well, but these are very basic
30 * sanity checks, not intended to be comprehensive.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/tools/regression/lib/msun/test-invtrig.c 181206 2008-08-02 19:21:33Z das $");
34__FBSDID("$FreeBSD: head/tools/regression/lib/msun/test-invtrig.c 216222 2010-12-06 00:02:49Z das $");
35
36#include <assert.h>
37#include <fenv.h>
38#include <float.h>
39#include <math.h>
40#include <stdio.h>
41
42#define ALL_STD_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \

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

113int
114fpequal(long double x, long double y, long double tol)
115{
116 fenv_t env;
117 int ret;
118
119 if (isnan(x) && isnan(y))
120 return (1);
35
36#include <assert.h>
37#include <fenv.h>
38#include <float.h>
39#include <math.h>
40#include <stdio.h>
41
42#define ALL_STD_EXCEPT (FE_DIVBYZERO | FE_INEXACT | FE_INVALID | \

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

113int
114fpequal(long double x, long double y, long double tol)
115{
116 fenv_t env;
117 int ret;
118
119 if (isnan(x) && isnan(y))
120 return (1);
121 if (signbit(x) != signbit(y))
121 if (!signbit(x) != !signbit(y))
122 return (0);
123 if (x == y)
124 return (1);
125 if (tol == 0)
126 return (0);
127
128 /* Hard case: need to check the tolerance. */
129 feholdexcept(&env);

--- 357 unchanged lines hidden ---
122 return (0);
123 if (x == y)
124 return (1);
125 if (tol == 0)
126 return (0);
127
128 /* Hard case: need to check the tolerance. */
129 feholdexcept(&env);

--- 357 unchanged lines hidden ---