Coverage for /usr/lib/python3/dist-packages/scipy/stats/_constants.py: 100%

11 statements  

« prev     ^ index     » next       coverage.py v7.9.1, created at 2025-06-14 15:55 +0200

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 (i.e. not subnormal) double precision 

19# floating value. 

20_XMIN = np.finfo(float).tiny 

21 

22# The log of the smallest [in magnitude] usable (i.e not subnormal) 

23# double precision floating value. 

24_LOGXMIN = np.log(_XMIN) 

25 

26# -special.psi(1) 

27_EULER = 0.577215664901532860606512090082402431042 

28 

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

30_ZETA3 = 1.202056903159594285399738161511449990765 

31 

32# sqrt(pi) 

33_SQRT_PI = 1.772453850905516027298167483341145182798 

34 

35# sqrt(2/pi) 

36_SQRT_2_OVER_PI = 0.7978845608028654 

37 

38# log(sqrt(2/pi)) 

39_LOG_SQRT_2_OVER_PI = -0.22579135264472744