I am experiencing inconsistent results using the Distributions package. When I run the following code, I get two different results on different machines
Which looks very little difference, but because of some ripple effect it turns causing issues with my roll-ups
Digging into it, I figured that the issue hides into the Base.Math library, in the @horner macro that, following the code, is called with the parameters:
@horner(-0.4875984000082292, 0.14780_64707_15138_316110e2, -0.91374_16702_42603_13936e2, 0.21015_79048_62053_17714e3, -0.22210_25412_18551_32366e3, 0.10760_45391_60551_23830e3, -0.20601_07303_28265_443e2, 0.1e1)
Which results in
Looking into the macro I can’t really figure out what’s going on!
macro horner(x, p...) ex = esc(p[end]) for i = length(p)-1:-1:1 ex = :(muladd(t, $ex, $(esc(p[i])))) end ex = quote local r = $ex end return Expr(:block, :(local t = $(esc(x))), ex, :r) end
What can possibly cause the issue? Thanks