• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ut_math.h

Go to the documentation of this file.
00001 /* AbiSource Program Utilities
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef UTMATH_H
00021 #define UTMATH_H
00022 
00023 #include <math.h>
00024 
00025 /* pre-emptive dismissal; ut_types.h is needed by just about everything,
00026  * so even if it's commented out in-file that's still a lot of work for
00027  * the preprocessor to do...
00028  */
00029 #ifndef UT_TYPES_H
00030 #include "ut_types.h"
00031 #endif
00032 
00033 #define UT_E             2.7182818284590452354   /* e */
00034 #define UT_LOG2E         1.4426950408889634074   /* log 2e */
00035 #define UT_LOG10E        0.43429448190325182765  /* log 10e */
00036 #define UT_LN2           0.69314718055994530942  /* log e2 */
00037 #define UT_LN10          2.30258509299404568402  /* log e10 */
00038 #define UT_PI            3.14159265358979323846  /* pi */
00039 #define UT_PI_2          1.57079632679489661923  /* pi/2 */
00040 #define UT_PI_4          0.78539816339744830962  /* pi/4 */
00041 #define UT_1_PI          0.31830988618379067154  /* 1/pi */
00042 #define UT_2_PI          0.63661977236758134308  /* 2/pi */
00043 #define UT_2_SQRTPI      1.12837916709551257390  /* 2/sqrt(pi) */
00044 #define UT_SQRT2         1.41421356237309504880  /* sqrt(2) */
00045 #define UT_SQRT1_2       0.70710678118654752440  /* 1/sqrt(2) */
00046 
00047 #if defined(_WIN32) && !defined(__MINGW32__)
00048 #define finite _finite
00049 ABI_EXPORT double rint(double x);
00050 #endif /* _WIN32 */
00051 
00052 ABI_EXPORT UT_uint32 UT_newNumber ();
00053 
00054 #endif /* UTMATH_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1