[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 50b2645a 08/13: Use fdlibm header
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 50b2645a 08/13: Use fdlibm header |
Date: |
Mon, 23 May 2022 17:40:27 -0400 (EDT) |
branch: master
commit 50b2645a43e1c0fd84d0682186bcbba0a231cb9a
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Use fdlibm header
---
fdlibm_expm1.c | 40 +---------------------------------------
fdlibm_log1p.c | 40 +---------------------------------------
2 files changed, 2 insertions(+), 78 deletions(-)
diff --git a/fdlibm_expm1.c b/fdlibm_expm1.c
index a2c2f3d9..5ed45732 100644
--- a/fdlibm_expm1.c
+++ b/fdlibm_expm1.c
@@ -25,10 +25,7 @@
// Adapted for lmi by GWC; any defects introduced should not reflect
// on the reputations of the original authors.
-// Generally, lmi '.cpp' files include at least one lmi '.hpp' file,
-// which includes 'config.hpp'. Include 'version.hpp' here because
-// it's the simplest lmi header.
-#include "version.hpp"
+#include "fdlibm.hpp"
#include <stdint.h>
@@ -40,41 +37,6 @@
# pragma GCC diagnostic ignored "-Wunsuffixed-float-constants"
#endif // defined LMI_GCC
-/* @(#)fdlibm.h 1.5 04/04/22 */
-/*
- * ====================================================
- * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-// Apparently the clang maintainers believe that floating-point
-// endianness is necessarily the same as integer endianness.
-#if defined __clang__
-# if !defined __FLOAT_WORD_ORDER__ && defined __BYTE_ORDER__
-# define __FLOAT_WORD_ORDER__ __BYTE_ORDER__
-# endif // !defined __FLOAT_WORD_ORDER__ && defined __BYTE_ORDER__
-#endif // defined __clang__
-
-#if !defined __FLOAT_WORD_ORDER__ || \
- !defined __ORDER_BIG_ENDIAN__ || \
- !defined __ORDER_LITTLE_ENDIAN__
-# error Expected endianness macros not defined.
-#endif // expected endianness macros not defined
-
-#if __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__
-# define FDLIBM_HI(x) *(1+(int*)&x)
-# define FDLIBM_LO(x) *(int*)&x
-#elif __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
-# define FDLIBM_HI(x) *(int*)&x
-# define FDLIBM_LO(x) *(1+(int*)&x)
-#else // unknown endianness
-# error Unknown endianness.
-#endif // unknown endianness
-
/* @(#)s_expm1.c 1.5 04/04/22 */
/*
* ====================================================
diff --git a/fdlibm_log1p.c b/fdlibm_log1p.c
index c7edd64d..e1755471 100644
--- a/fdlibm_log1p.c
+++ b/fdlibm_log1p.c
@@ -25,10 +25,7 @@
// Adapted for lmi by GWC; any defects introduced should not reflect
// on the reputations of the original authors.
-// Generally, lmi '.cpp' files include at least one lmi '.hpp' file,
-// which includes 'config.hpp'. Include 'version.hpp' here because
-// it's the simplest lmi header.
-#include "version.hpp"
+#include "fdlibm.hpp"
#include <stdint.h>
@@ -38,41 +35,6 @@
# pragma GCC diagnostic ignored "-Wunsuffixed-float-constants"
#endif // defined LMI_GCC
-/* @(#)fdlibm.h 1.5 04/04/22 */
-/*
- * ====================================================
- * Copyright (C) 2004 by Sun Microsystems, Inc. All rights reserved.
- *
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-// Apparently the clang maintainers believe that floating-point
-// endianness is necessarily the same as integer endianness.
-#if defined __clang__
-# if !defined __FLOAT_WORD_ORDER__ && defined __BYTE_ORDER__
-# define __FLOAT_WORD_ORDER__ __BYTE_ORDER__
-# endif // !defined __FLOAT_WORD_ORDER__ && defined __BYTE_ORDER__
-#endif // defined __clang__
-
-#if !defined __FLOAT_WORD_ORDER__ || \
- !defined __ORDER_BIG_ENDIAN__ || \
- !defined __ORDER_LITTLE_ENDIAN__
-# error Expected endianness macros not defined.
-#endif // expected endianness macros not defined
-
-#if __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__
-# define FDLIBM_HI(x) *(1+(int*)&x)
-// # define FDLIBM_LO(x) *(int*)&x // not used in this file
-#elif __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
-# define FDLIBM_HI(x) *(int*)&x
-// # define FDLIBM_LO(x) *(1+(int*)&x) // not used in this file
-#else // unknown endianness
-# error Unknown endianness.
-#endif // unknown endianness
-
/* @(#)s_log1p.c 1.3 95/01/18 */
/*
* ====================================================
- [lmi-commits] [lmi] master a456d40d 03/13: Expunge unwanted part of fdlibm header, (continued)
- [lmi-commits] [lmi] master a456d40d 03/13: Expunge unwanted part of fdlibm header, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 9d7e3be1 02/13: Import header from fdlibm, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master e5850c2a 12/13: Import Naohiko Shimizu's NetBSD performance improvements, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master bfb73bb2 09/13: Use fdlibm header more broadly, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 599c44b7 13/13: Draw attention to atrocious type puns, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 164db076 10/13: Assume __STDC__ for fdlibm, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 7d5c739b 01/13: Expunge unused declarations and macro, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master d7294669 06/13: Add include guards; include a header required by lmi, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master adf263fe 11/13: Assume __STDC__ everywhere appropriate, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master edb56e9b 05/13: Add license and copyright boilerplate, Greg Chicares, 2022/05/23
- [lmi-commits] [lmi] master 50b2645a 08/13: Use fdlibm header,
Greg Chicares <=
- [lmi-commits] [lmi] master 89966e80 07/13: Rename fdlibm header, Greg Chicares, 2022/05/23