-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mod.js
4 lines (4 loc) · 98.6 KB
/
mod.js
1
2
3
4
// Copyright (c) 2024 The Stdlib Authors. License is Apache-2.0: https://www.apache.org/licenses/LICENSE-2.0
/// <reference types="./mod.d.ts" />
var r="function"==typeof Object.defineProperty?Object.defineProperty:null;var e=Object.defineProperty;function n(r){return"number"==typeof r}function t(r){var e,n="";for(e=0;e<r;e++)n+="0";return n}function i(r,e,n){var i=!1,u=e-r.length;return u<0||(function(r){return"-"===r[0]}(r)&&(i=!0,r=r.substr(1)),r=n?r+t(u):t(u)+r,i&&(r="-"+r)),r}var u=String.prototype.toLowerCase,f=String.prototype.toUpperCase;function a(r){var e,t,a;switch(r.specifier){case"b":e=2;break;case"o":e=8;break;case"x":case"X":e=16;break;default:e=10}if(t=r.arg,a=parseInt(t,10),!isFinite(a)){if(!n(t))throw new Error("invalid integer. Value: "+t);a=0}return a<0&&("u"===r.specifier||10!==e)&&(a=4294967295+a+1),a<0?(t=(-a).toString(e),r.precision&&(t=i(t,r.precision,r.padRight)),t="-"+t):(t=a.toString(e),a||r.precision?r.precision&&(t=i(t,r.precision,r.padRight)):t="",r.sign&&(t=r.sign+t)),16===e&&(r.alternate&&(t="0x"+t),t=r.specifier===f.call(r.specifier)?f.call(t):u.call(t)),8===e&&r.alternate&&"0"!==t.charAt(0)&&(t="0"+t),t}var o=Math.abs,c=String.prototype.toLowerCase,v=String.prototype.toUpperCase,s=String.prototype.replace,l=/e\+(\d)$/,p=/e-(\d)$/,N=/^(\d+)$/,h=/^(\d+)e/,g=/\.0$/,y=/\.0*e/,b=/(\..*[^0])0*e/;function d(r){var e,t,i=parseFloat(r.arg);if(!isFinite(i)){if(!n(r.arg))throw new Error("invalid floating-point number. Value: "+t);i=r.arg}switch(r.specifier){case"e":case"E":t=i.toExponential(r.precision);break;case"f":case"F":t=i.toFixed(r.precision);break;case"g":case"G":o(i)<1e-4?((e=r.precision)>0&&(e-=1),t=i.toExponential(e)):t=i.toPrecision(r.precision),r.alternate||(t=s.call(t,b,"$1e"),t=s.call(t,y,"e"),t=s.call(t,g,""));break;default:throw new Error("invalid double notation. Value: "+r.specifier)}return t=s.call(t,l,"e+0$1"),t=s.call(t,p,"e-0$1"),r.alternate&&(t=s.call(t,N,"$1."),t=s.call(t,h,"$1.e")),i>=0&&r.sign&&(t=r.sign+t),t=r.specifier===v.call(r.specifier)?v.call(t):c.call(t)}function w(r){var e,n="";for(e=0;e<r;e++)n+=" ";return n}var m=String.fromCharCode,k=Array.isArray;function x(r){return r!=r}function _(r){var e={};return e.specifier=r.specifier,e.precision=void 0===r.precision?1:r.precision,e.width=r.width,e.flags=r.flags||"",e.mapping=r.mapping,e}function A(r){var e,n,t,u,f,o,c,v,s,l,p,N,h;if(!k(r))throw new TypeError("invalid argument. First argument must be an array. Value: `"+r+"`.");for(o="",c=1,v=0;v<r.length;v++)if(t=r[v],"string"==typeof t)o+=t;else{if(e=void 0!==t.precision,!(t=_(t)).specifier)throw new TypeError("invalid argument. Token is missing `specifier` property. Index: `"+v+"`. Value: `"+t+"`.");for(t.mapping&&(c=t.mapping),n=t.flags,s=0;s<n.length;s++)switch(u=n.charAt(s)){case" ":t.sign=" ";break;case"+":t.sign="+";break;case"-":t.padRight=!0,t.padZeros=!1;break;case"0":t.padZeros=n.indexOf("-")<0;break;case"#":t.alternate=!0;break;default:throw new Error("invalid flag: "+u)}if("*"===t.width){if(t.width=parseInt(arguments[c],10),c+=1,x(t.width))throw new TypeError("the argument for * width at position "+c+" is not a number. Value: `"+t.width+"`.");t.width<0&&(t.padRight=!0,t.width=-t.width)}if(e&&"*"===t.precision){if(t.precision=parseInt(arguments[c],10),c+=1,x(t.precision))throw new TypeError("the argument for * precision at position "+c+" is not a number. Value: `"+t.precision+"`.");t.precision<0&&(t.precision=1,e=!1)}switch(t.arg=arguments[c],t.specifier){case"b":case"o":case"x":case"X":case"d":case"i":case"u":e&&(t.padZeros=!1),t.arg=a(t);break;case"s":t.maxWidth=e?t.precision:-1,t.arg=String(t.arg);break;case"c":if(!x(t.arg)){if((f=parseInt(t.arg,10))<0||f>127)throw new Error("invalid character code. Value: "+t.arg);t.arg=x(f)?String(t.arg):m(f)}break;case"e":case"E":case"f":case"F":case"g":case"G":e||(t.precision=6),t.arg=d(t);break;default:throw new Error("invalid specifier: "+t.specifier)}t.maxWidth>=0&&t.arg.length>t.maxWidth&&(t.arg=t.arg.substring(0,t.maxWidth)),t.padZeros?t.arg=i(t.arg,t.width||t.precision,t.padRight):t.width&&(t.arg=(l=t.arg,p=t.width,N=t.padRight,h=void 0,(h=p-l.length)<0?l:l=N?l+w(h):w(h)+l)),o+=t.arg||"",c+=1}return o}var E=/%(?:([1-9]\d*)\$)?([0 +\-#]*)(\*|\d+)?(?:(\.)(\*|\d+)?)?[hlL]?([%A-Za-z])/g;function j(r){var e={mapping:r[1]?parseInt(r[1],10):void 0,flags:r[2],width:r[3],precision:r[5],specifier:r[6]};return"."===r[4]&&void 0===r[5]&&(e.precision="1"),e}function T(r){var e,n,t,i;for(n=[],i=0,t=E.exec(r);t;)(e=r.slice(i,E.lastIndex-t[0].length)).length&&n.push(e),n.push(j(t)),i=E.lastIndex,t=E.exec(r);return(e=r.slice(i)).length&&n.push(e),n}function I(r){var e,n;if("string"!=typeof r)throw new TypeError(I("invalid argument. First argument must be a string. Value: `%s`.",r));for(e=[T(r)],n=1;n<arguments.length;n++)e.push(arguments[n]);return A.apply(null,e)}var U=Object.prototype,O=U.toString,S=U.__defineGetter__,F=U.__defineSetter__,V=U.__lookupGetter__,P=U.__lookupSetter__;var W=function(){try{return r({},"x",{}),!0}catch(r){return!1}}()?e:function(r,e,n){var t,i,u,f;if("object"!=typeof r||null===r||"[object Array]"===O.call(r))throw new TypeError(I("invalid argument. First argument must be an object. Value: `%s`.",r));if("object"!=typeof n||null===n||"[object Array]"===O.call(n))throw new TypeError(I("invalid argument. Property descriptor must be an object. Value: `%s`.",n));if((i="value"in n)&&(V.call(r,e)||P.call(r,e)?(t=r.__proto__,r.__proto__=U,delete r[e],r[e]=n.value,r.__proto__=t):r[e]=n.value),u="get"in n,f="set"in n,i&&(u||f))throw new Error("invalid argument. Cannot specify one or more accessors and a value or writable attribute in the property descriptor.");return u&&S&&S.call(r,e,n.get),f&&F&&F.call(r,e,n.set),r};function $(r,e,n){W(r,e,{configurable:!1,enumerable:!1,writable:!1,value:n})}function G(r,e,n){W(r,e,{configurable:!1,enumerable:!1,get:n})}function M(r){return"number"==typeof r}var R="function"==typeof Symbol&&"symbol"==typeof Symbol("foo");function C(){return R&&"symbol"==typeof Symbol.toStringTag}var H=Object.prototype.toString;var L=Object.prototype.hasOwnProperty;var Z="function"==typeof Symbol?Symbol:void 0,q="function"==typeof Z?Z.toStringTag:"";var z=C()?function(r){var e,n,t,i,u;if(null==r)return H.call(r);n=r[q],u=q,e=null!=(i=r)&&L.call(i,u);try{r[q]=void 0}catch(e){return H.call(r)}return t=H.call(r),e?r[q]=n:delete r[q],t}:function(r){return H.call(r)},X=Number,Y=X.prototype.toString;var D=C();function B(r){return"object"==typeof r&&(r instanceof X||(D?function(r){try{return Y.call(r),!0}catch(r){return!1}}(r):"[object Number]"===z(r)))}function J(r){return M(r)||B(r)}function K(r){return M(r)&&r>0}function Q(r){return B(r)&&r.valueOf()>0}function rr(r){return K(r)||Q(r)}function er(r){return r!=r}$(J,"isPrimitive",M),$(J,"isObject",B),$(rr,"isPrimitive",K),$(rr,"isObject",Q);var nr=Math.sqrt;var tr="function"==typeof Uint32Array;var ir="function"==typeof Uint32Array?Uint32Array:null;var ur,fr="function"==typeof Uint32Array?Uint32Array:void 0;ur=function(){var r,e,n;if("function"!=typeof ir)return!1;try{e=new ir(e=[1,3.14,-3.14,4294967296,4294967297]),n=e,r=(tr&&n instanceof Uint32Array||"[object Uint32Array]"===z(n))&&1===e[0]&&3===e[1]&&4294967293===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?fr:function(){throw new Error("not implemented")};var ar=ur,or="function"==typeof Float64Array;var cr="function"==typeof Float64Array?Float64Array:null;var vr,sr="function"==typeof Float64Array?Float64Array:void 0;vr=function(){var r,e,n;if("function"!=typeof cr)return!1;try{e=new cr([1,3.14,-3.14,NaN]),n=e,r=(or&&n instanceof Float64Array||"[object Float64Array]"===z(n))&&1===e[0]&&3.14===e[1]&&-3.14===e[2]&&e[3]!=e[3]}catch(e){r=!1}return r}()?sr:function(){throw new Error("not implemented")};var lr=vr,pr="function"==typeof Uint8Array;var Nr="function"==typeof Uint8Array?Uint8Array:null;var hr,gr="function"==typeof Uint8Array?Uint8Array:void 0;hr=function(){var r,e,n;if("function"!=typeof Nr)return!1;try{e=new Nr(e=[1,3.14,-3.14,256,257]),n=e,r=(pr&&n instanceof Uint8Array||"[object Uint8Array]"===z(n))&&1===e[0]&&3===e[1]&&253===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?gr:function(){throw new Error("not implemented")};var yr=hr,br="function"==typeof Uint16Array;var dr="function"==typeof Uint16Array?Uint16Array:null;var wr,mr="function"==typeof Uint16Array?Uint16Array:void 0;wr=function(){var r,e,n;if("function"!=typeof dr)return!1;try{e=new dr(e=[1,3.14,-3.14,65536,65537]),n=e,r=(br&&n instanceof Uint16Array||"[object Uint16Array]"===z(n))&&1===e[0]&&3===e[1]&&65533===e[2]&&0===e[3]&&1===e[4]}catch(e){r=!1}return r}()?mr:function(){throw new Error("not implemented")};var kr,xr={uint16:wr,uint8:yr};(kr=new xr.uint16(1))[0]=4660;var _r=52===new xr.uint8(kr.buffer)[0],Ar=!0===_r?1:0,Er=new lr(1),jr=new ar(Er.buffer);function Tr(r){return Er[0]=r,jr[Ar]}var Ir,Ur,Or=!0===_r?1:0,Sr=new lr(1),Fr=new ar(Sr.buffer);function Vr(r,e){return Sr[0]=r,Fr[Or]=e>>>0,Sr[0]}!0===_r?(Ir=1,Ur=0):(Ir=0,Ur=1);var Pr={HIGH:Ir,LOW:Ur},Wr=new lr(1),$r=new ar(Wr.buffer),Gr=Pr.HIGH,Mr=Pr.LOW;function Rr(r,e){return $r[Gr]=r,$r[Mr]=e,Wr[0]}var Cr=Number.POSITIVE_INFINITY,Hr=X.NEGATIVE_INFINITY,Lr=1023,Zr=.34657359027997264;var qr=709.782712893384,zr=.6931471803691238,Xr=1.9082149292705877e-10,Yr=1.4426950408889634,Dr=38.816242111356935,Br=1.0397207708399179;function Jr(r){var e,n,t,i,u,f,a,o,c,v,s,l,p;if(r===Cr||er(r))return r;if(r===Hr)return-1;if(0===r)return r;if(r<0?(t=!0,o=-r):(t=!1,o=r),o>=Dr){if(t)return-1;if(o>=qr)return Cr}if(f=0|Tr(o),o>Zr)o<Br?t?(i=r+zr,u=-Xr,p=-1):(i=r-zr,u=Xr,p=1):(p=t?Yr*r-.5:Yr*r+.5,i=r-(s=p|=0)*zr,u=s*Xr),v=i-(r=i-u)-u;else{if(f<1016070144)return r;p=0}return a=1+(c=r*(e=.5*r))*function(r){return 0===r?-.03333333333333313:r*(.0015873015872548146+r*(r*(4008217827329362e-21+-2.0109921818362437e-7*r)-793650757867488e-19))-.03333333333333313}(c),l=c*((a-(s=3-a*e))/(6-r*s)),0===p?r-(r*l-c):(n=Rr(Lr+p<<20,0),l=r*(l-v)-v,l-=c,-1===p?.5*(r-l)-.5:1===p?r<-.25?-2*(l-(r+.5)):1+2*(r-l):p<=-2||p>56?(o=1-(l-r),1024===p?o=Vr(o,i=Tr(o)+(p<<20)|0):o*=n,o-1):(s=1,p<20?o=(s=Vr(s,i=1072693248-(2097152>>p)|0))-(l-r):(o=r-(l+(s=Vr(s,i=Lr-p<<20|0))),o+=1),o*=n))}var Kr=Math.floor;var Qr=.6931471803691238,re=1.9082149292705877e-10,ee=.41421356237309503,ne=-.2928932188134525,te=1.862645149230957e-9,ie=5551115123125783e-32,ue=9007199254740992,fe=.6666666666666666;function ae(r){var e,n,t,i,u,f,a,o,c,v;if(r<-1||er(r))return NaN;if(-1===r)return Hr;if(r===Cr)return r;if(0===r)return r;if(v=1,(t=r<0?-r:r)<ee){if(t<te)return t<ie?r:r-r*r*.5;r>ne&&(v=0,i=r,n=1)}return 0!==v&&(t<ue?(u=(v=((n=Tr(c=1+r))>>20)-Lr)>0?1-(c-r):r-(c-1),u/=c):(v=((n=Tr(c=r))>>20)-Lr,u=0),(n&=1048575)<434334?c=Vr(c,1072693248|n):(v+=1,c=Vr(c,1071644672|n),n=1048576-n>>2),i=c-1),e=.5*i*i,0===n?0===i?v*Qr+(u+=v*re):v*Qr-((o=e*(1-fe*i))-(v*re+u)-i):(o=(a=(f=i/(2+i))*f)*function(r){return 0===r?.6666666666666735:.6666666666666735+r*(.3999999999940942+r*(.2857142874366239+r*(.22222198432149784+r*(.1818357216161805+r*(.15313837699209373+.14798198605116586*r)))))}(a),0===v?i-(e-f*(e+o)):v*Qr-(e-(f*(e+o)+(v*re+u))-i))}var oe=.7853981633974483;var ce=6123233995736766e-32;function ve(r){var e,n,t,i,u;if(er(r))return NaN;if(r>0?t=r:(e=!0,t=-r),t>1)return NaN;if(t>.625)i=(n=1-t)*function(r){var e,n;return 0===r?.08333333333333809:((r<0?-r:r)<=1?(e=28.536655482610616+r*(r*(6.968710824104713+r*(.002967721961301243*r-.5634242780008963))-25.56901049652825),n=342.43986579130785+r*(r*(147.0656354026815+r*(1*r-21.947795316429207))-383.8770957603691)):(e=.002967721961301243+(r=1/r)*(r*(6.968710824104713+r*(28.536655482610616*r-25.56901049652825))-.5634242780008963),n=1+r*(r*(147.0656354026815+r*(342.43986579130785*r-383.8770957603691))-21.947795316429207)),e/n)}(n),n=nr(n+n),u=oe-n,u-=n=n*i-ce,u+=oe;else{if(t<1e-8)return r;u=(n=t*t)*function(r){var e,n;return 0===r?.16666666666666713:((r<0?-r:r)<=1?(e=r*(19.562619833175948+r*(r*(5.444622390564711+r*(.004253011369004428*r-.6019598008014124))-16.262479672107002))-8.198089802484825,n=r*(139.51056146574857+r*(r*(70.49610280856842+r*(1*r-14.740913729888538))-147.1791292232726))-49.18853881490881):(e=.004253011369004428+(r=1/r)*(r*(5.444622390564711+r*(r*(19.562619833175948+-8.198089802484825*r)-16.262479672107002))-.6019598008014124),n=1+r*(r*(70.49610280856842+r*(r*(139.51056146574857+-49.18853881490881*r)-147.1791292232726))-14.740913729888538)),e/n)}(n),u=t*u+t}return e?-u:u}function se(r){return Math.abs(r)}var le=Math.ceil;function pe(r){return r<0?le(r):Kr(r)}var Ne=1023,he=-1023,ge=-1074;function ye(r){return r===Cr||r===Hr}var be,de,we=2147483648,me=2147483647;!0===_r?(be=1,de=0):(be=0,de=1);var ke={HIGH:be,LOW:de},xe=new lr(1),_e=new ar(xe.buffer),Ae=ke.HIGH,Ee=ke.LOW;function je(r,e,n,t){return xe[0]=r,e[t]=_e[Ae],e[t+n]=_e[Ee],e}function Te(r){return je(r,[0,0],1,0)}$(Te,"assign",je);var Ie=[0,0];function Ue(r,e){var n,t;return Te.assign(r,Ie,1,0),n=Ie[0],n&=me,t=Tr(e),Rr(n|=t&=we,Ie[1])}var Oe=22250738585072014e-324,Se=4503599627370496;function Fe(r,e,n,t){return er(r)||ye(r)?(e[t]=r,e[t+n]=0,e):0!==r&&se(r)<Oe?(e[t]=r*Se,e[t+n]=-52,e):(e[t]=r,e[t+n]=0,e)}$((function(r){return Fe(r,[0,0],1,0)}),"assign",Fe);var Ve=2146435072;var Pe=2220446049250313e-31,We=2148532223,$e=[0,0],Ge=[0,0];function Me(r,e){var n,t;return 0===e||0===r||er(r)||ye(r)?r:(Fe(r,$e,1,0),r=$e[0],e+=$e[1],e+=function(r){var e=Tr(r);return(e=(e&Ve)>>>20)-Lr|0}(r),e<ge?Ue(0,r):e>Ne?r<0?Hr:Cr:(e<=he?(e+=52,t=Pe):t=1,Te.assign(r,Ge,1,0),n=Ge[0],n&=We,t*Rr(n|=e+Lr<<20,Ge[1])))}var Re=.6931471803691238,Ce=1.9082149292705877e-10,He=1.4426950408889634,Le=709.782712893384,Ze=-745.1332191019411,qe=1/(1<<28),ze=-qe;function Xe(r){var e;return er(r)||r===Cr?r:r===Hr?0:r>Le?Cr:r<Ze?0:r>ze&&r<qe?1+r:function(r,e,n){var t,i,u,f;return Me(1-(e-(t=r-e)*(u=t-(i=t*t)*(0===(f=i)?.16666666666666602:.16666666666666602+f*(f*(6613756321437934e-20+f*(4.1381367970572385e-8*f-16533902205465252e-22))-.0027777777777015593)))/(2-u)-r),n)}(r-(e=pe(r<0?He*r-.5:He*r+.5))*Re,e*Ce,e)}function Ye(r){return Kr(r)===r}function De(r){return Ye(r/2)}function Be(r){return De(r>0?r-1:r+1)}var Je=!0===_r?0:1,Ke=new lr(1),Qe=new ar(Ke.buffer);function rn(r,e){return Ke[0]=r,Qe[Je]=e>>>0,Ke[0]}function en(r){return 0|r}var nn=1072693247,tn=1e300,un=1e-300;var fn=1048575,an=1048576,on=1072693248,cn=536870912,vn=524288,sn=20,ln=9007199254740992,pn=.9617966939259756,Nn=.9617967009544373,hn=-7.028461650952758e-9,gn=[1,1.5],yn=[0,.5849624872207642],bn=[0,1.350039202129749e-8];var dn=1.4426950408889634,wn=1.4426950216293335,mn=1.9259629911266175e-8;var kn=.6931471805599453,xn=1048575;var _n=1048576,An=1071644672,En=20,jn=.6931471824645996,Tn=-1.904654299957768e-9;var In=1072693247,Un=1105199104,On=1139802112,Sn=1083179008,Fn=1072693248,Vn=1083231232,Pn=3230714880,Wn=31,$n=1e300,Gn=1e-300,Mn=8008566259537294e-32,Rn=[0,0],Cn=[0,0];function Hn(r,e){var n,t,i,u,f,a,o,c,v,s,l,p,N,h;if(er(r)||er(e))return NaN;if(Te.assign(e,Rn,1,0),f=Rn[0],0===Rn[1]){if(0===e)return 1;if(1===e)return r;if(-1===e)return 1/r;if(.5===e)return nr(r);if(-.5===e)return 1/nr(r);if(2===e)return r*r;if(3===e)return r*r*r;if(4===e)return(r*=r)*r;if(ye(e))return function(r,e){return-1===r?(r-r)/(r-r):1===r?1:se(r)<1==(e===Cr)?0:Cr}(r,e)}if(Te.assign(r,Rn,1,0),u=Rn[0],0===Rn[1]){if(0===u)return function(r,e){return e===Hr?Cr:e===Cr?0:e>0?Be(e)?r:0:Be(e)?Ue(Cr,r):Cr}(r,e);if(1===r)return 1;if(-1===r&&Be(e))return-1;if(ye(r))return r===Hr?Hn(-0,-e):e<0?0:Cr}if(r<0&&!1===Ye(e))return(r-r)/(r-r);if(i=se(r),n=u&me|0,t=f&me|0,o=f>>>Wn|0,a=(a=u>>>Wn|0)&&Be(e)?-1:1,t>Un){if(t>On)return function(r,e){return(Tr(r)&me)<=nn?e<0?tn*tn:un*un:e>0?tn*tn:un*un}(r,e);if(n<In)return 1===o?a*$n*$n:a*Gn*Gn;if(n>Fn)return 0===o?a*$n*$n:a*Gn*Gn;l=function(r,e){var n,t,i,u,f,a,o;return u=(i=e-1)*i*(0===(o=i)?.5:.5+o*(.25*o-.3333333333333333)),n=(a=i*mn-u*dn)-((t=rn(t=(f=wn*i)+a,0))-f),r[0]=t,r[1]=n,r}(Cn,i)}else l=function(r,e,n){var t,i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x;return w=0,n<an&&(w-=53,n=Tr(e*=ln)),w+=(n>>sn)-Lr|0,n=(m=n&fn|0)|on|0,m<=235662?k=0:m<767610?k=1:(k=0,w+=1,n-=an),f=rn(i=(b=(e=Vr(e,n))-(c=gn[k]))*(d=1/(e+c)),0),t=(n>>1|cn)+vn,o=Vr(0,t+=k<<18),y=(u=i*i)*u*(0===(x=u)?.5999999999999946:.5999999999999946+x*(.4285714285785502+x*(.33333332981837743+x*(.272728123808534+x*(.23066074577556175+.20697501780033842*x))))),o=rn(o=3+(u=f*f)+(y+=(a=d*(b-f*o-f*(e-(o-c))))*(f+i)),0),s=rn(s=(b=f*o)+(d=a*o+(y-(o-3-u))*i),0),l=Nn*s,h=(p=hn*s+(d-(s-b))*pn+bn[k])-((N=rn(N=l+p+(v=yn[k])+(g=w),0))-g-v-l),r[0]=N,r[1]=h,r}(Cn,i,n);if(p=(s=(e-(c=rn(e,0)))*l[0]+e*l[1])+(v=c*l[0]),Te.assign(p,Rn,1,0),N=en(Rn[0]),h=en(Rn[1]),N>=Sn){if(0!=(N-Sn|h))return a*$n*$n;if(s+Mn>p-v)return a*$n*$n}else if((N&me)>=Vn){if(0!=(N-Pn|h))return a*Gn*Gn;if(s<=p-v)return a*Gn*Gn}return p=function(r,e,n){var t,i,u,f,a,o,c,v,s,l;return s=((v=r&me|0)>>En)-Lr|0,c=0,v>An&&(i=Vr(0,((c=r+(_n>>s+1)>>>0)&~(xn>>(s=((c&me)>>En)-Lr|0)))>>>0),c=(c&xn|_n)>>En-s>>>0,r<0&&(c=-c),e-=i),r=en(r=Tr(o=1-((o=(u=(i=rn(i=n+e,0))*jn)+(f=(n-(i-e))*kn+i*Tn))*(t=o-(i=o*o)*(0===(l=i)?.16666666666666602:.16666666666666602+l*(l*(6613756321437934e-20+l*(4.1381367970572385e-8*l-16533902205465252e-22))-.0027777777777015593)))/(t-2)-((a=f-(o-u))+o*a)-o))),(r+=c<<En>>>0)>>En<=0?Me(o,c):Vr(o,r)}(N,v,s),a*p}var Ln=2.718281828459045,Zn=2220446049250313e-31;function qn(r){var e,n;return 0===r?1/0:((r<0?-r:r)<=1?(e=709811.662581658+r*(679979.8474157227+r*(293136.7857211597+r*(74887.54032914672+r*(12555.290582413863+r*(1443.4299244417066+r*(115.24194596137347+r*(6.309239205732627+r*(.22668404630224365+r*(.004826466289237662+4624429436045379e-20*r))))))))),n=0+r*(362880+r*(1026576+r*(1172700+r*(723680+r*(269325+r*(63273+r*(9450+r*(870+r*(45+1*r)))))))))):(e=4624429436045379e-20+(r=1/r)*(.004826466289237662+r*(.22668404630224365+r*(6.309239205732627+r*(115.24194596137347+r*(1443.4299244417066+r*(12555.290582413863+r*(74887.54032914672+r*(293136.7857211597+r*(679979.8474157227+709811.662581658*r))))))))),n=1+r*(45+r*(870+r*(9450+r*(63273+r*(269325+r*(723680+r*(1172700+r*(1026576+r*(362880+0*r)))))))))),e/n)}var zn=10.900511;function Xn(r,e){var n,t,i,u,f,a,o;return er(r)||er(e)||r<0||e<0?NaN:1===e?1/r:1===r?1/e:(o=r+e)<Zn?(f=o/r,f/=e):o===r&&e<Zn?1/e:o===e&&r<Zn?1/r:(r<e&&(a=e,e=r,r=a),t=r+zn-.5,i=e+zn-.5,u=o+zn-.5,f=qn(r)*(qn(e)/qn(o)),se(e*(n=r-.5-e))<100*u&&r>100?f*=Xe(n*ae(-e/u)):f*=Hn(t/u,n),f*=Hn(u>1e10?t/u*(i/u):t*i/(u*u),e),f*=nr(Ln/i))}function Yn(r){return 0===r&&1/r===Cr}function Dn(r,e){return er(r)||er(e)?NaN:r===Cr||e===Cr?Cr:r===e&&0===r?Yn(r)?r:e:r>e?r:e}function Bn(r){return 0===r&&1/r===Hr}function Jn(r,e){return er(r)||er(e)?NaN:r===Hr||e===Hr?Hr:r===e&&0===r?Bn(r)?r:e:r<e?r:e}var Kn=17976931348623157e292,Qn=2147483647,rt=1.5707963267948966,et=3.141592653589793;function nt(r,e){var n,t,i,u;return i=(u=r*r)*u,t=u*function(r){return 0===r?.0416666666666666:.0416666666666666+r*(2480158728947673e-20*r-.001388888888887411)}(u),t+=i*i*function(r){return 0===r?-2.7557314351390663e-7:r*(2.087572321298175e-9+-11359647557788195e-27*r)-2.7557314351390663e-7}(u),(i=1-(n=.5*u))+(1-i-n+(u*t-r*e))}var tt=-.16666666666666632,it=.00833333333332249,ut=-.0001984126982985795,ft=27557313707070068e-22,at=-2.5050760253406863e-8,ot=1.58969099521155e-10;function ct(r,e){var n,t,i;return n=it+(i=r*r)*(ut+i*ft)+i*(i*i)*(at+i*ot),t=i*r,0===e?r+t*(tt+i*n):r-(i*(.5*e-t*n)-e-t*tt)}var vt=!0===_r?0:1,st=new lr(1),lt=new ar(st.buffer);function pt(r){return function(r,e){var n,t;for(n=[],t=0;t<e;t++)n.push(r);return n}(0,r)}var Nt=[10680707,7228996,1387004,2578385,16069853,12639074,9804092,4427841,16666979,11263675,12935607,2387514,4345298,14681673,3074569,13734428,16653803,1880361,10960616,8533493,3062596,8710556,7349940,6258241,3772886,3769171,3798172,8675211,12450088,3874808,9961438,366607,15675153,9132554,7151469,3571407,2607881,12013382,4155038,6285869,7677882,13102053,15825725,473591,9065106,15363067,6271263,9264392,5636912,4652155,7056368,13614112,10155062,1944035,9527646,15080200,6658437,6231200,6832269,16767104,5075751,3212806,1398474,7579849,6349435,12618859],ht=[1.570796251296997,7.549789415861596e-8,5390302529957765e-30,3282003415807913e-37,1270655753080676e-44,12293330898111133e-52,27337005381646456e-60,21674168387780482e-67],gt=16777216,yt=5.960464477539063e-8,bt=pt(20),dt=pt(20),wt=pt(20),mt=pt(20);function kt(r,e,n,t,i,u,f,a,o){var c,v,s,l,p,N,h,g,y;for(l=u,y=t[n],g=n,p=0;g>0;p++)v=yt*y|0,mt[p]=y-gt*v|0,y=t[g-1]+v,g-=1;if(y=Me(y,i),y-=8*Kr(.125*y),y-=h=0|y,s=0,i>0?(h+=p=mt[n-1]>>24-i,mt[n-1]-=p<<24-i,s=mt[n-1]>>23-i):0===i?s=mt[n-1]>>23:y>=.5&&(s=2),s>0){for(h+=1,c=0,p=0;p<n;p++)g=mt[p],0===c?0!==g&&(c=1,mt[p]=16777216-g):mt[p]=16777215-g;if(i>0)switch(i){case 1:mt[n-1]&=8388607;break;case 2:mt[n-1]&=4194303}2===s&&(y=1-y,0!==c&&(y-=Me(1,i)))}if(0===y){for(g=0,p=n-1;p>=u;p--)g|=mt[p];if(0===g){for(N=1;0===mt[u-N];N++);for(p=n+1;p<=n+N;p++){for(o[a+p]=Nt[f+p],v=0,g=0;g<=a;g++)v+=r[g]*o[a+(p-g)];t[p]=v}return kt(r,e,n+=N,t,i,u,f,a,o)}}if(0===y)for(n-=1,i-=24;0===mt[n];)n-=1,i-=24;else(y=Me(y,-i))>=gt?(v=yt*y|0,mt[n]=y-gt*v|0,i+=24,mt[n+=1]=v):mt[n]=0|y;for(v=Me(1,i),p=n;p>=0;p--)t[p]=v*mt[p],v*=yt;for(p=n;p>=0;p--){for(v=0,N=0;N<=l&&N<=n-p;N++)v+=ht[N]*t[p+N];wt[n-p]=v}for(v=0,p=n;p>=0;p--)v+=wt[p];for(e[0]=0===s?v:-v,v=wt[0]-v,p=1;p<=n;p++)v+=wt[p];return e[1]=0===s?v:-v,7&h}function xt(r,e,n,t){var i,u,f,a,o,c,v;for(4,(u=(n-3)/24|0)<0&&(u=0),a=n-24*(u+1),c=u-(f=t-1),v=f+4,o=0;o<=v;o++)bt[o]=c<0?0:Nt[c],c+=1;for(o=0;o<=4;o++){for(i=0,c=0;c<=f;c++)i+=r[c]*bt[f+(o-c)];dt[o]=i}return 4,kt(r,e,4,dt,a,4,u,f,bt)}var _t=Math.round,At=.6366197723675814,Et=1.5707963267341256,jt=6077100506506192e-26,Tt=6077100506303966e-26,It=20222662487959506e-37,Ut=20222662487111665e-37,Ot=84784276603689e-45,St=2047;function Ft(r,e,n){var t,i,u,f,a;return u=r-(t=_t(r*At))*Et,f=t*jt,a=e>>20|0,n[0]=u-f,a-(Tr(n[0])>>20&St)>16&&(f=t*It-((i=u)-(u=i-(f=t*Tt))-f),n[0]=u-f,a-(Tr(n[0])>>20&St)>49&&(f=t*Ot-((i=u)-(u=i-(f=t*Ut))-f),n[0]=u-f)),n[1]=u-n[0]-f,t}var Vt=0,Pt=16777216,Wt=1.5707963267341256,$t=6077100506506192e-26,Gt=2*$t,Mt=3*$t,Rt=4*$t,Ct=598523,Ht=1072243195,Lt=1073928572,Zt=1074752122,qt=1074977148,zt=1075183036,Xt=1075388923,Yt=1075594811,Dt=1094263291,Bt=[0,0,0],Jt=[0,0];function Kt(r,e){var n,t,i,u,f,a,o;if((i=Tr(r)&me|0)<=Ht)return e[0]=r,e[1]=0,0;if(i<=Zt)return(i&xn)===Ct?Ft(r,i,e):i<=Lt?r>0?(o=r-Wt,e[0]=o-$t,e[1]=o-e[0]-$t,1):(o=r+Wt,e[0]=o+$t,e[1]=o-e[0]+$t,-1):r>0?(o=r-2*Wt,e[0]=o-Gt,e[1]=o-e[0]-Gt,2):(o=r+2*Wt,e[0]=o+Gt,e[1]=o-e[0]+Gt,-2);if(i<=Yt)return i<=zt?i===qt?Ft(r,i,e):r>0?(o=r-3*Wt,e[0]=o-Mt,e[1]=o-e[0]-Mt,3):(o=r+3*Wt,e[0]=o+Mt,e[1]=o-e[0]+Mt,-3):i===Xt?Ft(r,i,e):r>0?(o=r-4*Wt,e[0]=o-Rt,e[1]=o-e[0]-Rt,4):(o=r+4*Wt,e[0]=o+Rt,e[1]=o-e[0]+Rt,-4);if(i<Dt)return Ft(r,i,e);if(i>=Ve)return e[0]=NaN,e[1]=NaN,0;for(n=function(r){return st[0]=r,lt[vt]}(r),o=Rr(i-((t=(i>>20)-1046)<<20|0),n),f=0;f<2;f++)Bt[f]=0|o,o=(o-Bt[f])*Pt;for(Bt[2]=o,u=3;Bt[u-1]===Vt;)u-=1;return a=xt(Bt,Jt,t,u),r<0?(e[0]=-Jt[0],e[1]=-Jt[1],-a):(e[0]=Jt[0],e[1]=Jt[1],a)}var Qt=1072243195,ri=1045430272,ei=[0,0];function ni(r){var e;if(e=Tr(r),(e&=me)<=Qt)return e<ri?r:ct(r,0);if(e>=Ve)return NaN;switch(3&Kt(r,ei)){case 0:return ct(ei[0],ei[1]);case 1:return nt(ei[0],ei[1]);case 2:return-ct(ei[0],ei[1]);default:return-nt(ei[0],ei[1])}}var ti=2.5066282746310007;function ii(r){return De(r>0?r-1:r+1)}var ui=1072693247,fi=1e300,ai=1e-300;var oi=1048575,ci=1048576,vi=1072693248,si=536870912,li=524288,pi=20,Ni=9007199254740992,hi=.9617966939259756,gi=.9617967009544373,yi=-7.028461650952758e-9,bi=[1,1.5],di=[0,.5849624872207642],wi=[0,1.350039202129749e-8];var mi=1.4426950408889634,ki=1.4426950216293335,xi=1.9259629911266175e-8;var _i=1048576,Ai=1071644672,Ei=20,ji=.6931471824645996,Ti=-1.904654299957768e-9;var Ii=1072693247,Ui=1105199104,Oi=1139802112,Si=1083179008,Fi=1072693248,Vi=1083231232,Pi=3230714880,Wi=31,$i=1e300,Gi=1e-300,Mi=8008566259537294e-32,Ri=[0,0],Ci=[0,0];function Hi(r,e){var n,t,i,u,f,a,o,c,v,s,l,p,N,h;if(er(r)||er(e))return NaN;if(Te.assign(e,Ri,1,0),f=Ri[0],0===Ri[1]){if(0===e)return 1;if(1===e)return r;if(-1===e)return 1/r;if(.5===e)return nr(r);if(-.5===e)return 1/nr(r);if(2===e)return r*r;if(3===e)return r*r*r;if(4===e)return(r*=r)*r;if(ye(e))return function(r,e){return-1===r?(r-r)/(r-r):1===r?1:se(r)<1==(e===Cr)?0:Cr}(r,e)}if(Te.assign(r,Ri,1,0),u=Ri[0],0===Ri[1]){if(0===u)return function(r,e){return e===Hr?Cr:e===Cr?0:e>0?ii(e)?r:0:ii(e)?Ue(Cr,r):Cr}(r,e);if(1===r)return 1;if(-1===r&&ii(e))return-1;if(ye(r))return r===Hr?Hi(-0,-e):e<0?0:Cr}if(r<0&&!1===Ye(e))return(r-r)/(r-r);if(i=se(r),n=u&me|0,t=f&me|0,o=f>>>Wi|0,a=(a=u>>>Wi|0)&&ii(e)?-1:1,t>Ui){if(t>Oi)return function(r,e){return(Tr(r)&me)<=ui?e<0?fi*fi:ai*ai:e>0?fi*fi:ai*ai}(r,e);if(n<Ii)return 1===o?a*$i*$i:a*Gi*Gi;if(n>Fi)return 0===o?a*$i*$i:a*Gi*Gi;l=function(r,e){var n,t,i,u,f,a,o;return u=(i=e-1)*i*(0===(o=i)?.5:.5+o*(.25*o-.3333333333333333)),n=(a=i*xi-u*mi)-((t=rn(t=(f=ki*i)+a,0))-f),r[0]=t,r[1]=n,r}(Ci,i)}else l=function(r,e,n){var t,i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x;return w=0,n<ci&&(w-=53,n=Tr(e*=Ni)),w+=(n>>pi)-Lr|0,n=(m=n&oi|0)|vi|0,m<=235662?k=0:m<767610?k=1:(k=0,w+=1,n-=ci),f=rn(i=(b=(e=Vr(e,n))-(c=bi[k]))*(d=1/(e+c)),0),t=(n>>1|si)+li,o=Vr(0,t+=k<<18),y=(u=i*i)*u*(0===(x=u)?.5999999999999946:.5999999999999946+x*(.4285714285785502+x*(.33333332981837743+x*(.272728123808534+x*(.23066074577556175+.20697501780033842*x))))),o=rn(o=3+(u=f*f)+(y+=(a=d*(b-f*o-f*(e-(o-c))))*(f+i)),0),s=rn(s=(b=f*o)+(d=a*o+(y-(o-3-u))*i),0),l=gi*s,h=(p=yi*s+(d-(s-b))*hi+wi[k])-((N=rn(N=l+p+(v=di[k])+(g=w),0))-g-v-l),r[0]=N,r[1]=h,r}(Ci,i,n);if(p=(s=(e-(c=rn(e,0)))*l[0]+e*l[1])+(v=c*l[0]),Te.assign(p,Ri,1,0),N=en(Ri[0]),h=en(Ri[1]),N>=Si){if(0!=(N-Si|h))return a*$i*$i;if(s+Mi>p-v)return a*$i*$i}else if((N&me)>=Vi){if(0!=(N-Pi|h))return a*Gi*Gi;if(s<=p-v)return a*Gi*Gi}return p=function(r,e,n){var t,i,u,f,a,o,c,v,s,l;return s=((v=r&me|0)>>Ei)-Lr|0,c=0,v>Ai&&(i=Vr(0,((c=r+(_i>>s+1)>>>0)&~(xn>>(s=((c&me)>>Ei)-Lr|0)))>>>0),c=(c&xn|_i)>>Ei-s>>>0,r<0&&(c=-c),e-=i),r=en(r=Tr(o=1-((o=(u=(i=rn(i=n+e,0))*ji)+(f=(n-(i-e))*kn+i*Ti))*(t=o-(i=o*o)*(0===(l=i)?.16666666666666602:.16666666666666602+l*(l*(6613756321437934e-20+l*(4.1381367970572385e-8*l-16533902205465252e-22))-.0027777777777015593)))/(t-2)-((a=f-(o-u))+o*a)-o))),(r+=c<<Ei>>>0)>>Ei<=0?Me(o,c):Vr(o,r)}(N,v,s),a*p}var Li=143.01608;function Zi(r){var e,n,t;return e=1+(e=1/r)*function(r){return 0===r?.08333333333334822:.08333333333334822+r*(.0034722222160545866+r*(r*(.0007873113957930937*r-.00022954996161337813)-.0026813261780578124))}(e),n=Xe(r),n=r>Li?(t=Hi(r,.5*r-.25))*(t/n):Hi(r,r-.5)/n,ti*n*e}var qi=.5772156649015329;function zi(r,e){return e/((1+qi*r)*r)}function Xi(r){var e,n,t,i;if(Ye(r)&&r<0||r===Hr||er(r))return NaN;if(0===r)return Bn(r)?Hr:Cr;if(r>171.61447887182297)return Cr;if(r<-170.5674972726612)return 0;if((n=se(r))>33)return r>=0?Zi(r):(e=0==(1&(t=Kr(n)))?-1:1,(i=n-t)>.5&&(i=n-(t+=1)),i=n*ni(et*i),e*et/(se(i)*Zi(n)));for(i=1;r>=3;)i*=r-=1;for(;r<0;){if(r>-1e-9)return zi(r,i);i/=r,r+=1}for(;r<2;){if(r<1e-9)return zi(r,i);i/=r,r+=1}return 2===r?i:i*function(r){var e,n;return 0===r?1:((r<0?-r:r)<=1?(e=1+r*(.4942148268014971+r*(.20744822764843598+r*(.04763678004571372+r*(.010421379756176158+r*(.0011913514700658638+r*(.00016011952247675185+0*r)))))),n=1+r*(.0714304917030273+r*(r*(.035823639860549865+r*(.011813978522206043+r*(r*(.0005396055804933034+-23158187332412014e-21*r)-.004456419138517973)))-.23459179571824335))):(e=0+(r=1/r)*(.00016011952247675185+r*(.0011913514700658638+r*(.010421379756176158+r*(.04763678004571372+r*(.20744822764843598+r*(.4942148268014971+1*r)))))),n=r*(.0005396055804933034+r*(r*(.011813978522206043+r*(.035823639860549865+r*(r*(.0714304917030273+1*r)-.23459179571824335)))-.004456419138517973))-23158187332412014e-21),e/n)}(r-=2)}var Yi=[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368e3,20922789888e3,355687428096e3,6402373705728e3,0x1b02b9306890000,243290200817664e4,5109094217170944e4,11240007277776077e5,2585201673888498e7,6204484017332394e8,15511210043330986e9,40329146112660565e10,10888869450418352e12,30488834461171387e13,8.841761993739702e30,26525285981219107e16,8222838654177922e18,2631308369336935e20,8683317618811886e21,29523279903960416e22,1.0333147966386145e40,37199332678990125e25,13763753091226346e27,5230226174666011e29,20397882081197444e30,8159152832478977e32,3345252661316381e34,140500611775288e37,6041526306337383e37,2658271574788449e39,11962222086548019e40,5502622159812089e42,25862324151116818e43,12413915592536073e45,6082818640342675e47,30414093201713376e48,15511187532873822e50,8065817517094388e52,42748832840600255e53,2308436973392414e56,12696403353658276e57,7109985878048635e59,40526919504877214e60,23505613312828785e62,1.3868311854568984e80,832098711274139e67,5075802138772248e68,3146997326038794e70,198260831540444e73,12688693218588417e73,8.247650592082472e90,5443449390774431e77,3647111091818868e79,24800355424368305e80,1711224524281413e83,1.1978571669969892e100,8504785885678623e86,61234458376886085e87,44701154615126844e89,3307885441519386e92,248091408113954e95,18854947016660504e95,14518309202828587e97,11324281178206297e99,8946182130782976e101,7156945704626381e103,5.797126020747368e120,4753643337012842e107,3945523969720659e109,3314240134565353e111,281710411438055e114,2.4227095383672734e130,2107757298379528e117,18548264225739844e118,1650795516090846e121,14857159644817615e122,1.352001527678403e140,12438414054641308e126,11567725070816416e128,1087366156656743e131,1032997848823906e133,9916779348709496e134,9619275968248212e136,9426890448883248e138,9332621544394415e140,9332621544394415e142,942594775983836e145,9614466715035127e146,990290071648618e149,10299016745145628e150,1081396758240291e153,1.1462805637347084e170,1226520203196138e157,1324641819451829e159,14438595832024937e160,1588245541522743e163,1.7629525510902446e180,1974506857221074e167,22311927486598138e168,25435597334721877e170,2925093693493016e173,3.393108684451898e190,3969937160808721e177,4684525849754291e179,5574585761207606e181,6689502913449127e183,8.094298525273444e200,9875044200833601e187,1214630436702533e190,1506141741511141e192,1882677176888926e194,2372173242880047e196,30126600184576594e197,3856204823625804e200,4974504222477287e202,6466855489220474e204,847158069087882e207,11182486511960043e208,14872707060906857e210,19929427461615188e212,2.6904727073180504e230,3659042881952549e217,5012888748274992e219,6917786472619489e221,9615723196941089e223,13462012475717526e225,1898143759076171e228,2695364137888163e230,3854370717180073e232,55502938327393044e233,8047926057471992e236,11749972043909107e238,1727245890454639e241,25563239178728654e242,3.80892263763057e260,5713383956445855e247,862720977423324e250,13113358856834524e251,20063439050956823e253,30897696138473508e255,4789142901463394e258,7471062926282894e260,11729568794264145e262,1.853271869493735e280,29467022724950384e266,47147236359920616e268,7590705053947219e271,12296942187394494e273,20044015765453026e275,3287218585534296e278,5423910666131589e280,9003691705778438e282,1.503616514864999e300,25260757449731984e286,4269068009004705e289,7257415615307999e291],Di=170;function Bi(r){return er(r)?NaN:Ye(r)?r<0?NaN:r<=Di?Yi[r]:Cr:Xi(r+1)}function Ji(r){var e,n;return 0===r?1/0:((r<0?-r:r)<=1?(e=38474670393.31777+r*(36857665043.51951+r*(15889202453.72942+r*(4059208354.298835+r*(680547661.1834733+r*(78239755.00312005+r*(6246580.776401795+r*(341986.3488721347+r*(12287.194511824551+r*(261.61404416416684+2.5066282746310007*r))))))))),n=0+r*(362880+r*(1026576+r*(1172700+r*(723680+r*(269325+r*(63273+r*(9450+r*(870+r*(45+1*r)))))))))):(e=2.5066282746310007+(r=1/r)*(261.61404416416684+r*(12287.194511824551+r*(341986.3488721347+r*(6246580.776401795+r*(78239755.00312005+r*(680547661.1834733+r*(4059208354.298835+r*(15889202453.72942+r*(36857665043.51951+38474670393.31777*r))))))))),n=1+r*(45+r*(870+r*(9450+r*(63273+r*(269325+r*(723680+r*(1172700+r*(1026576+r*(362880+0*r)))))))))),e/n)}var Ki=10.900511,Qi=170,ru=4269068009004705e289;function eu(r,e){var n,t,i;return r<Zn?e>Qi?(t=eu(e,Qi-e),t*=r,1/(t*=ru)):1/(r*Xi(r+e)):(i=r+Ki-.5,r+e===r?n=se(e)<10?Xe((.5-r)*ae(e/i)):1:(n=se(e)<10?Xe((.5-r)*ae(e/i)):Hn(i/(i+e),r-.5),n*=Ji(r)/Ji(r+e)),n*=Hn(Ln/(i+e),e))}var nu=170;function tu(r,e){var n,t,i;if(r<=0||r+e<=0)return Xi(r)/Xi(r+e);if((t=Kr(e))===e){if((i=Kr(r))===r&&r<=nu&&r+e<=nu)return Bi(i-1)/Bi(t+i-1);if(se(e)<20){if(0===e)return 1;if(e<0){for(n=r-=1,e+=1;0!==e;)n*=r-=1,e+=1;return n}for(n=1/r,e-=1;0!==e;)n/=r+=1,e-=1;return n}}return eu(r,e)}function iu(r){return De(r>0?r-1:r+1)}var uu=1072693247,fu=1e300,au=1e-300;var ou=1048575,cu=1048576,vu=1072693248,su=536870912,lu=524288,pu=20,Nu=9007199254740992,hu=.9617966939259756,gu=.9617967009544373,yu=-7.028461650952758e-9,bu=[1,1.5],du=[0,.5849624872207642],wu=[0,1.350039202129749e-8];var mu=1.4426950408889634,ku=1.4426950216293335,xu=1.9259629911266175e-8;var _u=1048576,Au=1071644672,Eu=20,ju=.6931471824645996,Tu=-1.904654299957768e-9;var Iu=1072693247,Uu=1105199104,Ou=1139802112,Su=1083179008,Fu=1072693248,Vu=1083231232,Pu=3230714880,Wu=31,$u=1e300,Gu=1e-300,Mu=8008566259537294e-32,Ru=[0,0],Cu=[0,0];function Hu(r,e){var n,t,i,u,f,a,o,c,v,s,l,p,N,h;if(er(r)||er(e))return NaN;if(Te.assign(e,Ru,1,0),f=Ru[0],0===Ru[1]){if(0===e)return 1;if(1===e)return r;if(-1===e)return 1/r;if(.5===e)return nr(r);if(-.5===e)return 1/nr(r);if(2===e)return r*r;if(3===e)return r*r*r;if(4===e)return(r*=r)*r;if(ye(e))return function(r,e){return-1===r?(r-r)/(r-r):1===r?1:se(r)<1==(e===Cr)?0:Cr}(r,e)}if(Te.assign(r,Ru,1,0),u=Ru[0],0===Ru[1]){if(0===u)return function(r,e){return e===Hr?Cr:e===Cr?0:e>0?iu(e)?r:0:iu(e)?Ue(Cr,r):Cr}(r,e);if(1===r)return 1;if(-1===r&&iu(e))return-1;if(ye(r))return r===Hr?Hu(-0,-e):e<0?0:Cr}if(r<0&&!1===Ye(e))return(r-r)/(r-r);if(i=se(r),n=u&me|0,t=f&me|0,o=f>>>Wu|0,a=(a=u>>>Wu|0)&&iu(e)?-1:1,t>Uu){if(t>Ou)return function(r,e){return(Tr(r)&me)<=uu?e<0?fu*fu:au*au:e>0?fu*fu:au*au}(r,e);if(n<Iu)return 1===o?a*$u*$u:a*Gu*Gu;if(n>Fu)return 0===o?a*$u*$u:a*Gu*Gu;l=function(r,e){var n,t,i,u,f,a,o;return u=(i=e-1)*i*(0===(o=i)?.5:.5+o*(.25*o-.3333333333333333)),n=(a=i*xu-u*mu)-((t=rn(t=(f=ku*i)+a,0))-f),r[0]=t,r[1]=n,r}(Cu,i)}else l=function(r,e,n){var t,i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x;return w=0,n<cu&&(w-=53,n=Tr(e*=Nu)),w+=(n>>pu)-Lr|0,n=(m=n&ou|0)|vu|0,m<=235662?k=0:m<767610?k=1:(k=0,w+=1,n-=cu),f=rn(i=(b=(e=Vr(e,n))-(c=bu[k]))*(d=1/(e+c)),0),t=(n>>1|su)+lu,o=Vr(0,t+=k<<18),y=(u=i*i)*u*(0===(x=u)?.5999999999999946:.5999999999999946+x*(.4285714285785502+x*(.33333332981837743+x*(.272728123808534+x*(.23066074577556175+.20697501780033842*x))))),o=rn(o=3+(u=f*f)+(y+=(a=d*(b-f*o-f*(e-(o-c))))*(f+i)),0),s=rn(s=(b=f*o)+(d=a*o+(y-(o-3-u))*i),0),l=gu*s,h=(p=yu*s+(d-(s-b))*hu+wu[k])-((N=rn(N=l+p+(v=du[k])+(g=w),0))-g-v-l),r[0]=N,r[1]=h,r}(Cu,i,n);if(p=(s=(e-(c=rn(e,0)))*l[0]+e*l[1])+(v=c*l[0]),Te.assign(p,Ru,1,0),N=en(Ru[0]),h=en(Ru[1]),N>=Su){if(0!=(N-Su|h))return a*$u*$u;if(s+Mu>p-v)return a*$u*$u}else if((N&me)>=Vu){if(0!=(N-Pu|h))return a*Gu*Gu;if(s<=p-v)return a*Gu*Gu}return p=function(r,e,n){var t,i,u,f,a,o,c,v,s,l;return s=((v=r&me|0)>>Eu)-Lr|0,c=0,v>Au&&(i=Vr(0,((c=r+(_u>>s+1)>>>0)&~(xn>>(s=((c&me)>>Eu)-Lr|0)))>>>0),c=(c&xn|_u)>>Eu-s>>>0,r<0&&(c=-c),e-=i),r=en(r=Tr(o=1-((o=(u=(i=rn(i=n+e,0))*ju)+(f=(n-(i-e))*kn+i*Tu))*(t=o-(i=o*o)*(0===(l=i)?.16666666666666602:.16666666666666602+l*(l*(6613756321437934e-20+l*(4.1381367970572385e-8*l-16533902205465252e-22))-.0027777777777015593)))/(t-2)-((a=f-(o-u))+o*a)-o))),(r+=c<<Eu>>>0)>>Eu<=0?Me(o,c):Vr(o,r)}(N,v,s),a*p}var Lu=143.01608;function Zu(r){var e,n,t;return e=1+(e=1/r)*function(r){return 0===r?.08333333333334822:.08333333333334822+r*(.0034722222160545866+r*(r*(.0007873113957930937*r-.00022954996161337813)-.0026813261780578124))}(e),n=Xe(r),n=r>Lu?(t=Hu(r,.5*r-.25))*(t/n):Hu(r,r-.5)/n,ti*n*e}function qu(r,e){return e/((1+qi*r)*r)}var zu=170,Xu=[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,6227020800,87178291200,1307674368e3,20922789888e3,355687428096e3,6402373705728e3,0x1b02b9306890000,243290200817664e4,5109094217170944e4,11240007277776077e5,2585201673888498e7,6204484017332394e8,15511210043330986e9,40329146112660565e10,10888869450418352e12,30488834461171387e13,8.841761993739702e30,26525285981219107e16,8222838654177922e18,2631308369336935e20,8683317618811886e21,29523279903960416e22,1.0333147966386145e40,37199332678990125e25,13763753091226346e27,5230226174666011e29,20397882081197444e30,8159152832478977e32,3345252661316381e34,140500611775288e37,6041526306337383e37,2658271574788449e39,11962222086548019e40,5502622159812089e42,25862324151116818e43,12413915592536073e45,6082818640342675e47,30414093201713376e48,15511187532873822e50,8065817517094388e52,42748832840600255e53,2308436973392414e56,12696403353658276e57,7109985878048635e59,40526919504877214e60,23505613312828785e62,1.3868311854568984e80,832098711274139e67,5075802138772248e68,3146997326038794e70,198260831540444e73,12688693218588417e73,8.247650592082472e90,5443449390774431e77,3647111091818868e79,24800355424368305e80,1711224524281413e83,1.1978571669969892e100,8504785885678623e86,61234458376886085e87,44701154615126844e89,3307885441519386e92,248091408113954e95,18854947016660504e95,14518309202828587e97,11324281178206297e99,8946182130782976e101,7156945704626381e103,5.797126020747368e120,4753643337012842e107,3945523969720659e109,3314240134565353e111,281710411438055e114,2.4227095383672734e130,2107757298379528e117,18548264225739844e118,1650795516090846e121,14857159644817615e122,1.352001527678403e140,12438414054641308e126,11567725070816416e128,1087366156656743e131,1032997848823906e133,9916779348709496e134,9619275968248212e136,9426890448883248e138,9332621544394415e140,9332621544394415e142,942594775983836e145,9614466715035127e146,990290071648618e149,10299016745145628e150,1081396758240291e153,1.1462805637347084e170,1226520203196138e157,1324641819451829e159,14438595832024937e160,1588245541522743e163,1.7629525510902446e180,1974506857221074e167,22311927486598138e168,25435597334721877e170,2925093693493016e173,3.393108684451898e190,3969937160808721e177,4684525849754291e179,5574585761207606e181,6689502913449127e183,8.094298525273444e200,9875044200833601e187,1214630436702533e190,1506141741511141e192,1882677176888926e194,2372173242880047e196,30126600184576594e197,3856204823625804e200,4974504222477287e202,6466855489220474e204,847158069087882e207,11182486511960043e208,14872707060906857e210,19929427461615188e212,2.6904727073180504e230,3659042881952549e217,5012888748274992e219,6917786472619489e221,9615723196941089e223,13462012475717526e225,1898143759076171e228,2695364137888163e230,3854370717180073e232,55502938327393044e233,8047926057471992e236,11749972043909107e238,1727245890454639e241,25563239178728654e242,3.80892263763057e260,5713383956445855e247,862720977423324e250,13113358856834524e251,20063439050956823e253,30897696138473508e255,4789142901463394e258,7471062926282894e260,11729568794264145e262,1.853271869493735e280,29467022724950384e266,47147236359920616e268,7590705053947219e271,12296942187394494e273,20044015765453026e275,3287218585534296e278,5423910666131589e280,9003691705778438e282,1.503616514864999e300,25260757449731984e286,4269068009004705e289,7257415615307999e291];function Yu(r){return er(r)?NaN:Ye(r)?r<0?NaN:r<=zu?Xu[r]:Cr:function(r){var e,n,t,i;if(Ye(r)&&r<0||r===Hr||er(r))return NaN;if(0===r)return Bn(r)?Hr:Cr;if(r>171.61447887182297)return Cr;if(r<-170.5674972726612)return 0;if((n=se(r))>33)return r>=0?Zu(r):(e=0==(1&(t=Kr(n)))?-1:1,(i=n-t)>.5&&(i=n-(t+=1)),i=n*ni(et*i),e*et/(se(i)*Zu(n)));for(i=1;r>=3;)i*=r-=1;for(;r<0;){if(r>-1e-9)return qu(r,i);i/=r,r+=1}for(;r<2;){if(r<1e-9)return qu(r,i);i/=r,r+=1}return 2===r?i:i*function(r){var e,n;return 0===r?1:((r<0?-r:r)<=1?(e=1+r*(.4942148268014971+r*(.20744822764843598+r*(.04763678004571372+r*(.010421379756176158+r*(.0011913514700658638+r*(.00016011952247675185+0*r)))))),n=1+r*(.0714304917030273+r*(r*(.035823639860549865+r*(.011813978522206043+r*(r*(.0005396055804933034+-23158187332412014e-21*r)-.004456419138517973)))-.23459179571824335))):(e=0+(r=1/r)*(.00016011952247675185+r*(.0011913514700658638+r*(.010421379756176158+r*(.04763678004571372+r*(.20744822764843598+r*(.4942148268014971+1*r)))))),n=r*(.0005396055804933034+r*(r*(.011813978522206043+r*(.035823639860549865+r*(r*(.0714304917030273+1*r)-.23459179571824335)))-.004456419138517973))-23158187332412014e-21),e/n)}(r-=2)}(r+1)}var Du=.6931471803691238,Bu=1.9082149292705877e-10,Ju=0x40000000000000,Ku=.3333333333333333,Qu=1048575,rf=2146435072,ef=1048576,nf=1072693248;function tf(r){var e,n,t,i,u,f,a,o,c,v,s,l;return 0===r?Hr:er(r)||r<0?NaN:(u=0,(n=Tr(r))<ef&&(u-=54,n=Tr(r*=Ju)),n>=rf?r+r:(u+=(n>>20)-Lr|0,u+=(o=(n&=Qu)+614244&1048576|0)>>20|0,a=(r=Vr(r,n|o^nf))-1,(Qu&2+n)<3?0===a?0===u?0:u*Du+u*Bu:(f=a*a*(.5-Ku*a),0===u?a-f:u*Du-(f-u*Bu-a)):(o=n-398458|0,c=440401-n|0,i=(s=(l=(v=a/(2+a))*v)*l)*function(r){return 0===r?.3999999999940942:.3999999999940942+r*(.22222198432149784+.15313837699209373*r)}(s),t=l*function(r){return 0===r?.6666666666666735:.6666666666666735+r*(.2857142874366239+r*(.1818357216161805+.14798198605116586*r))}(s),f=t+i,(o|=c)>0?(e=.5*a*a,0===u?a-(e-v*(e+f)):u*Du-(e-(v*(e+f)+u*Bu)-a)):0===u?a-v*(a-f):u*Du-(v*(a-f)-u*Bu-a))))}var uf=[0,0],ff=2147483647,af=1072243195,of=1044381696,cf=2146435072;function vf(r){var e;if(e=Tr(r),(e&=ff)<=af)return e<of?1:nt(r,0);if(e>=cf)return NaN;switch(3&Kt(r,uf)){case 0:return nt(uf[0],uf[1]);case 1:return-ct(uf[0],uf[1]);case 2:return-nt(uf[0],uf[1]);default:return ct(uf[0],uf[1])}}var sf=.07721566490153287,lf=.3224670334241136,pf=1,Nf=-.07721566490153287,hf=.48383612272381005,gf=-.1475877229945939,yf=.06462494023913339,bf=-.07721566490153287,df=1,wf=.4189385332046727,mf=1.4616321449683622,kf=4503599627370496,xf=0x400000000000000,_f=8470329472543003e-37,Af=1.4616321449683622,Ef=-.12148629053584961,jf=-3638676997039505e-33;function Tf(r){var e,n,t,i,u,f,a,o,c,v,s,l,p;if(er(r)||ye(r))return r;if(0===r)return Cr;if(r<0?(e=!0,r=-r):e=!1,r<_f)return-tf(r);if(e){if(r>=kf)return Cr;if(c=function(r){var e,n;return er(r)||ye(r)?NaN:0===(e=se(n=r%2))||1===e?Ue(0,n):e<.25?ni(et*n):e<.75?Ue(vf(et*(e=.5-e)),n):e<1.25?(n=Ue(1,n)-n,ni(et*n)):e<1.75?-Ue(vf(et*(e-=1.5)),n):(n-=Ue(2,n),ni(et*n))}(r),0===c)return Cr;n=tf(et/se(c*r))}if(1===r||2===r)return 0;if(r<2)switch(r<=.9?(p=-tf(r),r>=mf-1+.27?(s=1-r,t=0):r>=mf-1-.27?(s=r-(Af-1),t=1):(s=r,t=2)):(p=0,r>=mf+.27?(s=2-r,t=0):r>=mf-.27?(s=r-Af,t=1):(s=r-1,t=2)),t){case 0:f=sf+(l=s*s)*function(r){return 0===r?.06735230105312927:.06735230105312927+r*(.007385550860814029+r*(.0011927076318336207+r*(.00022086279071390839+25214456545125733e-21*r)))}(l),u=l*(lf+l*function(r){return 0===r?.020580808432516733:.020580808432516733+r*(.0028905138367341563+r*(.0005100697921535113+r*(.00010801156724758394+44864094961891516e-21*r)))}(l)),p+=(a=s*f+u)-.5*s;break;case 1:f=hf+(v=(l=s*s)*s)*function(r){return 0===r?-.032788541075985965:r*(.006100538702462913+r*(.00031563207090362595*r-.0014034646998923284))-.032788541075985965}(v),u=gf+v*function(r){return 0===r?.01797067508118204:.01797067508118204+r*(r*(.000881081882437654+-.00031275416837512086*r)-.0036845201678113826)}(v),i=yf+v*function(r){return 0===r?-.010314224129834144:r*(.0022596478090061247+r*(.0003355291926355191*r-.0005385953053567405))-.010314224129834144}(v),p+=Ef+(a=l*f-(jf-v*(u+s*i)));break;case 2:f=s*(bf+s*function(r){return 0===r?.6328270640250934:.6328270640250934+r*(1.4549225013723477+r*(.9777175279633727+r*(.22896372806469245+.013381091853678766*r)))}(s)),u=df+s*function(r){return 0===r?2.4559779371304113:2.4559779371304113+r*(2.128489763798934+r*(.7692851504566728+r*(.10422264559336913+.003217092422824239*r)))}(s),p+=-.5*s+f/u}else if(r<8)switch(a=(s=r-(t=pe(r)))*(Nf+s*function(r){return 0===r?.21498241596060885:.21498241596060885+r*(.325778796408931+r*(.14635047265246445+r*(.02664227030336386+r*(.0018402845140733772+3194753265841009e-20*r))))}(s)),o=pf+s*function(r){return 0===r?1.3920053346762105:1.3920053346762105+r*(.7219355475671381+r*(.17193386563280308+r*(.01864591917156529+r*(.0007779424963818936+7326684307446256e-21*r))))}(s),p=.5*s+a/o,l=1,t){case 7:l*=s+6;case 6:l*=s+5;case 5:l*=s+4;case 4:l*=s+3;case 3:p+=tf(l*=s+2)}else r<xf?(c=tf(r),v=wf+(l=1/r)*function(r){return 0===r?.08333333333333297:.08333333333333297+r*(r*(.0007936505586430196+r*(r*(.0008363399189962821+-.0016309293409657527*r)-.00059518755745034))-.0027777777772877554)}(s=l*l),p=(r-.5)*(c-1)+v):p=r*(tf(r)-1);return e&&(p=n-p),p}var If=143.01608;function Uf(r){var e,n,t;return e=1+(e=1/r)*function(r){return 0===r?.08333333333334822:.08333333333334822+r*(.0034722222160545866+r*(r*(.0007873113957930937*r-.00022954996161337813)-.0026813261780578124))}(e),n=Xe(r),n=r>If?(t=Hn(r,.5*r-.25))*(t/n):Hn(r,r-.5)/n,ti*n*e}function Of(r,e){return e/((1+qi*r)*r)}function Sf(r){var e,n,t,i;if(Ye(r)&&r<0||r===Hr||er(r))return NaN;if(0===r)return Bn(r)?Hr:Cr;if(r>171.61447887182297)return Cr;if(r<-170.5674972726612)return 0;if((n=se(r))>33)return r>=0?Uf(r):(e=0==(1&(t=Kr(n)))?-1:1,(i=n-t)>.5&&(i=n-(t+=1)),i=n*ni(et*i),e*et/(se(i)*Uf(n)));for(i=1;r>=3;)i*=r-=1;for(;r<0;){if(r>-1e-9)return Of(r,i);i/=r,r+=1}for(;r<2;){if(r<1e-9)return Of(r,i);i/=r,r+=1}return 2===r?i:i*function(r){var e,n;return 0===r?1:((r<0?-r:r)<=1?(e=1+r*(.4942148268014971+r*(.20744822764843598+r*(.04763678004571372+r*(.010421379756176158+r*(.0011913514700658638+r*(.00016011952247675185+0*r)))))),n=1+r*(.0714304917030273+r*(r*(.035823639860549865+r*(.011813978522206043+r*(r*(.0005396055804933034+-23158187332412014e-21*r)-.004456419138517973)))-.23459179571824335))):(e=0+(r=1/r)*(.00016011952247675185+r*(.0011913514700658638+r*(.010421379756176158+r*(.04763678004571372+r*(.20744822764843598+r*(.4942148268014971+1*r)))))),n=r*(.0005396055804933034+r*(r*(.011813978522206043+r*(.035823639860549865+r*(r*(.0714304917030273+1*r)-.23459179571824335)))-.004456419138517973))-23158187332412014e-21),e/n)}(r-=2)}var Ff=1.4901161193847656e-8,Vf=709.782712893384;var Pf=1e-300,Wf=13877787807814457e-33,$f=.8450629115104675,Gf=.12837916709551256,Mf=1,Rf=-.0023621185607526594,Cf=1,Hf=-.009864944034847148,Lf=1,Zf=-.0098649429247001,qf=1;function zf(r){var e,n,t,i,u,f,a,o;if(er(r))return NaN;if(r===Cr)return 0;if(r===Hr)return 2;if(0===r)return 1;if(r<0?(e=!0,n=-r):(e=!1,n=r),n<.84375)return n<Wf?1-r:(i=Gf+(t=r*r)*function(r){return 0===r?-.3250421072470015:r*(r*(-23763016656650163e-21*r-.005770270296489442)-.02848174957559851)-.3250421072470015}(t),u=Mf+t*function(r){return 0===r?.39791722395915535:.39791722395915535+r*(.0650222499887673+r*(.005081306281875766+r*(.00013249473800432164+-3960228278775368e-21*r)))}(t),f=i/u,r<.25?1-(r+r*f):(i=r*f,.5-(i+=r-.5)));if(n<1.25)return a=Rf+(u=n-1)*function(r){return 0===r?.41485611868374833:.41485611868374833+r*(r*(.31834661990116175+r*(r*(.035478304325618236+-.002166375594868791*r)-.11089469428239668))-.3722078760357013)}(u),o=Cf+u*function(r){return 0===r?.10642088040084423:.10642088040084423+r*(.540397917702171+r*(.07182865441419627+r*(.12617121980876164+r*(.01363708391202905+.011984499846799107*r))))}(u),e?1+$f+a/o:1-$f-a/o;if(n<28){if(u=1/(n*n),n<2.857142857142857)i=Hf+u*function(r){return 0===r?-.6938585727071818:r*(r*(r*(r*(r*(-9.814329344169145*r-81.2874355063066)-184.60509290671104)-162.39666946257347)-62.375332450326006)-10.558626225323291)-.6938585727071818}(u),u=Lf+u*function(r){return 0===r?19.651271667439257:19.651271667439257+r*(137.65775414351904+r*(434.56587747522923+r*(645.3872717332679+r*(429.00814002756783+r*(108.63500554177944+r*(6.570249770319282+-.0604244152148581*r))))))}(u);else{if(r<-6)return 2-Pf;i=Zf+u*function(r){return 0===r?-.799283237680523:r*(r*(r*(r*(-483.5191916086514*r-1025.0951316110772)-637.5664433683896)-160.63638485582192)-17.757954917754752)-.799283237680523}(u),u=qf+u*function(r){return 0===r?30.33806074348246:30.33806074348246+r*(325.7925129965739+r*(1536.729586084437+r*(3199.8582195085955+r*(2553.0504064331644+r*(474.52854120695537+-22.44095244658582*r)))))}(u)}return i=Xe(-(t=rn(n,0))*t-.5625)*Xe((t-n)*(t+n)+i/u),e?2-i/n:i/n}return e?2-Pf:Pf*Pf}var Xf=-708.3964185322641;function Yf(r,e){var n;return n=r*tf(e),e>=1?n<Vf&&-e>Xf?Hn(e,r)*Xe(-e):r>=1?Hn(e/Xe(e/r),r):Xe(n-e):n>Xf?Hn(e,r)*Xe(-e):e/r<Vf?Hn(e/Xe(e/r),r):Xe(n-e)}function Df(r,e){var n,t;if((t=r.length)<2||0===e)return 0===t?0:r[0];for(n=r[t-=1]*e+r[t-1],t-=2;t>=0;)n=n*e+r[t],t-=1;return n}var Bf=Function;$(Df,"factory",(function(r){var e,n,t,i;if(r.length>500)return function(e){return Df(r,e)};if(e="return function evalpoly(x){",0===(n=r.length))e+="return 0.0;";else if(1===n)e+="return "+r[0]+";";else{for(e+="if(x===0.0){return "+r[0]+";}",e+="return "+r[0],t=n-1,i=1;i<n;i++)e+="+x*",i<t&&(e+="("),e+=r[i];for(i=0;i<t-1;i++)e+=")";e+=";"}return e+="}",new Bf(e+="//# sourceURL=evalpoly.factory.js")()}));var Jf=eval;function Kf(){var r;try{Jf('"use strict"; (function* () {})'),r=!0}catch(e){r=!1}return r}var Qf;Qf=Kf()?function(r,e){var n,t,i,u,f;if(f={},arguments.length>1&&(f=e),n=f.tolerance||Zn,i=f.maxTerms||1e6,u=f.initialValue||0,!0==("function"==typeof r.next)){for(t of r)if(se(n*(u+=t))>=se(t)||0==--i)break}else do{u+=t=r()}while(se(n*u)<se(t)&&--i);return u}:function(r,e){var n,t,i,u,f;f={},arguments.length>1&&(f=e),n=f.tolerance||Zn,i=f.maxTerms||1e6,u=f.initialValue||0;do{u+=t=r()}while(se(n*u)<se(t)&&--i);return u};var ra=Qf;var ea=6.283185307179586;var na=[0,0,0,0,0,0,0,0,0,0];function ta(r,e){var n,t,i,u;return t=-function(r){var e,n;return r<=-1?NaN:(n=se(r))>.95?tf(1+r)-r:n<Zn?-r*r/2:(e={initialValue:-r},ra(function(r){var e=-r,n=-1,t=0;return function(){return(n*=e)/(t+=1)}}(r),e))}((e-r)/r),i=r*t,u=nr(2*t),e<r&&(u=-u),na[0]=function(r){return 0===r?-.3333333333333333:r*(.08333333333333333+r*(r*(.0011574074074074073+r*(.0003527336860670194+r*(r*(3919263178522438e-20+r*(r*(r*(8.296711340953087e-7+r*(r*(6.707853543401498e-9+r*(1.0261809784240309e-8+r*(9.14769958223679e-10*r-4.382036018453353e-9)))-1.7665952736826078e-7))-185406221071516e-20)-21854485106799924e-22))-.0001787551440329218)))-.014814814814814815))-.3333333333333333}(u),na[1]=function(r){return 0===r?-.001851851851851852:r*(r*(.0026455026455026454+r*(r*(.00020576131687242798+r*(r*(r*(764916091608111e-20+r*(r*(4.647127802807434e-9+r*(1.378633446915721e-7+r*(1.1951628599778148e-8*r-5.752545603517705e-8)))-16120900894563446e-22))-18098550334489977e-21)-4.018775720164609e-7))-.0009902263374485596))-.003472222222222222)-.001851851851851852}(u),na[2]=function(r){return 0===r?.004133597883597883:.004133597883597883+r*(r*(.0007716049382716049+r*(20093878600823047e-22+r*(r*(52923448829120125e-21+r*(r*(3.423578734096138e-8+r*(13721957309062932e-22+r*(1.4280614206064242e-7*r-6.298992138380055e-7)))-12760635188618728e-21))-.00010736653226365161)))-.0026813271604938273)}(u),na[3]=function(r){return 0===r?.0006494341563786008:.0006494341563786008+r*(.00022947209362139917+r*(r*(.00026772063206283885+r*(r*(r*(11082654115347302e-21+r*(14230900732435883e-22*r-56749528269915965e-22))-2.396505113867297e-7)-7561801671883977e-20))-.0004691894943952557))}(u),na[4]=function(r){return 0===r?-.0008618882909167117:r*(.0007840392217200666+r*(r*(r*(6641498215465122e-20+r*(11375726970678419e-21*r-3968365047179435e-20))-14638452578843418e-22)-.0002990724803031902))-.0008618882909167117}(u),na[5]=function(r){return 0===r?-.00033679855336635813:r*(r*(.0002772753244959392+r*(r*(6797780477937208e-20+r*(1.419062920643967e-7+r*(r*(8018470256334202e-21+-2291481176508095e-21*r)-13594048189768693e-21)))-.00019932570516188847))-6972813758365858e-20)-.00033679855336635813}(u),na[6]=function(r){return 0===r?.0005313079364639922:.0005313079364639922+r*(r*(.0002708782096718045+r*(7.902353232660328e-7+r*(r*(561168275310625e-19+-18329116582843375e-21*r)-8153969367561969e-20)))-.0005921664373536939)}(u),na[7]=function(r){return 0===r?.00034436760689237765:.00034436760689237765+r*(5171790908260592e-20+r*(r*(.0002812695154763237+-.00010976582244684731*r)-.00033493161081142234))}(u),na[8]=function(r){return 0===r?-.0006526239185953094:r*(.0008394987206720873+-.000438297098541721*r)-.0006526239185953094}(u),na[9]=-.0005967612901927463,n=Df(na,1/r),n*=Xe(-i)/nr(ea*r),e<r&&(n=-n),n+=zf(nr(i))/2}function ia(r,e,n){var t;return n=n||0,t=function(r,e){var n=1,t=r,i=e;return function(){var r=n;return n*=i/(t+=1),r}}(r,e),ra(t,{initialValue:n})}function ua(r){var e,n;return 0===r?1/0:((r<0?-r:r)<=1?(e=709811.662581658+r*(679979.8474157227+r*(293136.7857211597+r*(74887.54032914672+r*(12555.290582413863+r*(1443.4299244417066+r*(115.24194596137347+r*(6.309239205732627+r*(.22668404630224365+r*(.004826466289237662+4624429436045379e-20*r))))))))),n=0+r*(362880+r*(1026576+r*(1172700+r*(723680+r*(269325+r*(63273+r*(9450+r*(870+r*(45+1*r)))))))))):(e=4624429436045379e-20+(r=1/r)*(.004826466289237662+r*(.22668404630224365+r*(6.309239205732627+r*(115.24194596137347+r*(1443.4299244417066+r*(12555.290582413863+r*(74887.54032914672+r*(293136.7857211597+r*(679979.8474157227+709811.662581658*r))))))))),n=1+r*(45+r*(870+r*(9450+r*(63273+r*(269325+r*(723680+r*(1172700+r*(1026576+r*(362880+0*r)))))))))),e/n)}function fa(r,e){return er(r)||er(e)?NaN:r===Cr||e===Cr?Cr:r===e&&0===r?Yn(r)?r:e:r>e?r:e}function aa(r,e){var n,t,i,u,f,a,o;return o=(e-r-Ki+.5)/(i=r+Ki-.5),r<1?e<=Xf?Xe(r*tf(e)-e-Tf(r)):Hn(e,r)*Xe(-e)/Sf(r):(se(o*o*r)<=100&&r>150?n=Xe(n=r*(ae(o)-o)+e*(.5-Ki)/i):Jn(u=r*tf(e/i),f=r-e)<=Xf||fa(u,f)>=Vf?(t=f/r,Jn(u,f)/2>Xf&&fa(u,f)/2<Vf?n=(a=Hn(e/i,r/2)*Xe(f/2))*a:Jn(u,f)/4>Xf&&fa(u,f)/4<Vf&&e>r?(n=(a=Hn(e/i,r/4)*Xe(f/4))*a,n*=n):n=t>Xf&&t<Vf?Hn(e*Xe(t)/i,r):Xe(u+f)):n=Hn(e/i,r)*Xe(f),n*=nr(i/Ln)/ua(r))}function oa(r){return De(r>0?r-1:r+1)}var ca=1072693247,va=1e300,sa=1e-300;var la=1048575,pa=1048576,Na=1072693248,ha=536870912,ga=524288,ya=20,ba=9007199254740992,da=.9617966939259756,wa=.9617967009544373,ma=-7.028461650952758e-9,ka=[1,1.5],xa=[0,.5849624872207642],_a=[0,1.350039202129749e-8];var Aa=1.4426950408889634,Ea=1.4426950216293335,ja=1.9259629911266175e-8;var Ta=1048576,Ia=1071644672,Ua=20,Oa=.6931471824645996,Sa=-1.904654299957768e-9;var Fa=1072693247,Va=1105199104,Pa=1139802112,Wa=1083179008,$a=1072693248,Ga=1083231232,Ma=3230714880,Ra=31,Ca=1e300,Ha=1e-300,La=8008566259537294e-32,Za=[0,0],qa=[0,0];function za(r,e){var n,t,i,u,f,a,o,c,v,s,l,p,N,h;if(er(r)||er(e))return NaN;if(Te.assign(e,Za,1,0),f=Za[0],0===Za[1]){if(0===e)return 1;if(1===e)return r;if(-1===e)return 1/r;if(.5===e)return nr(r);if(-.5===e)return 1/nr(r);if(2===e)return r*r;if(3===e)return r*r*r;if(4===e)return(r*=r)*r;if(ye(e))return function(r,e){return-1===r?(r-r)/(r-r):1===r?1:se(r)<1==(e===Cr)?0:Cr}(r,e)}if(Te.assign(r,Za,1,0),u=Za[0],0===Za[1]){if(0===u)return function(r,e){return e===Hr?Cr:e===Cr?0:e>0?oa(e)?r:0:oa(e)?Ue(Cr,r):Cr}(r,e);if(1===r)return 1;if(-1===r&&oa(e))return-1;if(ye(r))return r===Hr?za(-0,-e):e<0?0:Cr}if(r<0&&!1===Ye(e))return(r-r)/(r-r);if(i=se(r),n=u&me|0,t=f&me|0,o=f>>>Ra|0,a=(a=u>>>Ra|0)&&oa(e)?-1:1,t>Va){if(t>Pa)return function(r,e){return(Tr(r)&me)<=ca?e<0?va*va:sa*sa:e>0?va*va:sa*sa}(r,e);if(n<Fa)return 1===o?a*Ca*Ca:a*Ha*Ha;if(n>$a)return 0===o?a*Ca*Ca:a*Ha*Ha;l=function(r,e){var n,t,i,u,f,a,o;return u=(i=e-1)*i*(0===(o=i)?.5:.5+o*(.25*o-.3333333333333333)),n=(a=i*ja-u*Aa)-((t=rn(t=(f=Ea*i)+a,0))-f),r[0]=t,r[1]=n,r}(qa,i)}else l=function(r,e,n){var t,i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x;return w=0,n<pa&&(w-=53,n=Tr(e*=ba)),w+=(n>>ya)-Lr|0,n=(m=n&la|0)|Na|0,m<=235662?k=0:m<767610?k=1:(k=0,w+=1,n-=pa),f=rn(i=(b=(e=Vr(e,n))-(c=ka[k]))*(d=1/(e+c)),0),t=(n>>1|ha)+ga,o=Vr(0,t+=k<<18),y=(u=i*i)*u*(0===(x=u)?.5999999999999946:.5999999999999946+x*(.4285714285785502+x*(.33333332981837743+x*(.272728123808534+x*(.23066074577556175+.20697501780033842*x))))),o=rn(o=3+(u=f*f)+(y+=(a=d*(b-f*o-f*(e-(o-c))))*(f+i)),0),s=rn(s=(b=f*o)+(d=a*o+(y-(o-3-u))*i),0),l=wa*s,h=(p=ma*s+(d-(s-b))*da+_a[k])-((N=rn(N=l+p+(v=xa[k])+(g=w),0))-g-v-l),r[0]=N,r[1]=h,r}(qa,i,n);if(p=(s=(e-(c=rn(e,0)))*l[0]+e*l[1])+(v=c*l[0]),Te.assign(p,Za,1,0),N=en(Za[0]),h=en(Za[1]),N>=Wa){if(0!=(N-Wa|h))return a*Ca*Ca;if(s+La>p-v)return a*Ca*Ca}else if((N&me)>=Ga){if(0!=(N-Ma|h))return a*Ha*Ha;if(s<=p-v)return a*Ha*Ha}return p=function(r,e,n){var t,i,u,f,a,o,c,v,s,l;return s=((v=r&me|0)>>Ua)-Lr|0,c=0,v>Ia&&(i=Vr(0,((c=r+(Ta>>s+1)>>>0)&~(xn>>(s=((c&me)>>Ua)-Lr|0)))>>>0),c=(c&xn|Ta)>>Ua-s>>>0,r<0&&(c=-c),e-=i),r=en(r=Tr(o=1-((o=(u=(i=rn(i=n+e,0))*Oa)+(f=(n-(i-e))*kn+i*Sa))*(t=o-(i=o*o)*(0===(l=i)?.16666666666666602:.16666666666666602+l*(l*(6613756321437934e-20+l*(4.1381367970572385e-8*l-16533902205465252e-22))-.0027777777777015593)))/(t-2)-((a=f-(o-u))+o*a)-o))),(r+=c<<Ua>>>0)>>Ua<=0?Me(o,c):Vr(o,r)}(N,v,s),a*p}var Xa=143.01608;function Ya(r){var e,n,t;return e=1+(e=1/r)*function(r){return 0===r?.08333333333334822:.08333333333334822+r*(.0034722222160545866+r*(r*(.0007873113957930937*r-.00022954996161337813)-.0026813261780578124))}(e),n=Xe(r),n=r>Xa?(t=za(r,.5*r-.25))*(t/n):za(r,r-.5)/n,ti*n*e}function Da(r,e){return e/((1+qi*r)*r)}function Ba(r){var e,n,t,i;if(Ye(r)&&r<0||r===Hr||er(r))return NaN;if(0===r)return Bn(r)?Hr:Cr;if(r>171.61447887182297)return Cr;if(r<-170.5674972726612)return 0;if((n=se(r))>33)return r>=0?Ya(r):(e=0==(1&(t=Kr(n)))?-1:1,(i=n-t)>.5&&(i=n-(t+=1)),i=n*ni(et*i),e*et/(se(i)*Ya(n)));for(i=1;r>=3;)i*=r-=1;for(;r<0;){if(r>-1e-9)return Da(r,i);i/=r,r+=1}for(;r<2;){if(r<1e-9)return Da(r,i);i/=r,r+=1}return 2===r?i:i*function(r){var e,n;return 0===r?1:((r<0?-r:r)<=1?(e=1+r*(.4942148268014971+r*(.20744822764843598+r*(.04763678004571372+r*(.010421379756176158+r*(.0011913514700658638+r*(.00016011952247675185+0*r)))))),n=1+r*(.0714304917030273+r*(r*(.035823639860549865+r*(.011813978522206043+r*(r*(.0005396055804933034+-23158187332412014e-21*r)-.004456419138517973)))-.23459179571824335))):(e=0+(r=1/r)*(.00016011952247675185+r*(.0011913514700658638+r*(.010421379756176158+r*(.04763678004571372+r*(.20744822764843598+r*(.4942148268014971+1*r)))))),n=r*(.0005396055804933034+r*(r*(.011813978522206043+r*(.035823639860549865+r*(r*(.0714304917030273+1*r)-.23459179571824335)))-.004456419138517973))-23158187332412014e-21),e/n)}(r-=2)}var Ja=.15896368026733398,Ka=.5281534194946289,Qa=.45201730728149414;function ro(r,e,n){var t,i,u,f,a,o,c;if(r<Zn)return-tf(r);if(0===e||0===n)return 0;if(i=0,r>2){if(r>=3){do{n-=1,i+=tf(r-=1)}while(r>=3);n=r-2}return f=0===(a=n)?-.01803556856784494:((a<0?-a:a)<=1?(o=a*(.02512664961998968+a*(.049410315156753225+a*(.0172491608709614+a*(a*(a*(0*a-3245886498259485e-20)-.0005410098692152044)-.0002594535632054381))))-.01803556856784494,c=1+a*(1.962029871977952+a*(1.4801966942423133+a*(.5413914320717209+a*(.09885042511280101+a*(.008213096746488934+a*(.00022493629192211576+-2.2335276320861708e-7*a))))))):(o=0+(a=1/a)*(a*(a*(a*(.0172491608709614+a*(.049410315156753225+a*(.02512664961998968+-.01803556856784494*a)))-.0002594535632054381)-.0005410098692152044)-3245886498259485e-20),c=a*(.00022493629192211576+a*(.008213096746488934+a*(.09885042511280101+a*(.5413914320717209+a*(1.4801966942423133+a*(1.962029871977952+1*a))))))-2.2335276320861708e-7),o/c),i+=(u=n*(r+1))*Ja+u*f}return r<1&&(i+=-tf(r),n=e,e=r,r+=1),r<=1.5?(u=function(r){var e,n;return 0===r?.04906224540690395:((r<0?-r:r)<=1?(e=.04906224540690395+r*(r*(r*(r*(r*(-.0010034668769627955*r-.024014982064857155)-.1584135863906922)-.4065671242119384)-.4149833583594954)-.09691175301595212),n=1+r*(3.0234982984646304+r*(3.4873958536072385+r*(1.9141558827442668+r*(.5071377386143635+r*(.05770397226904519+.001957681026011072*r)))))):(e=(r=1/r)*(r*(r*(r*(r*(.04906224540690395*r-.09691175301595212)-.4149833583594954)-.4065671242119384)-.1584135863906922)-.024014982064857155)-.0010034668769627955,n=.001957681026011072+r*(.05770397226904519+r*(.5071377386143635+r*(1.9141558827442668+r*(3.4873958536072385+r*(3.0234982984646304+1*r)))))),e/n)}(e),i+=(t=e*n)*Ka+t*u):(u=n*e,f=function(r){var e,n;return 0===r?-.029232972183027003:((r<0?-r:r)<=1?(e=r*(.14421626775719232+r*(r*(.05428096940550536+r*(r*(.0004311713426792973+0*r)-.008505359768683364))-.14244039073863127))-.029232972183027003,n=1+r*(r*(.846973248876495+r*(r*(.02558279715597587+r*(-8.271935218912905e-7*r-.0010066679553914337))-.22009515181499575))-1.5016935605448505)):(e=0+(r=1/r)*(.0004311713426792973+r*(r*(.05428096940550536+r*(r*(.14421626775719232+-.029232972183027003*r)-.14244039073863127))-.008505359768683364)),n=r*(r*(.02558279715597587+r*(r*(.846973248876495+r*(1*r-1.5016935605448505))-.22009515181499575))-.0010066679553914337)-8.271935218912905e-7),e/n)}(-n),i+=u*Qa+u*f)}function eo(r,e,n){var t,i,u,f;return t=function(r){return er(r)?NaN:r<0?r<-.5?Ba(1+r)-1:Jr(-ae(r)+ro(r+2,r+1,r)):r<2?Jr(ro(r+1,r,r-1)):Ba(1+r)-1}(r),i=(t+1)/r,u=function(r,e){var n,t;if(er(r)||er(e))return NaN;if(0===e)return 0;if(0===r)return-1;if(r<0&&e%2==0&&(r=-r),r>0){if((se(e*(r-1))<.5||se(e)<.2)&&(t=tf(r)*e)<.5)return Jr(t)}else if(pe(e)!==e)return NaN;return ye(n=Hn(r,e)-1)||er(n)?NaN:n}(e,r),t-=u,t/=r,f=function(r,e){var n,t,i,u;return n=-e,e=-e,t=r+1,i=1,function(){return u=n/t,n*=e,n/=i+=1,t+=1,u}}(r,e),t=-(u+=1)*ra(f,{initialValue:((n?i:0)-t)/u}),n&&(t=-t),[t,i]}var no=11754943508222875e-54;var to;to=Kf()?function(r,e){var n,t,i;return t={},arguments.length>1&&(t=e),n=t.maxIter||1e6,i=t.tolerance||Zn,t.keep?function(r,e,n){var t,i,u,f,a,o;if(0===(u=(o=(t="function"==typeof r.next)?r.next().value:r())[1])&&(u=no),f=u,a=0,!0===t)do{(o=r.next().value)&&(0===(a=o[1]+o[0]*a)&&(a=no),0===(f=o[1]+o[0]/f)&&(f=no),u*=i=f*(a=1/a))}while(o&&se(i-1)>e&&--n);else do{(o=r())&&(0===(a=o[1]+o[0]*a)&&(a=no),0===(f=o[1]+o[0]/f)&&(f=no),u*=i=f*(a=1/a))}while(o&&se(i-1)>e&&--n);return u}(r,i,n):function(r,e,n){var t,i,u,f,a,o,c;if(f=(c=(t="function"==typeof r.next)?r.next().value:r())[1],u=c[0],0===f&&(f=no),a=f,o=0,!0===t)do{(c=r.next().value)&&(0===(o=c[1]+c[0]*o)&&(o=no),0===(a=c[1]+c[0]/a)&&(a=no),f*=i=a*(o=1/o))}while(se(i-1)>e&&--n);else do{(c=r())&&(0===(o=c[1]+c[0]*o)&&(o=no),0===(a=c[1]+c[0]/a)&&(a=no),f*=i=a*(o=1/o))}while(c&&se(i-1)>e&&--n);return u/f}(r,i,n)}:function(r,e){var n,t,i;return t={},arguments.length>1&&(t=e),i=t.tolerance||Zn,n=t.maxIter||1e6,t.keep?function(r,e,n){var t,i,u,f,a;0===(f=(a=r())[1])&&(f=no),i=f,u=0;do{(a=r())&&(0===(u=a[1]+a[0]*u)&&(u=no),0===(i=a[1]+a[0]/i)&&(i=no),f*=t=i*(u=1/u))}while(a&&se(t-1)>e&&--n);return f}(r,i,n):function(r,e,n){var t,i,u,f,a,o;a=(o=r())[1],i=o[0],0===a&&(a=no),u=a,f=0;do{(o=r())&&(0===(f=o[1]+o[0]*f)&&(f=no),0===(u=o[1]+o[0]/u)&&(u=no),a*=t=u*(f=1/f))}while(o&&se(t-1)>e&&--n);return i/a}(r,i,n)};var io=to;function uo(r,e){var n=function(r,e){var n=e-r+1,t=r,i=0;return function(){return[(i+=1)*(t-i),n+=2]}}(r,e);return 1/(e-r+1+io(n))}var fo=170;function ao(r,e,n,t){var i,u,f,a,o,c,v,s,l,p,N,h,g;if(r<0||e<=0)return NaN;if(u=void 0===n||n,v=t,s=0,e>=fo&&!u)return v&&4*e<r?(s=e*tf(r)-r,s+=tf(uo(e,r))):!v&&e>4*r?(s=e*tf(r)-r,s+=tf(ia(e,r,a=0)/e)):0===(s=ao(e,r,!0,v))?v?(s=tf(s=1+1/(12*e)+1/(288*e*e))-e+(e-.5)*tf(e),s+=tf(ti)):(s=e*tf(r)-r,s+=tf(ia(e,r,a=0)/e)):s=tf(s)+Tf(e),s>Vf?Cr:Xe(s);switch(e<30&&e<=r+1&&r<Vf?o=!(l=(h=Kr(e))===e)&&.5===se(h-e):l=o=!1,l&&r>.6?(v=!v,f=0):o&&r>.2?(v=!v,f=1):r<Ff&&e>1?f=6:r<.5?f=-.4/tf(r)<e?2:3:r<1.1?f=.75*r<e?2:3:(c=!1,u&&e>20&&(p=se((r-e)/e),e>200?20/e>p*p&&(c=!0):p<.4&&(c=!0)),c?f=5:r-1/(3*r)<e?f=2:(f=4,v=!v)),f){case 0:s=function(r,e){var n,t,i;if(0!==(t=Xe(-e)))for(n=t,i=1;i<r;++i)n/=i,t+=n*=e;return t}(e,r),!1===u&&(s*=Sf(e));break;case 1:s=function(r,e){var n,t,i,u;if(0!==(i=zf(nr(e)))&&r>1){for(n=Xe(-e)/nr(et*e),n*=e,t=n/=.5,u=2;u<r;++u)n/=u-.5,t+=n*=e;i+=t}return i}(e,r),!1===u&&(s*=Sf(e));break;case 2:0!==(s=u?aa(e,r):Yf(e,r))&&(a=0,i=!1,v&&(a=u?1:Sf(e),u||s>=1||Kn*s>a?(a/=s,u||e<1||Kn/e>a?(a*=-e,i=!0):a=0):a=0)),s*=ia(e,r,a)/e,i&&(v=!1,s=-s);break;case 3:s=(N=eo(e,r,v=!v))[0],g=N[1],v=!1,u&&(s/=g);break;case 4:0!==(s=u?aa(e,r):Yf(e,r))&&(s*=uo(e,r));break;case 5:s=ta(e,r),r>=e&&(v=!v);break;case 6:s=u?Hn(r,e)/Sf(e+1):Hn(r,e)/e,s*=1-e*r/(e+1)}return u&&s>1&&(s=1),v&&(s=(u?1:Sf(e))-s),s}var oo=new Array(30);function co(r,e,n,t,i,u,f){var a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x,_;if(b=function(r,e){var n,t,i,u,f,a,o;return o=(e-r-Ki+.5)/(i=r+Ki-.5),r<1?e<=Xf?Xe(r*tf(e)-e-Tf(r)):Hn(e,r)*Xe(-e)/Sf(r):(se(o*o*r)<=100&&r>150?n=Xe(n=r*(ae(o)-o)+e*(.5-Ki)/i):Jn(u=r*tf(e/i),f=r-e)<=Xf||Dn(u,f)>=Vf?(t=f/r,Jn(u,f)/2>Xf&&Dn(u,f)/2<Vf?n=(a=Hn(e/i,r/2)*Xe(f/2))*a:Jn(u,f)/4>Xf&&Dn(u,f)/4<Vf&&e>r?(n=(a=Hn(e/i,r/4)*Xe(f/4))*a,n*=n):n=t>Xf&&t<Vf?Hn(e*Xe(t)/i,r):Xe(u+f)):n=Hn(e/i,r)*Xe(f),n*=nr(i/Ln)/ua(r))}(e,_=-(x=r+(l=e-1)/2)*(g=t<.35?ae(-t):tf(n))),b<=Oe)return i;for(f?(a=b/tu(r,e),a/=Hn(x,e)):a=function(r,e){var n;return n=r*tf(e),e>=1?n<Vf&&-e>Xf?Hn(e,r)*Xe(-e):r>=1?Hn(e/Xe(e/r),r):Xe(n-e):n>Xf?Hn(e,r)*Xe(-e):e/r<Vf?Hn(e/Xe(e/r),r):Xe(n-e)}(e,_)/Hn(x,e),a*=u,oo[0]=1,d=ao(_,e,!0,!0),v=i+a*(d/=b),c=1,p=g/2,p*=p,N=1,y=4*x*x,s=e,m=1;m<oo.length;++m){for(c+=2,oo[m]=0,h=e-m,o=3,w=1;w<m;++w)h=w*e-m,oo[m]+=h*oo[m-w]/Yu(o),o+=2;if(oo[m]/=m,oo[m]+=l/Yu(c),d=(s*(s+1)*d+(_+s+1)*N)/y,N*=p,s+=2,v+=k=a*oo[m]*d,k>1){if(se(k)<se(Zn*v))break}else if(se(k/Zn)<se(v))break}return v}function vo(r,e,n){var t,i;if(0===n)return 1;for(t=1,i=0;i<n;i++)t*=(r+i)/(e+i);return t}function so(r,e){return function(r,e){return er(r)||er(e)?NaN:r===Cr||e===Cr?Cr:r===e&&0===r?Yn(r)?r:e:r>e?r:e}(se(r),se(e))}function lo(r,e,n,t,i){var u,f,a,o,c,v,s,l,p,N,h,g,y,b;if(!i)return Hn(n,r)*Hn(t,e);if(o=r+Ki-.5,c=e+Ki-.5,v=(y=r+e)+Ki-.5,u=ua(y),u/=ua(r)*ua(e),u*=nr(c/Ln),u*=nr(o/v),function(r,e){return Jn(se(r),se(e))}(s=(n*e-t*o)/o,l=(t*r-n*c)/c)<.2)if(s*l>0||Jn(r,e)<1)se(s)<.1?u*=Xe(r*ae(s)):u*=Hn(n*v/o,r),se(l)<.1?u*=Xe(e*ae(l)):u*=Hn(t*v/c,e);else if(so(s,l)<.5)a=e/r,(f=r<e)&&a*l<.1||!f&&s/a>.1?(p=Jr(a*ae(l)),u*=Xe(p=r*ae(p=s+p+p*s))):(p=Jr(ae(s)/a),u*=Xe(p=e*ae(p=l+p+p*l)));else if(se(s)<se(l))if((b=r*ae(s)+e*tf(t*v/c))<=Xf||b>=Vf){if((b+=tf(u))>=Vf)return NaN;u=Xe(b)}else u*=Xe(b);else if((b=e*ae(l)+r*tf(n*v/o))<=Xf||b>=Vf){if((b+=tf(u))>=Vf)return NaN;u=Xe(b)}else u*=Xe(b);else if(g=t*v/c,s=r*tf(h=n*v/o),l=e*tf(g),s>=Vf||s<=Xf||l>=Vf||l<=Xf)if(r<e)if(N=Hn(g,e/r),(p=r*(tf(h)+tf(N)))<Vf&&p>Xf)u*=Hn(N*h,r);else{if((l+=s+tf(u))>=Vf)return NaN;u=Xe(l)}else if((p=(tf(N=Hn(h,r/e))+tf(g))*e)<Vf&&p>Xf)u*=Hn(N*g,e);else{if((l+=s+tf(u))>=Vf)return NaN;u=Xe(l)}else u*=Hn(h,r)*Hn(g,e);return u}var po={keep:!0,maxIter:1e3};function No(r,e,n,t,i,u){var f,a;return f=lo(r,e,n,t,i),u&&(u[1]=f),0===f?f:(a=function(r,e,n,t){var i=0;return function(){var u,f,a;return f=(r+i-1)*(r+e+i-1)*i*(e-i)*n*n,u=r+2*i-1,a=i,a+=i*(e-i)*n/(r+2*i-1),a+=(r+i)*(r*t-e*n+1+i*(2-n))/(r+2*i+1),i+=1,[f/=u*u,a]}}(r,e,n,t),f/io(a,po))}var ho=9007199254740991,go=2147483647;function yo(r,e){var n,t,i,u,f,a,o;if(er(r)||er(e))return NaN;if(!Ye(r)||!Ye(e))return NaN;if(e<0)return 0;if(t=1,r<0&&(r=-r+e-1,Be(e)&&(t*=-1)),e>r)return 0;if(0===e||e===r)return t;if(1===e||e===r-1)return t*r;for(r-e<e&&(e=r-e),o=Kr(ho/r),n=1,f=1;f<=e&&!(n>o);f++)n*=r,n/=f,r-=1;return f>e?t*n:(i=yo(r,e-f+1))===Cr?t*i:(a=function(r,e){return er(r)||er(e)||r===Cr||e===Cr||r===Hr||e===Hr?NaN:Ye(r)&&Ye(e)?(r<0&&(r=-r),e<0&&(e=-e),r<=go&&e<=go?function(r,e){var n,t=0;if(0===r)return e;if(0===e)return r;for(;0==(1&r)&&0==(1&e);)r>>>=1,e>>>=1,t+=1;for(;0==(1&r);)r>>>=1;for(;e;){for(;0==(1&e);)e>>>=1;r>e&&(n=e,e=r,r=n),e-=r}return r<<t}(r,e):function(r,e){var n,t=1;if(0===r)return e;if(0===e)return r;for(;r%2==0&&e%2==0;)r/=2,e/=2,t*=2;for(;r%2==0;)r/=2;for(;e;){for(;e%2==0;)e/=2;r>e&&(n=e,e=r,r=n),e-=r}return t*r}(r,e)):NaN}(i,u=yo(e,e-f+1)),t*(n/=u/=a)*(i/=a))}function bo(r,e,n,t,i,u,f){var a,o,c,v;if(a=lo(r,e,n,t,u),f&&(f[1]=a),0===(a/=r))return a;for(c=1,o=1,v=0;v<i-1;++v)c+=o*=(r+e+v)*n/(r+v+1);return a*=c}var wo={maxTerms:100};function mo(r,e,n,t,i,u,f){var a,o,c,v,s,l,p,N;return i?(o=r+Ki-.5,c=e+Ki-.5,v=(p=r+e)+Ki-.5,a=ua(p)/(ua(r)*ua(e)),s=tf(v/c)*(e-.5),l=tf(n*v/o)*r,s>Xf&&s<Vf&&l>Xf&&l<Vf?(a*=r*e<10*c?Xe((e-.5)*ae(r/c)):Hn(v/c,e-.5),a*=Hn(n*v/o,r),a*=nr(o/Ln),u&&(u[1]=a*Hn(f,e))):(a=tf(a)+s+l+(tf(o)-1)/2,u&&(u[1]=Xe(a+e*tf(f))),a=Xe(a))):a=Hn(n,r),a<Oe?t:(N=function(r,e,n,t){var i=1-e,u=1;return function(){var e=t/r;return r+=1,t*=i*n/u,u+=1,i+=1,e}}(r,e,n,a),wo.initialValue=t,ra(N,wo))}var ko=1/et;function xo(r,e,n,t,i,u,f,a){var o,c,v,s,l,p,N,h,g,y,b;if(b=1-r,p=a,u[N=a+f]=-1,er(r)||r<0||r>1)return u[p]=NaN,u[N]=NaN,u;if(t){if(e<0||n<0)return u[p]=NaN,u[N]=NaN,u;if(0===e){if(0===n)return u[p]=NaN,u[N]=NaN,u;if(n>0)return u[p]=i?0:1,u}else if(0===n&&e>0)return u[p]=i?1:0,u}else if(e<=0||n<=0)return u[p]=NaN,u[N]=NaN,u;return 0===r?(u[N]=1===e?1:e<1?Kn/2:2*Oe,i?(u[p]=t?1:Xn(e,n),u):(u[p]=0,u)):1===r?(u[N]=1===n?1:n<1?Kn/2:2*Oe,u[p]=i?0:t?1:Xn(e,n),u):.5===e&&.5===n?(u[N]=ko*nr(b*r),y=ve(nr(i?b:r)),y/=rt,t||(y*=et),u[p]=y,u):(1===e&&(l=n,n=e,e=l,l=b,b=r,r=l,i=!i),1===n?1===e?(u[p]=i?b:r,u[N]=1,u):(u[N]=e*Hn(r,e-1),y=b<.5?i?-Jr(e*ae(-b)):Xe(e*ae(-b)):i?-(Hn(r,e)-1):Hn(r,e),t||(y/=e),u[p]=y,u):(Jn(e,n)<=1?(r>.5&&(l=n,n=e,e=l,l=b,b=r,r=l,i=!i),Dn(e,n)<=1?e>=Jn(.2,n)||Hn(r,e)<=.9?i?(i=!1,c=-mo(e,n,r,c=-(t?1:Xn(e,n)),t,u,b)):c=mo(e,n,r,0,t,u,b):(l=n,n=e,e=l,l=b,b=r,r=l,i=!i,b>=.3?i?(i=!1,c=-mo(e,n,r,c=-(t?1:Xn(e,n)),t,u,b)):c=mo(e,n,r,0,t,u,b):(o=t?1:vo(e+n,e,20),c=bo(e,n,r,b,20,t,u),i?(i=!1,c=-co(e+20,n,r,b,c-=t?1:Xn(e,n),o,t)):c=co(e+20,n,r,b,c,o,t))):n<=1||r<.1&&Hn(n*r,e)<=.7?i?(i=!1,c=-mo(e,n,r,c=-(t?1:Xn(e,n)),t,u,b)):c=mo(e,n,r,0,t,u,b):(l=n,n=e,e=l,l=b,b=r,r=l,i=!i,b>=.3?i?(i=!1,c=-mo(e,n,r,c=-(t?1:Xn(e,n)),t,u,b)):c=mo(e,n,r,0,t,u,b):e>=15?i?(i=!1,c=-co(e,n,r,b,c=-(t?1:Xn(e,n)),1,t)):c=co(e,n,r,b,0,1,t):(o=t?1:vo(e+n,e,20),c=bo(e,n,r,b,20,t,u),i?(i=!1,c=-co(e+20,n,r,b,c-=t?1:Xn(e,n),o,t)):c=co(e+20,n,r,b,c,o,t)))):((e<n?e-(e+n)*r:(e+n)*b-n)<0&&(l=n,n=e,e=l,l=b,b=r,r=l,i=!i),n<40?Kr(e)===e&&Kr(n)===n&&e<Qn-100?(c=function(r,e,n,t){var i,u,f,a,o;if((u=Hn(n,r))>Oe)for(a=u,o=Kr(r-1);o>e;o--)u+=a*=(o+1)*t/((r-o)*n);else if((f=Kr(r*n))<=e+1&&(f=Kr(e+2)),u=Hn(n,f)*Hn(t,r-f),0==(u*=yo(Kr(r),Kr(f))))for(o=f-1;o>e;o--)u+=Hn(n,o)*Hn(t,r-o),u*=yo(Kr(r),Kr(o));else{for(a=u,i=u,o=f-1;o>e;o--)u+=a*=(o+1)*t/((r-o)*n);for(a=i,o=f+1;o<=r;o++)u+=a*=(r-o+1)*n/(o*t)}return u}(g=n+(h=e-1),h,r,b),t||(c*=Xn(e,n))):n*r<=.7?i?(i=!1,c=-mo(e,n,r,c=-(t?1:Xn(e,n)),t,u,b)):c=mo(e,n,r,0,t,u,b):e>15?((g=Kr(n))===n&&(g-=1),v=n-g,o=t?1:vo(e+v,v,g),c=co(e,v,r,b,c=bo(v,e,b,r,g,t),1,t),c/=o):t?((v=n-(g=Kr(n)))<=0&&(g-=1,v+=1),c=bo(v,e,b,r,g,t),c+=bo(e,v,r,b,20,t),i&&(c-=1),c=co(e+20,v,r,b,c,1,t),i&&(c=-c,i=!1)):c=No(e,n,r,b,t,u):c=No(e,n,r,b,t,u)),u[N]<0&&(u[N]=lo(e,n,r,b,!0)),s=b*r,0!==u[N]&&(Kn*s<u[N]?u[N]=Kn/2:u[N]/=s),u[p]=i?(t?1:Xn(e,n))-c:c,u))}function _o(r,e,n,t,i){var u=[0,0];return xo(r,e,n,t=!1!==t,i=!0===i,u,1,0),u[0]}function Ao(r,e,n){return er(r)||er(e)||er(n)||e<=0||n<=0?NaN:r<=0?0:r>=1?1:_o(r,e,n)}function Eo(r){return function(){return r}}function jo(r,e){return er(r)||er(e)||r<=0||e<=0?Eo(NaN):function(n){if(er(n))return NaN;if(n<=0)return 0;if(n>=1)return 1;return _o(n,r,e)}}function To(r,e,n){return er(r)||er(e)||er(n)||e<=0||n<=0?NaN:r<=0?0:r===Cr?1:Ao(r/(1+r),e,n)}function Io(r,e,n){return er(r)||er(e)||er(n)||e<=0||n<=0?NaN:r<=0?Hr:r>=1?0:tf(_o(r,e,n))}function Uo(r,e){return er(r)||er(e)||r<=0||e<=0?Eo(NaN):function(n){if(er(n))return NaN;if(n<=0)return Hr;if(n>=1)return 0;return tf(_o(n,r,e))}}function Oo(r,e,n){return er(r)||er(e)||er(n)||e<=0||n<=0?NaN:r<=0?Hr:r===Cr?0:Io(r/(1+r),e,n)}$((function(r,e,n,t,i){return xo(r,e,n,t,i,[0,0],1,0)}),"assign",xo),$(Ao,"factory",jo),$(To,"factory",(function(r,e){var n;return er(r)||er(e)||r<=0||e<=0?Eo(NaN):(n=jo(r,e),function(r){if(er(r))return NaN;if(r<=0)return 0;if(r===Cr)return 1;return n(r/(1+r))})})),$(Io,"factory",Uo),$(Oo,"factory",(function(r,e){var n;return er(r)||er(e)||r<=0||e<=0?Eo(NaN):(n=Uo(r,e),function(r){if(er(r))return NaN;if(r<=0)return Hr;if(r===Cr)return 0;return n(r/(1+r))})}));var So=.9189385332046728,Fo=[1276642195630063e-46,-3.401102254316749e-30,1025680058010471e-43,-35475981581010704e-43,14292273559424982e-41,-6831888753985767e-39,39628370610464347e-38,-2.868042435334643e-20,2683181998482699e-33,-3399615005417722e-31,6221098041892606e-29,-1809129475572494e-26,9.81082564692473e-9,-1384948176067564e-20,.16663894804518634],Vo=Fo.length;var Po=94906265.62425156,Wo=3745194030963158e291;function $o(r){return r<10?NaN:r>=Wo?0:r<Po?function(r){var e,n,t,i,u;if(r<-1.1||r>1.1)return NaN;for(t=0,i=0,e=2*r,u=0;u<Vo;u++)n=t,i=e*(t=i)-n+Fo[u];return.5*(i-n)}(2*Hn(10/r,2)-1)/r:1/(12*r)}function Go(r,e){var n,t,i,u,f;return t=Jn(r,e),f=e,i=er(u=r)||er(f)?NaN:u===Cr||f===Cr?Cr:u===f&&0===u?Yn(u)?u:f:u>f?u:f,t<0?NaN:0===t?Cr:i===Cr?Hr:t>=10?(n=$o(t)+$o(i)-$o(t+i),-.5*tf(i)+So+n+(t-.5)*tf(t/(t+i))+i*ae(-t/(t+i))):i>=10?(n=$o(i)-$o(t+i),Tf(t)+n+t-t*tf(t+i)+(i-.5)*ae(-t/(t+i))):tf(Sf(t)*(Sf(i)/Sf(t+i)))}function Mo(r,e,n){var t;return er(r)||er(e)||er(n)||e<=0||n<=0?NaN:r<=0?Hr:(t=(e-1)*tf(r),t-=(e+n)*ae(r),t-=Go(e,n))}function Ro(r,e){var n;return er(r)||er(e)||r<=0||e<=0?Eo(NaN):(n=Go(r,e),function(t){var i;if(er(t))return NaN;if(t<=0)return Hr;return i=(r-1)*tf(t),i-=(r+e)*ae(t),i-=n})}function Co(r,e,n){return er(r)||er(e)||er(n)||e<=0||n<=0?NaN:Xe(Mo(r,e,n))}$(Mo,"factory",Ro),$(Co,"factory",(function(r,e){var n;return er(r)||er(e)||r<=0||e<=0?Eo(NaN):(n=Ro(r,e),function(r){if(er(r))return NaN;return Xe(n(r))})}));var Ho=1072243195,Lo=1045430272,Zo=[0,0];function qo(r){var e;if(e=Tr(r),(e&=me)<=Ho)return e<Lo?r:ct(r,0);if(e>=Ve)return NaN;switch(3&Kt(r,Zo)){case 0:return ct(Zo[0],Zo[1]);case 1:return nt(Zo[0],Zo[1]);case 2:return-ct(Zo[0],Zo[1]);default:return-nt(Zo[0],Zo[1])}}function zo(r,e){return er(r)||er(e)?NaN:r===Cr||e===Cr?Cr:r===e&&0===r?Yn(r)?r:e:r>e?r:e}var Xo=.08913147449493408,Yo=2.249481201171875,Do=.807220458984375,Bo=.9399557113647461,Jo=.9836282730102539;function Ko(r){var e,n,t,i;return er(r)?NaN:0===r?Cr:2===r?Hr:1===r?0:r>2||r<0?NaN:(r>1?(e=-1,n=2-r):(e=1,n=r),(r=1-n)<=.5?(t=r*(r+10),i=function(r){var e,n;return 0===r?-.0005087819496582806:((r<0?-r:r)<=1?(e=r*(r*(.03348066254097446+r*(r*(r*(.02198786811111689+r*(.008226878746769157+r*(r*(0+0*r)-.005387729650712429)))-.03656379714117627)-.012692614766297404))-.008368748197417368)-.0005087819496582806,n=1+r*(r*(r*(1.5622155839842302+r*(.662328840472003+r*(r*(r*(.07952836873415717+r*(.0008862163904564247*r-.0023339375937419))-.05273963823400997)-.7122890234154284)))-1.5657455823417585)-.9700050433032906)):(e=0+(r=1/r)*(0+r*(r*(.008226878746769157+r*(.02198786811111689+r*(r*(r*(.03348066254097446+r*(-.0005087819496582806*r-.008368748197417368))-.012692614766297404)-.03656379714117627)))-.005387729650712429)),n=.0008862163904564247+r*(r*(.07952836873415717+r*(r*(r*(.662328840472003+r*(1.5622155839842302+r*(r*(1*r-.9700050433032906)-1.5657455823417585)))-.7122890234154284)-.05273963823400997))-.0023339375937419)),e/n)}(r),e*(t*Xo+t*i)):n>=.25?(t=nr(-2*tf(n)),i=function(r){var e,n;return 0===r?-.20243350835593876:((r<0?-r:r)<=1?(e=r*(.10526468069939171+r*(8.3705032834312+r*(17.644729840837403+r*(r*(r*(17.445385985570866+r*(21.12946554483405+-3.6719225470772936*r))-44.6382324441787)-18.851064805871424))))-.20243350835593876,n=1+r*(6.242641248542475+r*(3.971343795334387+r*(r*(r*(48.560921310873994+r*(10.826866735546016+r*(1.7211476576120028*r-22.643693341313973)))-20.14326346804852)-28.66081804998)))):(e=(r=1/r)*(21.12946554483405+r*(17.445385985570866+r*(r*(r*(17.644729840837403+r*(8.3705032834312+r*(.10526468069939171+-.20243350835593876*r)))-18.851064805871424)-44.6382324441787)))-3.6719225470772936,n=1.7211476576120028+r*(r*(10.826866735546016+r*(48.560921310873994+r*(r*(r*(3.971343795334387+r*(6.242641248542475+1*r))-28.66081804998)-20.14326346804852)))-22.643693341313973)),e/n)}(n-=.25),e*(t/(Yo+i))):(n=nr(-tf(n)))<3?(i=function(r){var e,n;return 0===r?-.1311027816799519:((r<0?-r:r)<=1?(e=r*(r*(.11703015634199525+r*(.38707973897260434+r*(.3377855389120359+r*(.14286953440815717+r*(.029015791000532906+r*(.0021455899538880526+r*(r*(2.8522533178221704e-8+-6.81149956853777e-10*r)-6.794655751811263e-7)))))))-.16379404719331705)-.1311027816799519,n=1+r*(3.4662540724256723+r*(5.381683457070069+r*(4.778465929458438+r*(2.5930192162362027+r*(.848854343457902+r*(.15226433829533179+r*(.011059242293464892+r*(0+r*(0+0*r)))))))))):(e=(r=1/r)*(2.8522533178221704e-8+r*(r*(.0021455899538880526+r*(.029015791000532906+r*(.14286953440815717+r*(.3377855389120359+r*(.38707973897260434+r*(.11703015634199525+r*(-.1311027816799519*r-.16379404719331705)))))))-6.794655751811263e-7))-6.81149956853777e-10,n=0+r*(0+r*(0+r*(.011059242293464892+r*(.15226433829533179+r*(.848854343457902+r*(2.5930192162362027+r*(4.778465929458438+r*(5.381683457070069+r*(3.4662540724256723+1*r)))))))))),e/n)}(n-1.125),e*(Do*n+i*n)):n<6?(i=function(r){var e,n;return 0===r?-.0350353787183178:((r<0?-r:r)<=1?(e=r*(r*(.018557330651423107+r*(.009508047013259196+r*(.0018712349281955923+r*(.00015754461742496055+r*(460469890584318e-20+r*(26633922742578204e-28*r-2.304047769118826e-10))))))-.0022242652921344794)-.0350353787183178,n=1+r*(1.3653349817554064+r*(.7620591645536234+r*(.22009110576413124+r*(.03415891436709477+r*(.00263861676657016+r*(7646752923027944e-20+r*(0+0*r)))))))):(e=26633922742578204e-28+(r=1/r)*(r*(460469890584318e-20+r*(.00015754461742496055+r*(.0018712349281955923+r*(.009508047013259196+r*(.018557330651423107+r*(-.0350353787183178*r-.0022242652921344794))))))-2.304047769118826e-10),n=0+r*(0+r*(7646752923027944e-20+r*(.00263861676657016+r*(.03415891436709477+r*(.22009110576413124+r*(.7620591645536234+r*(1.3653349817554064+1*r)))))))),e/n)}(n-3),e*(Bo*n+i*n)):(i=function(r){var e,n;return 0===r?-.016743100507663373:((r<0?-r:r)<=1?(e=r*(r*(.001056288621524929+r*(.00020938631748758808+r*(14962478375834237e-21+r*(4.4969678992770644e-7+r*(4.625961635228786e-9+r*(9905570997331033e-32*r-2811287356288318e-29))))))-.0011295143874558028)-.016743100507663373,n=1+r*(.5914293448864175+r*(.1381518657490833+r*(.016074608709367652+r*(.0009640118070051656+r*(27533547476472603e-21+r*(2.82243172016108e-7+r*(0+0*r)))))))):(e=9905570997331033e-32+(r=1/r)*(r*(4.625961635228786e-9+r*(4.4969678992770644e-7+r*(14962478375834237e-21+r*(.00020938631748758808+r*(.001056288621524929+r*(-.016743100507663373*r-.0011295143874558028))))))-2811287356288318e-29),n=0+r*(0+r*(2.82243172016108e-7+r*(27533547476472603e-21+r*(.0009640118070051656+r*(.016074608709367652+r*(.1381518657490833+r*(.5914293448864175+1*r)))))))),e/n)}(n-6),e*(Jo*n+i*n)))}var Qo=Math.round,rc=6123233995736766e-32;var ec=[0,0],nc=1072243195,tc=1044381696;function ic(r){var e;if(e=Tr(r),(e&=me)<=nc)return e<tc?1:nt(r,0);if(e>=Ve)return NaN;switch(3&Kt(r,ec)){case 0:return nt(ec[0],ec[1]);case 1:return-ct(ec[0],ec[1]);case 2:return-nt(ec[0],ec[1]);default:return ct(ec[0],ec[1])}}var uc=1.4142135623730951;var fc=0,ac=[1,0,0,0,0,0,0,0,0,0];function oc(r,e){var n,t,i;return t=tu(r/2,.5)*nr(r*et)*(e-.5),n=1/r,ac[1]=0===(i=n)?.16666666666666666:.16666666666666666+.16666666666666666*i,ac[2]=function(r){return 0===r?.058333333333333334:.058333333333333334+r*(.06666666666666667+.008333333333333333*r)}(n),ac[3]=function(r){return 0===r?.0251984126984127:.0251984126984127+r*(.026785714285714284+r*(.0017857142857142857+.0001984126984126984*r))}(n),ac[4]=function(r){return 0===r?.012039792768959435:.012039792768959435+r*(.010559964726631394+r*(r*(.0003747795414462081+27557319223985893e-22*r)-.0011078042328042327))}(n),ac[5]=function(r){return 0===r?.003837005972422639:.003837005972422639+r*(.00610392115600449+r*(r*(.0005945867404200738+r*(2.505210838544172e-8*r-6270542728876062e-20))-.0016095979637646305))}(n),ac[6]=function(r){return 0===r?.0032177478835464946:.0032177478835464946+r*(.0010898206731540065+r*(r*(.0006908420797309686+r*(r*(154012654012654e-19+1.6059043836821613e-10*r)-.00016376804137220805))-.0012579159844784845))}(n),ac[7]=function(r){return 0===r?.001743826229834001:.001743826229834001+r*(3353097688001788e-20+r*(r*(.0006451304695145635+r*(r*(49255746366361444e-21+r*(7647163731819816e-28*r-39851014346715405e-22))-.000249472580470431))-.0007624513544032393))}(n),ac[8]=function(r){return 0===r?.0009647274732138864:.0009647274732138864+r*(r*(r*(.0005140660578834113+r*(r*(9086710793521991e-20+r*(r*(10914179173496788e-22+28114572543455206e-31*r)-15303004486655377e-21))-.00029133414466938067))-.00036307660358786886)-.0003110108632631878)}(n),ac[9]=function(r){return 0===r?.0005422926281312969:.0005422926281312969+r*(r*(r*(.00035764655430568635+r*(r*(.00012645437628698076+r*(r*(4890304529197534e-21+r*(822063524662433e-32*r-3.123956959982987e-7))-33202652391372056e-21))-.00028690924218514614))-.00010230378073700413)-.0003694266780000966)}(n),fc+t*Df(ac,t*t)}var cc=[0,0,0,0,0,0,0];function vc(r,e){var n,t,i,u,f,a,o;return o=tu(r/2,.5)*nr(r*et)*e,i=r+2,u=r+4,f=r+6,cc[0]=1,cc[1]=-(r+1)/(2*i),i*=r+2,cc[2]=-r*(r+1)*(r+3)/(8*i*u),i*=r+2,cc[3]=-r*(r+1)*(r+5)*((3*r+7)*r-2)/(48*i*u*f),i*=r+2,u*=r+4,cc[4]=-r*(r+1)*(r+7)*(((((15*r+154)*r+465)*r+286)*r-336)*r+64)/(384*i*u*f*(r+8)),i*=r+2,cc[5]=-r*(r+1)*(r+3)*(r+9)*((((((35*r+452)*r+1573)*r+600)*r-2020)*r+928)*r-128)/(1280*i*u*f*(r+8)*(r+10)),i*=r+2,u*=r+4,f*=r+6,cc[6]=-r*(r+1)*(r+11)*(((((((((((945*r+31506)*r+425858)*r+2980236)*r+11266745)*r+20675018)*r+7747124)*r-22574632)*r-8565600)*r+18108416)*r-7099392)*r+884736)/(46080*i*u*f*(r+8)*(r+10)*(r+12)),t=Hn((a=nr(r))*o,1/r),n=Df(cc,t*t),n*=a,-(n/=t)}function sc(r,e){var n,t,i,u,f,a;return r>1e20?-Ko(2*e)*uc:((a=Hn(2*(u=((94.5/((t=48/((n=1/(r-.5))*n))+(i=((20700*n/t-98)*n-16)*n+96.36))-3)/t+1)*nr(n*rt)*r)*e,2/r))>.05+n?(f=-Ko(2*e)*uc,r<5&&(i+=.3*(r-4.5)*(f+.6)),a=Jr(n*(a=(((((.4*(a=f*f)+6.3)*a+36)*a+94.5)/(i+=(((.05*u*f-5)*f-7)*f-2)*f+t)-a-3)/t+1)*f)*a)):a=((1/(((r+6)/(r*a)-.089*u-.822)*(r+2)*3)+.5/(r+4))*a-1)*(r+1)/(r+2)+1/a,-nr(r*a))}var lc=268435456,pc=1/3,Nc=106/3,hc=.8549879733383485;function gc(r,e,n){var t,i,u,f,a,o,c,v,s,l,p,N,h;if(f=0,e>n?(a=n,n=e,e=a,u=!0):u=!1,Kr(r)===r&&r<20)switch(t=Me(1,Nc),Kr(r)){case 1:f=.5===e?0:-ic(et*e)/qo(et*e);break;case 2:f=(2*e-1)/nr(2*e*n);break;case 4:l=4*ic(function(r){var e;return er(r)||r<-1||r>1?NaN:r>.5?2*ve(nr(.5-.5*r)):(e=oe-ve(r),e+=rc,e+=oe)}(i=nr(4*e*n))/3)/i,p=nr(l-4),f=e-.5<0?-p:p;break;case 6:if(e<1e-150)return(u?-1:1)*sc(r,e);h=Hn(N=4*(e-e*e),pc),s=6*(1+hc*(1/h-1));do{o=s,s=2*(8*N*(s*(v=(c=s*s)*c))-270*c+2187)/(5*(4*N*v-216*s-243))}while(se((s-o)/s)>t);s=nr(s-r),f=e-.5<0?-s:s;break;default:f=r>lc?Ko(2*e)*uc:r<3?e>.2742-.0242143*r?oc(r,e):vc(r,e):e>Me(1,Qo(r/-.654))?sc(r,e):vc(r,e)}else f=r>lc?-Ko(2*e)*uc:r<3?e>.2742-.0242143*r?oc(r,e):vc(r,e):e>Me(1,Qo(r/-.654))?sc(r,e):vc(r,e);return u?-f:f}var yc=[0,0,0,0,0,0,0],bc=[0,0,0,0];var dc=Kn/4;function wc(r,e){return function(n){var t;if(0===(t=1-n))return[-dc,-dc];if(0===n)return[-dc,-dc];return[tf(n)+e*tf(t)+r,1/n-e/t]}}function mc(r){return 0===r||er(r)?r:r<0?-1:1}function kc(r,e,n,t,i,u){var f,a,o,c,v,s,l,p,N,h;N=0,f=0,v=e,c=Me(1,1-i),l=Kn,a=Kn,o=Kn,s=u;do{if(f=N,o=a,a=l,N=(p=r(v))[0],h=p[1],s-=1,0===N)break;if(0===h?(0===f&&(f=r(e=v===n?t:n),l=e-v),l=mc(f)*mc(N)<0?l<0?(v-n)/2:(v-t)/2:l<0?(v-t)/2:(v-n)/2):l=N/h,se(2*l)>se(o)&&(l=l>0?(v-n)/2:(v-t)/2),e=v,(v-=l)<=n){if((v=e-(l=.5*(e-n)))===n||v===t)break}else if(v>=t&&((v=e-(l=.5*(e-t)))===n||v===t))break;l>0?t=e:n=e}while(s&&se(v*c)<se(l));return v}var xc=[0,0,0,0,0,0],_c=[0,0,0,0];function Ac(r){if(r.__esModule)return r;var e=r.default;if("function"==typeof e){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(r).forEach((function(e){var t=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,t.get?t:{enumerable:!0,get:function(){return r[e]}})})),n}var Ec=Ac(Object.freeze({__proto__:null,default:()=>()=>{}})),jc=34028234663852886e22,Tc=Ec("gammaincinv:higher_newton");var Ic=1e-8,Uc=.08333333333333333,Oc=.008333333333333333,Sc=[1,0,0,0,0,0];function Fc(r){var e,n,t,i,u,f,a,o,c,v;if(c=r*r*.5,0===r?u=0:r<-1?(o=Xe(-1-c),u=0===(v=o)?0:0+v*(1+v*(1+v*(1.5+v*(2.6666666666666665+v*(5.208333333333333+10.8*v)))))):r<1?u=function(r){return 0===r?1:1+r*(1+r*(.3333333333333333+r*(.027777777777777776+r*(r*(.0002314814814814815+5878894767783657e-20*r)-.003703703703703704))))}(o=r):(u=(o=11+c)+(f=tf(o)),o=1/o,i=(t=(n=(e=f*f)*f)*f)*f,Sc[1]=.5*(2-f),Sc[2]=(-9*f+6+2*e)/6,Sc[3]=-(3*n+36*f-22*e-12)*Uc,Sc[4]=(60+350*e-300*f-125*n+12*t)/60,Sc[5]=-(-120-274*t+900*f-1700*e+1125*n+20*i)*Oc,u+=f*o*Df(Sc,o)),o=1,r>-3.5&&r<-.03||r>.03&&r<40){o=1,a=u;do{o=se(a/(u=a*(c+tf(a))/(a-1))-1),a=u}while(o>Ic)}return u}var Vc=[1.9963790515900766,-.0017971032528832887,13129285796384672e-21,-2.340875228178749e-7,7.2291210671127e-9,-3.280997607821e-10,19875070901e-21,-1509214183e-21,1375340084e-22,-145728923e-22,17532367e-22,-2351465e-22,346551e-22,-55471e-22,9548e-22,-1748e-22,3.32e-20,-58e-22];var Pc=.30865217988013566;function Wc(r){var e;return r<no?jc:r<1?Tf(r+1)-(r+.5)*tf(r)+r-So:r<2?Tf(r)-(r-.5)*tf(r)+r-So:r<3?Tf(r-1)-(r-.5)*tf(r)+r-So+tf(r-1):r<12?function(r,e){var n,t,i,u,f;t=0,i=0,n=e+e,f=r;do{u=i,t=n*(i=t)-u+Vc[f],f-=1}while(f>=0);return(t-u)/2}(17,e=18/(r*r)-1)/(12*r):(e=1/(r*r),r<1e3?function(r){return 0===r?.025721014990011306:.025721014990011306+r*(.08247596616699963+r*(r*(.0006099292666946337+r*(.000250505279903*r-.00033543297638406))-.0025328157302663564))}(e)/(Pc+e)/r:function(r){return 0===r?.08333333333333333:.08333333333333333+r*(r*(.0007936507936507937+-.0005952380952380953*r)-.002777777777777778)}(e)/r)}function $c(r){return r>=3?Xe(Wc(r)):r>0?Sf(r)/(Xe(-r+(r-.5)*tf(r))*ti):jc}var Gc=Ec("gammaincinv:compute"),Mc=.5,Rc=.3333333333333333,Cc=.25,Hc=.2,Lc=.16666666666666666,Zc=.08333333333333333,qc=.041666666666666664,zc=[0,0,0,0,0];function Xc(r,e,n){var t,i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x,_,A,E,j,T,I,U,O,S,F,V,P,W,$,G,M,R,C,H;if(e<Mc?(f=!0,a=e,R=-1):(f=!1,a=n,R=1),$=0,se(r-1)<1e-4&&(G=0,m=f?e<.001?e+(O=e*e)*Mc+(T=O*e)*Rc+(U=T*e)*Cc+(w=U*e)*Hc+w*e*Lc:-tf(1-e):-tf(n),1===r?($=2,F=m):(u=Tf(r),$=1)),n<1e-30&&r<Mc&&(G=0,m=-tf(n*Sf(r))+(r-1)*tf(-tf(n*Sf(r))),$=1,u=Tf(r)),r>1&&r<500&&e<1e-80){for(G=0,o=1/r,t=1/(r+1),h=m=Xe(m=(Tf(r+1)+tf(e))*o),W=0;W<10;W++)m=h*Xe(m*o)*Hn(1-m*t,o);$=1,u=Tf(r)}if((c=1/r*(tf(e)+Tf(r+1)))<tf(Hc*(1+r))&&0===$&&(M=Xe(c),G=0,I=(S=(k=r*r)*r)*r,l=(g=r+1)*(p=g*g),s=p*p,v=(y=r+2)*y,b=r+3,zc[0]=1,zc[1]=1/g,zc[2]=Mc*(3*r+5)/(p*y),zc[3]=Rc*(31+8*k+33*r)/(l*y*b),zc[4]=qc*(2888+1179*S+125*I+3971*k+5661*r)/(s*v*b*(r+4)),m=M*Df(zc,M),u=Tf(r),$=1),r<10&&0===$&&n<Jn(.02,N=nr(r)/($c(r)*ti))&&(G=0,j=(E=(V=1-r)*V)*V,d=nr(-2/r*tf(n/N)),P=tf(m=r*Fc(d)),m>5?(A=(_=(x=P*P)*P)*P,M=1/m,zc[0]=P-1,zc[1]=(3*V-2*V*P+x-2*P+2)*Mc,zc[2]=(24*V*P-11*E-24*V-6*x+12*P-12-9*V*x+6*E*P+2*_)*Lc,zc[3]=(-12*j*P+8.04*V*x-114*E*P+(72+36*x)+(3*A-72*P+162)*(V-168*V*P)-(12*_+25*j)-(22*V*_+36*E*x+120*E))*Zc,zc[4]=0,m=m-P+V*M*Df(zc,M)):(x=P*P,(C=P-V*(M=1/m)*(P-1))<m&&(m-=C)),u=Tf(r),$=1),se(a-Mc)<1e-5&&0===$&&(G=0,m=r-Rc+(.019753086419753086+.007211444248481286*(o=1/r))*o,u=Tf(r),$=1),r<1&&0===$&&(G=0,m=Xe(f?1/r*(tf(a)+Tf(r+1)):1/r*(tf(1-a)+Tf(r+1))),u=Tf(r),$=1),0===$){if(G=1,o=1/r,d=R*(M=Ko(2*a))/nr(r*Mc),!(M<jc))return Gc("Warning: Overflow problems in one or more steps of the computation."),NaN;d+=(function(r){var e,n,t;return se(r)<1?0===(e=r)?-.3333333333438:((e<0?-e:e)<=1?(n=e*(e*(e*(-4293658292782e-17*e-.004923635739372)-.05041806657154)-.2070740359969)-.3333333333438,t=1+e*(.7045554412463+e*(.2118190062224+e*(.03048648397436+.001605037988091*e)))):(n=(e=1/e)*(e*(e*(-.3333333333438*e-.2070740359969)-.05041806657154)-.004923635739372)-4293658292782e-17,t=.001605037988091+e*(.03048648397436+e*(.2118190062224+e*(.7045554412463+1*e)))),n/t):tf(r/(Fc(r)-1))/r}(d)+(function(r){var e,n;return r<-5?(12-(n=r*r)-(e=tf(-r))*e*6)/(12*n*r):r<-2?function(r){var e,n;return 0===r?-.0172847633523:((r<0?-r:r)<=1?(e=r*(r*(r*(-614830384279e-17*r-.00060683488776)-.00464910887221)-.0159372646475)-.0172847633523,n=1+r*(.764050615669+r*(.297143406325+r*(.0579490176079+.00574558524851*r)))):(e=(r=1/r)*(r*(r*(-.0172847633523*r-.0159372646475)-.00464910887221)-.00060683488776)-614830384279e-17,n=.00574558524851+r*(.0579490176079+r*(.297143406325+r*(.764050615669+1*r)))),e/n)}(r):r<2?function(r){var e,n;return 0===r?-.0172839517431:((r<0?-r:r)<=1?(e=r*(r*(r*(249634036069e-17*r-.000391032032692)-.00357406772616)-.0146362417966)-.0172839517431,n=1+r*(.690560400696+r*(.249962384741+r*(.0443843438769+.00424073217211*r)))):(e=249634036069e-17+(r=1/r)*(r*(r*(-.0172839517431*r-.0146362417966)-.00357406772616)-.000391032032692),n=.00424073217211+r*(.0443843438769+r*(.249962384741+r*(.690560400696+1*r)))),e/n)}(r):r<1e3?(n=1/r,function(r){var e,n;return 0===r?.99994466948:((r<0?-r:r)<=1?(e=.99994466948+r*(104.649839762+r*(857.204033806+r*(731.901559577+45.5174411671*r))),n=1+r*(104.526456943+r*(823.313447808+r*(3119.93802124+3970.03311219*r)))):(e=45.5174411671+(r=1/r)*(731.901559577+r*(857.204033806+r*(104.649839762+.99994466948*r))),n=3970.03311219+r*(3119.93802124+r*(823.313447808+r*(104.526456943+1*r)))),e/n)}(r)/(-12*r)):-1/(12*r)}(d)+function(r){var e,n;return r<-8?(e=r*r,(r*(n=tf(-r)/r)*(6*e*n*n-12+e)-30)/(12*r*e*e)):r<-4?function(r){var e,n;return 0===r?.0495346498136:((r<0?-r:r)<=1?(e=.0495346498136+r*(.0299521337141+r*(.00688296911516+r*(.000512634846317+-201411722031e-16*r))),n=1+r*(.759803615283+r*(.261547111595+r*(.0464854522477+.00403751193496*r)))):(e=(r=1/r)*(.000512634846317+r*(.00688296911516+r*(.0299521337141+.0495346498136*r)))-201411722031e-16,n=.00403751193496+r*(.0464854522477+r*(.261547111595+r*(.759803615283+1*r)))),e/n)}(r)/(r*r):r<-2?function(r){var e,n;return 0===r?.00452313583942:((r<0?-r:r)<=1?(e=.00452313583942+r*(.00120744920113+r*(r*(-535770949796e-17*r-504476066942e-16)-789724156582e-16)),n=1+r*(.912203410349+r*(.405368773071+r*(.0901638932349+.00948935714996*r)))):(e=(r=1/r)*(r*(r*(.00120744920113+.00452313583942*r)-789724156582e-16)-504476066942e-16)-535770949796e-17,n=.00948935714996+r*(.0901638932349+r*(.405368773071+r*(.912203410349+1*r)))),e/n)}(r):r<2?function(r){var e,n;return 0===r?.00439937562904:((r<0?-r:r)<=1?(e=.00439937562904+r*(.000487225670639+r*(r*(529110969589e-17+1.5716677175e-7*r)-.000128470657374)),n=1+r*(.794435257415+r*(.333094721709+r*(.0703527806143+.00806110846078*r)))):(e=1.5716677175e-7+(r=1/r)*(529110969589e-17+r*(r*(.000487225670639+.00439937562904*r)-.000128470657374)),n=.00806110846078+r*(.0703527806143+r*(.333094721709+r*(.794435257415+1*r)))),e/n)}(r):r<10?function(r){var e,n;return 0===r?-.0011481191232:((r<0?-r:r)<=1?(e=r*(r*(1.51623048511+r*(.0730002451555*r-.218472031183))-.112850923276)-.0011481191232,n=1+r*(14.2482206905+r*(69.7360396285+r*(218.938950816+277.067027185*r)))):(e=.0730002451555+(r=1/r)*(r*(1.51623048511+r*(-.0011481191232*r-.112850923276))-.218472031183),n=277.067027185+r*(218.938950816+r*(69.7360396285+r*(14.2482206905+1*r)))),e/n)}(e=1/r)/(r*r):r<100?function(r){var e,n;return 0===r?-.000145727889667:((r<0?-r:r)<=1?(e=r*(r*(r*(199.722374056+-11.4311378756*r)-13.308504545)-.290806748131)-.000145727889667,n=1+r*(139.612587808+r*(2189.01116348+r*(7115.24019009+45574.6081453*r)))):(e=(r=1/r)*(199.722374056+r*(r*(-.000145727889667*r-.290806748131)-13.308504545))-11.4311378756,n=45574.6081453+r*(7115.24019009+r*(2189.01116348+r*(139.612587808+1*r)))),e/n)}(e=1/r)/(r*r):-tf(r)/(12*r*r*r)}(d)*o)*o)*o,m=r*Fc(d),H=d,i=1/(-nr(r/ea)*Xe(-Mc*r*H*H)/$c(r))}return $<2&&(F=function(r,e,n,t,i,u,f,a){var o,c,v,s,l,p,N,h,g;g=r,p=1,N=1,s=e*e,c=r;do{if(l=(g=r)*g,0===n){if((o=(1-e)*tf(g)+g+u)>tf(jc))return Tc("Warning: overflow problems in one or more steps of the computation. The initial approximation to the root is returned."),c;h=Xe(o)}else h=-f*g;h=a?-h*(ao(g,e,!0,!1)-t):h*(ao(g,e,!0,!0)-i),t>1e-120||N>1?(v=(2*l-4*g*e+4*g+2*s-3*e+1)/l,r=g+h*(1+h*(.5*(g-e+1)/g+h*(v/=6)))):r=g+h,p=se(g/r-1),N+=1,(g=r)<0&&(g=c,N=100)}while(p>2e-14&&N<35);return(p>2e-14||N>99)&&Tc("Warning: the number of iterations in the Newton method reached the upper limit N=35. The last value obtained for the root is given as output."),g||0}(m,r,G,e,n,u,i,f)),F}function Yc(r,e,n){return er(r)||er(e)||e<no||r>1||r<0?NaN:!0===n?0===r?Cr:1===r?0:Xc(e,1-r,r):0===r?0:1===r?Cr:Xc(e,r,1-r)}var Dc=5e-324;var Bc=32,Jc=1e3,Kc=[0,0,0,0,0];function Qc(r,e,n,t){var i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x,_,A,E,j,T,I,U;if(u=!1,0===t)return[1,0];if(0===n)return[0,1];if(1===r){if(1===e)return[n,1-n];h=e,e=r,r=h,h=t,t=n,n=h,u=!0}if(I=0,a=0,c=1,.5===r){if(.5===e)return I=qo(n*rt),I*=I,U=qo(t*rt),[I,U*=U];e>.5&&(h=e,e=r,r=h,h=t,t=n,n=h,u=!u)}if(.5===e&&r>=.5&&1!==n)I=function(r,e,n){var t,i,u;return u=gc(t=2*r,i=e/2,1-i),n&&(n.value=u*u/(t+u*u)),t/(t+u*u)}(r,n,x={}),U=x.value;else{if(1===e)return n<t?r>1?(I=Hn(n,1/r),U=-Jr(tf(n)/r)):U=1-(I=Hn(n,1/r)):(I=Xe(ae(-t)/r),U=-Jr(ae(-t)/r)),u&&(h=U,U=I,I=h),[I,U];if(r+e>5)n>.5&&(h=e,e=r,r=h,h=t,t=n,n=h,u=!u),l=Jn(r,e),s=zo(r,e),nr(l)>s-l&&l>5?(I=function(r,e,n){var t,i,u,f,a,o,c;return t=Ko(2*n),t/=-nr(r/2),bc[0]=t,a=(f=(o=e-r)*o)*o,yc[0]=-o*uc/2,yc[1]=(1-2*o)/8,yc[2]=-o*uc/48,yc[3]=-1/192,yc[4]=-o*uc/3840,yc[5]=0,yc[6]=0,bc[1]=Df(yc,t),yc[0]=o*uc*(3*o-2)/12,yc[1]=(20*f-12*o+1)/128,yc[2]=o*uc*(20*o-1)/960,yc[3]=(16*f+30*o-15)/4608,yc[4]=o*uc*(21*o+32)/53760,yc[5]=(-32*f+63)/368640,yc[6]=-o*uc*(120*o+17)/25804480,bc[2]=Df(yc,t),yc[0]=o*uc*(-75*f+80*o-16)/480,yc[1]=(-1080*a+868*f-90*o-45)/9216,yc[2]=o*uc*(-1190*f+84*o+373)/53760,yc[3]=(-2240*a-2508*f+2100*o-165)/368640,yc[4]=0,yc[5]=0,yc[6]=0,bc[3]=Df(yc,t),c=-Xe(-(i=(u=Df(bc,1/r))*u)/2),0===i?.5:(1+u*nr((1+c)/i))/2}(r,e,n),U=1-I):(o=ve(nr(r/(j=r+e))),(f=l/j)>=.2&&f<=.8&&j>=10?(I=(N=Hn(n,1/r))<.0025&&r+e<200?N*Hn(r*Xn(r,e),1/r):function(r,e,n){var t,i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m;return f=Ko(2*r)/-nr(e/2),d=qo(n),b=ic(n),_c[0]=f,g=d*d,y=b*b,v=(p=(N=d*b)*N)*(l=p*N),c=l*l,o=(s=p*p)*l,xc[0]=(2*g-1)/(3*N),xc[1]=-function(r){return 0===r?-1:r*(5*r-5)-1}(g)/(36*p),xc[2]=function(r){return 0===r?1:1+r*(21+r*(46*r-69))}(g)/(1620*l),xc[3]=function(r){return 0===r?7:7+r*(r*(33+r*(31*r-62))-2)}(g)/(6480*s),xc[4]=function(r){return 0===r?25:25+r*(r*(r*(88+r*(46*r-115))-17)-52)}(g)/(90720*v),xc[5]=0,_c[1]=Df(xc,f),xc[0]=-function(r){return 0===r?7:7+r*(12+r*(52*r-78))}(g)/(405*l),xc[1]=function(r){return 0===r?-7:r*(2+r*(183+r*(185*r-370)))-7}(g)/(2592*s),xc[2]=-function(r){return 0===r?-533:r*(776+r*(r*(10240+r*(5410*r-13525))-1835))-533}(g)/(204120*v),xc[3]=-function(r){return 0===r?-1579:r*(3747+r*(r*(r*(45588+r*(15071*r-45213))-15821)-3372))-1579}(g)/(2099520*c),xc[4]=0,xc[5]=0,_c[2]=Df(xc,f),xc[0]=function(r){return 0===r?449:449+r*(r*(r*(6686+r*(3704*r-9260))-769)-1259)}(g)/(102060*v),xc[1]=-function(r){return 0===r?63149:63149+r*(r*(140052+r*(r*(2239932+r*(750479*r-2251437))-727469))-151557)}(g)/(20995200*c),xc[2]=function(r){return 0===r?29233:29233+r*(r*(105222+r*(146879+r*(r*(3195183+r*(729754*r-2554139))-1602610)))-78755)}(g)/(36741600*o),xc[3]=0,xc[4]=0,xc[5]=0,_c[3]=Df(xc,f),u=b/d,u*=u,h=-(a=Df(_c,1/e))*a/(2*g)+tf(g)+y*tf(y)/g,se(a)<.7?(xc[0]=g,xc[1]=N,xc[2]=(1-2*g)/3,xc[3]=function(r){return 0===r?1:1+r*(13*r-13)}(g)/(36*N),xc[4]=function(r){return 0===r?1:1+r*(21+r*(46*r-69))}(g)/(270*p),xc[5]=0,m=Df(xc,a)):(w=Xe(h),xc[0]=w,xc[1]=u,xc[2]=0,xc[3]=3*u*(3*u+1)/6,xc[4]=4*u*(4*u+1)*(4*u+2)/24,xc[5]=5*u*(5*u+1)*(5*u+2)*(5*u+3)/120,((m=Df(xc,w))-g)*a<0&&(m=1-m)),a<0?(i=0,t=g):(i=g,t=1),(m<i||m>t)&&(m=(i+t)/2),kc(wc(-h,u),m,i,t,32,100)}(n,j,o),U=1-I):(r<e&&(h=e,e=r,r=h,h=t,t=n,n=h,u=!u),p=0,e<2&&(p=Xn(r,e)),0===p?U=1:I=1-(U=Hn(e*t*p,1/e))),U>1e-5&&(I=function(r,e,n,t){var i,u,f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m,k,x,_,A,E,j,T,I;return a=n<t?Yc(n,e,!0):Yc(t,e,!1),a/=r,l=((T=nr(1+(h=e/r)))+2)*(T-1)/(3*T),l+=((d=(b=T*T)*T)+9*b+21*T+5)*(j=a-h)/(36*b*(E=T+1)),l-=((w=b*b)-13*d+69*b+167*T+46)*(g=j*j)/(1620*(c=E*E)*d),l-=(7*(m=d*b)+21*w+70*d+26*b-93*T-31)*(y=g*j)/(6480*(v=E*c)*w),p=(28*w+131*d+402*b+581*T+208)*(T-1)/(1620*E*d),p-=(35*(k=d*d)-154*m-623*w-1636*d-3983*b-3514*T-925)*j/(12960*c*w),p-=(2132*(x=w*d)+7915*k+16821*m+35066*w+87490*d+141183*b+95993*T+21640)*g/(816480*m*v),N=-(3592*x+8375*k-1323*m-29198*w-89578*d-154413*b-116063*T-29632)*(T-1)/(816480*m*c),N-=(442043*(A=m*w)+2054169*(_=w*w)+3803094*x+3470754*k+2141568*m-2393568*w-19904934*d-34714674*b-23128299*T-5253353)*j/(146966400*k*v),(o=a+(l-=g*g*(75*k+202*m+188*w-888*d-1345*b+118*T+138)/(272160*(s=c*c)*m))/r+(p-=(11053*_+53308*x+117010*k+163924*m+116188*w-258428*d-677042*b-481940*T-105497)*y/(14696640*s*k))/(r*r)+(N-=(m*m*116932+819281*A+2378172*_+4341330*x+6806004*k+10622748*m+18739500*w+30651894*d+30869976*b+15431867*T+2919016)*g/(146966400*s*x))/(r*r*r))<=0&&(o=Dc),i=1/(1+h),I=((u=o<h?i:0)+(f=o<h?1:i))/2,kc(wc(o-h*tf(o)+(1+h)*tf(1+h)-h,h),I,u,f,32,100)}(r,e,n,t),U=1-I));else if(r<1&&e<1){if(se(d=_o(k=(1-r)/(2-r-e),r,e)-n)/n<3*Zn)return u?[1-k,k]:[k,1-k];d<0&&(h=e,e=r,r=h,h=t,t=n,n=h,u=!u,k=1-k),U=1/(1+(m=Hn(r*n*Xn(r,e),1/r))),(I=m/(1+m))>k&&(I=k),c=k}else r>1&&e>1?(g=(e-1)/(r+e-2),_o(k=(r-1)/(r+e-2),r,e)-n<0&&(h=e,e=r,r=h,h=t,t=n,n=h,h=g,g=k,k=h,u=!u),U=(I=Xe(w=tf(n*r*Xn(r,e))/r))<.9?1-I:-Jr(w),e<r&&I<.2&&(y=r-1,b=e-1,A=r*(_=r*r),E=e*e,Kc[0]=0,Kc[1]=1,Kc[2]=b/y,y*=y,Kc[3]=b*(3*r*e+5*e+_-r-4)/(2*(r+2)*y),y*=r+1,Kc[4]=b*(33*r*E+31*E+8*_*E-30*r*e-47*e+11*_*e+6*A*e+18+4*r-A+_*_-10*_),Kc[4]/=3*(r+3)*(r+2)*y,I=Df(Kc,I)),I>k&&(I=k),c=k):(e<r&&(h=e,e=r,r=h,h=t,t=n,n=h,u=!u),Hn(n,1/r)<.5?(0===(I=Hn(n*r*Xn(r,e),1/r))&&(I=Oe),U=1-I):(0===(U=Hn(1-Hn(n,e*Xn(r,e)),1/e))&&(U=Oe),I=1-U))}return I>.5&&(h=e,e=r,r=h,h=t,t=n,n=h,h=U,U=I,I=h,u=!u,T=1-a,a=1-c,c=T),0===a&&(u?I<(a=Zn)&&(I=a):a=Oe,I<a&&(I=a)),i=Bc,I<1e-50&&(r<1||e<1)&&(i*=3,i/=2),v=function(r,e,n,t){return function(i){var u,f,a,o,c;return c=1-i,xo(i,r,e,!0,t,u=[0,0],1,0),o=u[0]-n,f=u[1],t&&(f=-f),0===c&&(c=64*Oe),0===i&&(i=64*Oe),se(a=f*(-c*r+(e-2)*i+1))<c*i*Kn&&(a/=c*i),t&&(a=-a),0===f&&(f=(t?-1:1)*Oe*64),[o,f,a]}}(r,e,n<t?n:t,n>=t),I=function(r,e,n,t,i,u){var f,a,o,c,v,s,l,p,N,h,g,y,b,d,w,m;d=0,a=!1,s=e,v=Me(1,1-i),l=0,o=N=zo(1e7*e,1e7),c=N,p=u;do{if(l=d,c=o,o=N,d=(b=r(s))[0],w=b[1],m=b[2],p-=1,0===d)break;if(0===w?(0===l&&(l=r(e=s===n?t:n),N=e-s),N=mc(l)*mc(d)<0?N<0?(s-n)/2:(s-t)/2:N<0?(s-t)/2:(s-n)/2):0===m?N=d/w:(h=2*d,(N=se(y=2*w-d*(m/w))<1&&se(h)>=se(y)*Kn?d/w:h/y)*w/d<0&&se(N=d/w)>2*se(e)&&(N=2*(N<0?-1:1)*se(e))),(f=se(N/c))>.8&&f<2&&(se(N=N>0?(s-n)/2:(s-t)/2)>s&&(N=mc(N)*s),c=3*N),e=s,(s-=N)<n){if(g=se(n)<1&&se(s)>1&&Kn/se(s)<se(n)?1e3:s/n,se(g)<1&&(g=1/g),!a&&g>0&&g<3)s=e-(N=.99*(e-n)),a=!0;else if((s=e-(N=(e-n)/2))===n||s===t)break}else if(s>t)if(g=se(t)<1&&se(s)>1&&Kn/se(s)<se(t)?1e3:s/t,se(g)<1&&(g=1/g),!a&&g>0&&g<3)s=e-(N=.99*(e-t)),a=!0;else if((s=e-(N=(e-t)/2))===n||s===t)break;N>0?t=e:n=e}while(p&&se(s*v)<se(N));return s}(v,I,a,c,i,Jc),I===a&&(I=0),u?[1-I,I]:[I,1-I]}function rv(r,e,n,t){return er(r)||er(e)||er(n)||e<=0||n<=0||r<0||r>1?NaN:t?Qc(e,n,1-r,r)[0]:Qc(e,n,r,1-r)[0]}function ev(r,e,n){var t;return er(r)||er(e)||er(n)||e<=0||n<=0||r<0||r>1?NaN:(t=rv(r,e,n))/(1-t)}function nv(){var r,e=arguments,n="https://stdlib.io/e/"+e[0]+"?";for(r=1;r<e.length;r++)n+="&arg[]="+encodeURIComponent(e[r]);return n}function tv(){var r,e;if(!(this instanceof tv))return 0===arguments.length?new tv:new tv(arguments[0],arguments[1]);if(arguments.length){if(e=arguments[1],!K(r=arguments[0]))throw new TypeError(nv("0vT8i",r));if(!K(e))throw new TypeError(nv("0vT8j",e))}else r=1,e=1;return W(this,"alpha",{configurable:!1,enumerable:!0,get:function(){return r},set:function(e){if(!K(e))throw new TypeError(nv("0vT8k",e));r=e}}),W(this,"beta",{configurable:!1,enumerable:!0,get:function(){return e},set:function(r){if(!K(r))throw new TypeError(nv("0vT8k",r));e=r}}),this}$(ev,"factory",(function(r,e){return er(r)||er(e)||r<=0||e<=0?Eo(NaN):function(n){var t;if(er(n)||n<0||n>1)return NaN;return t=rv(n,r,e),t/(1-t)}})),G(tv.prototype,"kurtosis",(function(){return function(r,e){var n,t,i;return er(r)||r<=0||er(e)||e<=4?NaN:(i=r*(n=r+e-1)*(5*e-11)+(t=e-1)*t*(t-1),i*=6,i/=r*n*(e-3)*(e-4))}(this.alpha,this.beta)})),G(tv.prototype,"mean",(function(){return function(r,e){return r<=0||e<=1?NaN:r/(e-1)}(this.alpha,this.beta)})),G(tv.prototype,"mode",(function(){return function(r,e){return r<=0||e<=0?NaN:r<1?0:(r-1)/(e+1)}(this.alpha,this.beta)})),G(tv.prototype,"skewness",(function(){return function(r,e){var n;return er(r)||r<=0||er(e)||e<=3?NaN:(n=2*(2*r+e-1)/(e-3),n*=nr((e-2)/(r*(r+e-1))))}(this.alpha,this.beta)})),G(tv.prototype,"stdev",(function(){return function(r,e){var n;return er(r)||r<=0||er(e)||e<=2?NaN:nr(r*(r+(n=e-1))/((n-1)*n*n))}(this.alpha,this.beta)})),G(tv.prototype,"variance",(function(){return function(r,e){var n;return er(r)||r<=0||er(e)||e<=2?NaN:r*(r+(n=e-1))/((n-1)*n*n)}(this.alpha,this.beta)})),$(tv.prototype,"cdf",(function(r){return To(r,this.alpha,this.beta)})),$(tv.prototype,"logcdf",(function(r){return Oo(r,this.alpha,this.beta)})),$(tv.prototype,"logpdf",(function(r){return Mo(r,this.alpha,this.beta)})),$(tv.prototype,"pdf",(function(r){return Co(r,this.alpha,this.beta)})),$(tv.prototype,"quantile",(function(r){return ev(r,this.alpha,this.beta)}));export{tv as default};
//# sourceMappingURL=mod.js.map