/[escript]/trunk/esysUtils/src/maths.h
ViewVC logotype

Annotation of /trunk/esysUtils/src/maths.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3227 - (hide annotations)
Thu Sep 30 06:07:08 2010 UTC (9 years, 1 month ago) by jfenwick
Original Path: branches/domexper/esysUtils/src/maths.h
File MIME type: text/plain
File size: 1629 byte(s)
Pass1 or moving MPI stuff out of paso

1 ksteube 1312
2     /*******************************************************
3 ksteube 1811 *
4 jfenwick 2881 * Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 dhawcroft 631
14 ksteube 1811
15 jfenwick 3227 #ifndef INC_ESYS_MATHS
16     #define INC_ESYS_MATHS
17 jgs 150
18     /**************************************************************/
19    
20 jfenwick 3227 /* Pull in a maths library and define ISNAN */
21 jgs 150
22    
23     /* some system values */
24 phornby 1628 /* FIXME: This is not satisfactory. */
25     /* _ECC, __INTEL_COMPILER, and other */
26     /* intel compiler pre-defines need to be handled */
27     /* (__ICL, __ICC come to mind) */
28 phornby 2019 #if defined(_WIN32) && defined(__INTEL_COMPILER)
29 woo409 757 #include <mathimf.h>
30     #else
31     #include <math.h>
32     #endif
33 jgs 150
34 jfenwick 2879 /*#ifndef NAN
35 gross 2748 #define NAN (0.0/0.0)
36     #endif
37 jfenwick 2879 */
38     /*#define IS_NAN(__VAL__) ( (__VAL__) == NAN )*/ /* this does not work */
39 gross 2748 /* #define IS_NAN(__VAL__) ( ! ( ( (__VAL__) >= 0. ) || ( (__VAL__) <= 0. ) ) ) this does not work */
40 jgs 150
41 jfenwick 2879 #ifdef isnan
42     #define IS_NAN(__VAL__) (isnan(__VAL__))
43 jfenwick 2884 #elif defined _isnan
44     #define IS_NAN(__VAL__) (_isnan(__VAL__))
45 jfenwick 2879 #else
46     /* If we do not have isnan then we can't reliably check for NaN - return false */
47     #define IS_NAN(__VAL__) (0)
48     #endif
49    
50 jfenwick 3227 #define INDEX_T_MAX INT_MAX
51     #define INDEX_T_MIN -INT_MAX
52     #define EPSILON DBL_EPSILON
53     #define LARGE_POSITIVE_FLOAT DBL_MAX
54     #define SMALL_NEGATIVE_FLOAT -DBL_MAX
55 jgs 150
56 jfenwick 3227 #endif

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/lapack2681/paso/src/Common.h:2682-2741 /branches/restext/paso/src/Common.h:2610-2624 /branches/stage3.0/paso/src/Common.h:2569-2590 /release/3.0/paso/src/Common.h:2591-2601

  ViewVC Help
Powered by ViewVC 1.1.26