MCPcopy Index your code
hub / github.com/RustPython/RustPython / _quartic_invcdf_estimate

Function _quartic_invcdf_estimate

Lib/statistics.py:884–892  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

882 return f_inv
883
884def _quartic_invcdf_estimate(p):
885 # A handrolled piecewise approximation. There is no magic here.
886 sign, p = (1.0, p) if p <= 1/2 else (-1.0, 1.0 - p)
887 if p < 0.0106:
888 return ((2.0 * p) ** 0.3838 - 1.0) * sign
889 x = (2.0 * p) ** 0.4258865685331 - 1.0
890 if p < 0.499:
891 x += 0.026818732 * sin(7.101753784 * p + 2.73230839482953)
892 return x * sign
893
894@register('quartic', 'biweight')
895def quartic_kernel():

Callers

nothing calls this directly

Calls 1

sinFunction · 0.90

Tested by

no test coverage detected