UNPKG

@stdlib/esm

Version:

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

3 lines 1.03 kB
// This file is a part of stdlib. License is Apache-2.0: http://www.apache.org/licenses/LICENSE-2.0 import t from"./../../../../utils/define-nonenumerable-read-only-property.js";import o from"./../../../../math/base/special/ln.js";import r from"./../../../../math/base/special/pow.js";import a from"./../../../../constants/math/float64-ln-two-pi.js";import n from"./../../../../constants/math/float64-ninf.js";import s from"./../../../../constants/math/float64-pinf.js";import m from"./../../../../math/base/assert/is-nan.js";import f from"./../../../../utils/constant-function.js";import e from"./../degenerate/logpdf.js";var i=o,p=r,l=a,c=n,u=s,j=m;function h(t,o,r){var a;return j(t)||j(o)||j(r)||r<0?NaN:0===r?t===o?u:c:(a=p(r,2),-.5*(2*i(r)+l)+-1/(2*a)*p(t-o,2))}var d=f,v=e.factory,b=a,y=m,N=r,g=o;function w(t,o){var r,a,n;return y(t)||y(o)||o<0?d(NaN):0===o?v(t):(r=N(o,2),a=-.5*(2*g(o)+b),n=-1/(2*r),function(o){return a+n*N(o-t,2)})}var x=t,k=h,q=w;x(k,"factory",q);export default k; //# sourceMappingURL=logpdf.js.map