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

Function _triweight_invcdf_estimate

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

Source from the content-addressed store, hash-verified

901 return pdf, cdf, invcdf, support
902
903def _triweight_invcdf_estimate(p):
904 # A handrolled piecewise approximation. There is no magic here.
905 sign, p = (1.0, p) if p <= 1/2 else (-1.0, 1.0 - p)
906 x = (2.0 * p) ** 0.3400218741872791 - 1.0
907 if 0.00001 < p < 0.499:
908 x -= 0.033 * sin(1.07 * tau * (p - 0.035))
909 return x * sign
910
911@register('triweight')
912def triweight_kernel():

Callers

nothing calls this directly

Calls 1

sinFunction · 0.90

Tested by

no test coverage detected