_constants.py 681 B

123456789101112131415161718192021222324252627
  1. """
  2. Statistics-related constants.
  3. """
  4. from __future__ import division, print_function, absolute_import
  5. import numpy as np
  6. # The smallest representable positive number such that 1.0 + _EPS != 1.0.
  7. _EPS = np.finfo(float).eps
  8. # The largest [in magnitude] usable floating value.
  9. _XMAX = np.finfo(float).max
  10. # The log of the largest usable floating value; useful for knowing
  11. # when exp(something) will overflow
  12. _LOGXMAX = np.log(_XMAX)
  13. # The smallest [in magnitude] usable floating value.
  14. _XMIN = np.finfo(float).tiny
  15. # -special.psi(1)
  16. _EULER = 0.577215664901532860606512090082402431042
  17. # special.zeta(3, 1) Apery's constant
  18. _ZETA3 = 1.202056903159594285399738161511449990765