UNPKG

@stdlib/esm

Version:

ES module distribution for Stdlib, a standard library for JavaScript and Node.js.

3 lines 889 B
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import r from"./../assert/is-nan.js";import t from"./ln.js";import n from"./../../../constants/math/float64-pi-squared.js";function o(r){return 0===r?1:1+r*(3.297713409852251+r*(4.256971560081218+r*(2.7114985119655346+r*(.8796913117545303+r*(.13384763957830903+r*(.007315890452380947+46512858607399003e-21*r))))))}function a(r){return 0===r?1:1+r*(3.547713409852251+r*(5.03278880143317+r*(3.6380053334513707+r*(1.4117259775183106+r*(.2829748606025681+r*(.02540437639325444+.0006909904889125533*r))))))}var s=r,e=t,f=n,i=o,u=a;function m(r){var t,n,o,a;return s(r)||r<0?NaN:1===r?0:0===r?f/6:(t=0,r>2&&(r=1/r,t|=2),r>1.5?(n=1/r-1,t|=2):r<.5?(n=-r,t|=1):n=r-1,o=-n*i(n)/u(n),1&t&&(o=f/6-e(r)*e(1-r)-o),2&t&&(o=-.5*(a=e(r))*a-o),o)}var p=m;export default p; //# sourceMappingURL=spence.js.map