/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. --
  4. expanded 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. feature {ANY} -- Maths constants:
  10. Pi: REAL 3.1415926535897932384626
  11. -- Pi
  12. Pi_2: REAL 1.5707963267948966192313
  13. -- Pi divided by 2
  14. Pi_4: REAL 0.7853981633974483096156
  15. -- Pi divided by 4
  16. Inv_pi: REAL 0.31830988618379067153
  17. -- Inverse pi
  18. Sqr_2pi: REAL 2.50662827463100050241
  19. -- Square root of 2 pi
  20. Tau: REAL 6.2831852707795864769252
  21. -- Tau (2Pi)
  22. Sqr_tau: REAL 2.50662827463100050241
  23. -- Square root of Tau
  24. Evalue: REAL 2.7182818284590452353602
  25. -- e (Euler's number)
  26. Inv_evalue: REAL 0.36787944117144232159
  27. -- Inverse e
  28. Deg: REAL 57.2957795130823208767981
  29. -- Degrees/Radian
  30. Phi: REAL 1.6180339887498948482045
  31. -- Golden Ratio
  32. Cheb: REAL 0.59017029950804811302
  33. -- Chebyshev constant
  34. Zeta_2: REAL 1.64493406684822643647
  35. -- Riemann Function
  36. end -- class MATH_CONSTANTS
  37. --
  38. -- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
  39. --
  40. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  41. -- of this software and associated documentation files (the "Software"), to deal
  42. -- in the Software without restriction, including without limitation the rights
  43. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  44. -- copies of the Software, and to permit persons to whom the Software is
  45. -- furnished to do so, subject to the following conditions:
  46. --
  47. -- The above copyright notice and this permission notice shall be included in
  48. -- all copies or substantial portions of the Software.
  49. --
  50. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  51. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  52. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  53. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  54. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  55. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  56. -- THE SOFTWARE.