projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add regression test for bug #21108.
[pspp]
/
src
/
libpspp
/
misc.h
diff --git
a/src/libpspp/misc.h
b/src/libpspp/misc.h
index a1be9f9f236e77902f12079ac610b617f570ebed..69d3dc4f64043ef9e8929b703c3cd711c1e11d98 100644
(file)
--- a/
src/libpspp/misc.h
+++ b/
src/libpspp/misc.h
@@
-1,21
+1,18
@@
-/* PSPP -
computes sample statistic
s.
+/* PSPP -
a program for statistical analysi
s.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
- Written by Ben Pfaff <blp@gnu.org>.
- This program is free software
; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of the
-
License, or
(at your option) any later version.
+ This program is free software
: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU
- General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+
but
WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ G
NU G
eneral Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#if !math_misc_h
#define math_misc_h 1
#if !math_misc_h
#define math_misc_h 1
@@
-27,33
+24,22
@@
/* HUGE_VAL is traditionally defined as positive infinity, or
alternatively, DBL_MAX. */
/* HUGE_VAL is traditionally defined as positive infinity, or
alternatively, DBL_MAX. */
-#if !HAVE_ISINF
+#if !HAVE_ISINF
&& !defined isinf
#define isinf(X) (fabs (X) == HUGE_VAL)
#endif
/* A Not a Number is not equal to itself. */
#define isinf(X) (fabs (X) == HUGE_VAL)
#endif
/* A Not a Number is not equal to itself. */
-#if !HAVE_ISNAN
+#if !HAVE_ISNAN
&& !defined isnan
#define isnan(X) ((X) != (X))
#endif
/* Finite numbers are not infinities or NaNs. */
#define isnan(X) ((X) != (X))
#endif
/* Finite numbers are not infinities or NaNs. */
-#if !HAVE_FINITE
+#if !HAVE_FINITE
&& !defined finite
#define finite(X) (!isinf (X) && !isnan (X))
#elif HAVE_IEEEFP_H
#include <ieeefp.h> /* Declares finite() under Solaris. */
#endif
#define finite(X) (!isinf (X) && !isnan (X))
#elif HAVE_IEEEFP_H
#include <ieeefp.h> /* Declares finite() under Solaris. */
#endif
-#ifndef min
-#define min(A, B) ((A) < (B) ? (A) : (B))
-#endif
-
-#ifndef max
-#define max(A, B) ((A) > (B) ? (A) : (B))
-#endif
-
-/* Clamps A to be between B and C. */
-#define range(A, B, C) ((A) < (B) ? (B) : ((A) > (C) ? (C) : (A)))
-
/* Divides nonnegative X by positive Y, rounding up. */
#define DIV_RND_UP(X, Y) (((X) + ((Y) - 1)) / (Y))
/* Divides nonnegative X by positive Y, rounding up. */
#define DIV_RND_UP(X, Y) (((X) + ((Y) - 1)) / (Y))
@@
-71,21
+57,21
@@
int intlog10 (unsigned);
/* Returns the square of X. */
static inline double
/* Returns the square of X. */
static inline double
-pow2 (double x)
+pow2 (double x)
{
return x * x;
}
/* Returns the cube of X. */
static inline double
{
return x * x;
}
/* Returns the cube of X. */
static inline double
-pow3 (double x)
+pow3 (double x)
{
return x * x * x;
}
/* Returns the fourth power of X. */
static inline double
{
return x * x * x;
}
/* Returns the fourth power of X. */
static inline double
-pow4 (double x)
+pow4 (double x)
{
double y = x * x;
y *= y;
{
double y = x * x;
y *= y;