PageRenderTime 16ms CodeModel.GetById 10ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/numeric/math_constants.e

http://github.com/tybor/Liberty
Specman e | 70 lines | 16 code | 14 blank | 40 comment | 0 complexity | 94e3bbb295fa790e637ebdb558a60286 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4expanded class MATH_CONSTANTS
 5   --
 6   -- Platform-independent, universal, mathematical constants.
 7   -- Intended to be used as ancestor for classes that need these constants.
 8   --
 9
10feature {ANY} -- Maths constants:
11   Pi: REAL 3.1415926535897932384626
12         -- Pi
13
14   Pi_2: REAL 1.5707963267948966192313
15         -- Pi divided by 2
16
17   Pi_4: REAL 0.7853981633974483096156
18         -- Pi divided by 4
19
20   Inv_pi: REAL 0.31830988618379067153
21         -- Inverse pi
22
23   Sqr_2pi: REAL 2.50662827463100050241
24         -- Square root of 2 pi
25
26   Tau: REAL 6.2831852707795864769252
27         -- Tau (2Pi)
28
29   Sqr_tau: REAL 2.50662827463100050241
30         -- Square root of Tau
31
32   Evalue: REAL 2.7182818284590452353602
33         -- e (Euler's number)
34
35   Inv_evalue: REAL 0.36787944117144232159
36         -- Inverse e
37
38   Deg: REAL 57.2957795130823208767981
39         -- Degrees/Radian
40
41   Phi: REAL 1.6180339887498948482045
42         -- Golden Ratio
43
44   Cheb: REAL 0.59017029950804811302
45         -- Chebyshev constant
46
47   Zeta_2: REAL 1.64493406684822643647
48         -- Riemann Function
49
50end -- class MATH_CONSTANTS
51--
52-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
53--
54-- Permission is hereby granted, free of charge, to any person obtaining a copy
55-- of this software and associated documentation files (the "Software"), to deal
56-- in the Software without restriction, including without limitation the rights
57-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
58-- copies of the Software, and to permit persons to whom the Software is
59-- furnished to do so, subject to the following conditions:
60--
61-- The above copyright notice and this permission notice shall be included in
62-- all copies or substantial portions of the Software.
63--
64-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
65-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
66-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
67-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
68-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
69-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
70-- THE SOFTWARE.