a68g-numbers.h
1 //! @file a68g-numbers.h
2 //! @author J. Marcel van der Veer
3
4 //! @section Copyright
5 //!
6 //! This file is part of Algol68G - an Algol 68 compiler-interpreter.
7 //! Copyright 2001-2024 J. Marcel van der Veer [algol68g@xs4all.nl].
8
9 //! @section License
10 //!
11 //! This program is free software; you can redistribute it and/or modify it
12 //! under the terms of the GNU General Public License as published by the
13 //! Free Software Foundation; either version 3 of the License, or
14 //! (at your option) any later version.
15 //!
16 //! This program is distributed in the hope that it will be useful, but
17 //! WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 //! or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 //! more details. You should have received a copy of the GNU General Public
20 //! License along with this program. If not, see [http://www.gnu.org/licenses/].
21
22 //! @section Synopsis
23 //!
24 //! Math constants.
25
26 #if !defined (__A68G_NUMBERS_H__)
27 #define __A68G_NUMBERS_H__
28
29 // Compare to M. Abramowitz and I. Stegun, Handbook of Mathematical Functions. Dover publications, New York (1970).
30
31 #define CONST_LOG2_10 3.32192809488736234787031942948939017586483139302458061205475640 // log2(10)
32 #define CONST_M_LOG10_2 0.30102999566398119521373889472449302676818988146210854131042746 // log10(2)
33 #define CONST_180_OVER_PI 57.2957795130823208767981548141051703324054724665643215491602439 // 180 / pi
34 #define CONST_PI_2 1.57079632679489661923132169163975144209858469968755291048747230 // pi / 2
35 #define CONST_PI 3.14159265358979323846264338327950288419716939937510582097494459 // pi
36 #define CONST_PI_OVER_180 0.01745329251994329576923690768488612713442871888541725456097191 // pi / 180
37
38 #if (A68_LEVEL >= 3)
39 #define CONST_M_LOG10_2_Q 0.30102999566398119521373889472449302676818988146210854131042746q // log10(2)
40 #define CONST_180_OVER_PI_Q 57.2957795130823208767981548141051703324054724665643215491602439q // 180 / pi
41 #define CONST_PI_OVER_180_Q 0.01745329251994329576923690768488612713442871888541725456097191q // pi / 180
42 #define CONST_PI_Q 3.14159265358979323846264338327950288419716939937510582097494459q // pi
43 #endif
44
45 #endif
© 2002-2024 J.M. van der Veer (jmvdveer@xs4all.nl)
|