(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
(FPCore (x y z t a b) :precision binary64 (+ (* (fma (log (sqrt t)) -2.0 1.0) z) (fma (- a 0.5) b (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b);
}
double code(double x, double y, double z, double t, double a, double b) {
return (fma(log(sqrt(t)), -2.0, 1.0) * z) + fma((a - 0.5), b, (x + y));
}
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function code(x, y, z, t, a, b) return Float64(Float64(fma(log(sqrt(t)), -2.0, 1.0) * z) + fma(Float64(a - 0.5), b, Float64(x + y))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[Log[N[Sqrt[t], $MachinePrecision]], $MachinePrecision] * -2.0 + 1.0), $MachinePrecision] * z), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\mathsf{fma}\left(\log \left(\sqrt{t}\right), -2, 1\right) \cdot z + \mathsf{fma}\left(a - 0.5, b, x + y\right)




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
| Original | 0.1 |
|---|---|
| Target | 0.3 |
| Herbie | 0.1 |
Initial program 0.1
Simplified0.1
Applied fma-udef_binary640.1
Simplified0.1
Applied add-sqr-sqrt_binary640.1
Applied log-prod_binary640.1
Applied distribute-rgt-in_binary640.1
Applied associate--r+_binary640.1
Applied add-cube-cbrt_binary640.2
Applied prod-diff_binary640.2
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2022131
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))