Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2Statistics-related constants. 

3 

4""" 

5import numpy as np 

6 

7 

8# The smallest representable positive number such that 1.0 + _EPS != 1.0. 

9_EPS = np.finfo(float).eps 

10 

11# The largest [in magnitude] usable floating value. 

12_XMAX = np.finfo(float).max 

13 

14# The log of the largest usable floating value; useful for knowing 

15# when exp(something) will overflow 

16_LOGXMAX = np.log(_XMAX) 

17 

18# The smallest [in magnitude] usable floating value. 

19_XMIN = np.finfo(float).tiny 

20 

21# -special.psi(1) 

22_EULER = 0.577215664901532860606512090082402431042 

23 

24# special.zeta(3, 1) Apery's constant 

25_ZETA3 = 1.202056903159594285399738161511449990765 

26 

27# sqrt(2/pi) 

28_SQRT_2_OVER_PI = 0.7978845608028654 

29 

30# log(sqrt(2/pi)) 

31_LOG_SQRT_2_OVER_PI = -0.22579135264472744