diff --git a/src/stdlib/statistics.jl b/src/stdlib/statistics.jl index 70cb42a..069b484 100644 --- a/src/stdlib/statistics.jl +++ b/src/stdlib/statistics.jl @@ -39,7 +39,7 @@ get the pdf of `Normal(μ, σ)` at point `x`. anc1 += x anc1 -= μ anc2 += anc1 / σ # (x- μ)/σ - anc3 += anc2 * anc2 # (x-μ)^2/σ^2 + anc3 += anc2^2 # (x-μ)^2/σ^2 end out -= anc3 * 0.5 # -(x-μ)^2/2σ^2 diff --git a/test/autodiff/hessian_backback.jl b/test/autodiff/hessian_backback.jl index bc4290f..c7f998c 100644 --- a/test/autodiff/hessian_backback.jl +++ b/test/autodiff/hessian_backback.jl @@ -11,7 +11,7 @@ using NiLang.AD: hessian_numeric a += b^d c += b/d ROT(a, c, d) - b += d * d + b += d ^ 2 a += c * d end h1 = hessian_backback(test, (0.0, 2.0, 1.0, 3.0); iloss=1)