(FPCore (x y z t a b c i) :precision binary64 (/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (- (+ (/ z y) x) (/ (* x a) y))))
(if (<= y -1.0562119916037821e+77)
t_1
(if (<= y 5.6332404320936567e+51)
(/
(fma
y
(fma
(pow y 3.0)
x
(+ 230661.510616 (+ (* y 27464.7644705) (* z (pow y 2.0)))))
t)
(fma y (fma y (fma y (+ y a) b) c) i))
t_1))))double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((((((((x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / (((((((y + a) * y) + b) * y) + c) * y) + i);
}
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = ((z / y) + x) - ((x * a) / y);
double tmp;
if (y <= -1.0562119916037821e+77) {
tmp = t_1;
} else if (y <= 5.6332404320936567e+51) {
tmp = fma(y, fma(pow(y, 3.0), x, (230661.510616 + ((y * 27464.7644705) + (z * pow(y, 2.0))))), t) / fma(y, fma(y, fma(y, (y + a), b), c), i);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * y) + z) * y) + 27464.7644705) * y) + 230661.510616) * y) + t) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(y + a) * y) + b) * y) + c) * y) + i)) end
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(z / y) + x) - Float64(Float64(x * a) / y)) tmp = 0.0 if (y <= -1.0562119916037821e+77) tmp = t_1; elseif (y <= 5.6332404320936567e+51) tmp = Float64(fma(y, fma((y ^ 3.0), x, Float64(230661.510616 + Float64(Float64(y * 27464.7644705) + Float64(z * (y ^ 2.0))))), t) / fma(y, fma(y, fma(y, Float64(y + a), b), c), i)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(N[(N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision] + 27464.7644705), $MachinePrecision] * y), $MachinePrecision] + 230661.510616), $MachinePrecision] * y), $MachinePrecision] + t), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(y + a), $MachinePrecision] * y), $MachinePrecision] + b), $MachinePrecision] * y), $MachinePrecision] + c), $MachinePrecision] * y), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(z / y), $MachinePrecision] + x), $MachinePrecision] - N[(N[(x * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.0562119916037821e+77], t$95$1, If[LessEqual[y, 5.6332404320936567e+51], N[(N[(y * N[(N[Power[y, 3.0], $MachinePrecision] * x + N[(230661.510616 + N[(N[(y * 27464.7644705), $MachinePrecision] + N[(z * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] / N[(y * N[(y * N[(y * N[(y + a), $MachinePrecision] + b), $MachinePrecision] + c), $MachinePrecision] + i), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\frac{\left(\left(\left(x \cdot y + z\right) \cdot y + 27464.7644705\right) \cdot y + 230661.510616\right) \cdot y + t}{\left(\left(\left(y + a\right) \cdot y + b\right) \cdot y + c\right) \cdot y + i}
\begin{array}{l}
t_1 := \left(\frac{z}{y} + x\right) - \frac{x \cdot a}{y}\\
\mathbf{if}\;y \leq -1.0562119916037821 \cdot 10^{+77}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.6332404320936567 \cdot 10^{+51}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \mathsf{fma}\left({y}^{3}, x, 230661.510616 + \left(y \cdot 27464.7644705 + z \cdot {y}^{2}\right)\right), t\right)}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, y + a, b\right), c\right), i\right)}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}



Bits error versus x



Bits error versus y



Bits error versus z



Bits error versus t



Bits error versus a



Bits error versus b



Bits error versus c



Bits error versus i
if y < -1.0562119916037821e77 or 5.6332404320936567e51 < y Initial program 63.0
Simplified63.0
Taylor expanded in y around inf 19.7
if -1.0562119916037821e77 < y < 5.6332404320936567e51Initial program 5.5
Simplified5.5
Taylor expanded in y around 0 5.5
Applied fma-def_binary645.5
Final simplification11.3
herbie shell --seed 2022131
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2"
:precision binary64
(/ (+ (* (+ (* (+ (* (+ (* x y) z) y) 27464.7644705) y) 230661.510616) y) t) (+ (* (+ (* (+ (* (+ y a) y) b) y) c) y) i)))