Loading...
Searching...
No Matches
doubleFloat.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011 OpenFOAM Foundation
9 Copyright (C) 2018-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#ifndef Foam_doubleFloat_H
30#define Foam_doubleFloat_H
31
32#include "label.H"
33#include "products.H"
34
35#include <cmath>
36
37// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
38
39namespace Foam
40{
41
42// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43
44#define MAXMINPOW(RetType, Type1, Type2) \
45 \
46MAXMIN(RetType, Type1, Type2) \
47 \
48 \
49inline double pow(const Type1 base, const Type2 expon) \
50{ \
51 return ::pow(double(base), double(expon)); \
55MAXMINPOW(double, double, double)
56MAXMINPOW(double, double, float)
57MAXMINPOW(double, float, double)
58MAXMINPOW(double, double, int)
59MAXMINPOW(double, int, double)
60MAXMINPOW(double, double, long)
61MAXMINPOW(double, long, double)
62MAXMINPOW(float, float, float)
63MAXMINPOW(float, float, int)
64MAXMINPOW(float, int, float)
65MAXMINPOW(float, float, long)
66MAXMINPOW(float, long, float)
67#if (WM_LABEL_SIZE == 64) && (defined(__APPLE__) || defined(_WIN32))
68MAXMINPOW(double, double, int64_t)
69MAXMINPOW(double, int64_t, double)
70MAXMINPOW(float, float, int64_t)
71MAXMINPOW(float, int64_t, float)
72#endif
73
74#undef MAXMINPOW
75
76
77// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
78
79} // End namespace Foam
80
81// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82
83#endif
84
85// ************************************************************************* //
#define MAXMINPOW(RetType, Type1, Type2)
Definition doubleFloat.H:37
Namespace for OpenFOAM.
Traits classes for inner and outer products of primitives.