\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
x + \mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(z, 1 - \log t, y\right)\right)double f(double x, double y, double z, double t, double a, double b) {
double r383342 = x;
double r383343 = y;
double r383344 = r383342 + r383343;
double r383345 = z;
double r383346 = r383344 + r383345;
double r383347 = t;
double r383348 = log(r383347);
double r383349 = r383345 * r383348;
double r383350 = r383346 - r383349;
double r383351 = a;
double r383352 = 0.5;
double r383353 = r383351 - r383352;
double r383354 = b;
double r383355 = r383353 * r383354;
double r383356 = r383350 + r383355;
return r383356;
}
double f(double x, double y, double z, double t, double a, double b) {
double r383357 = x;
double r383358 = b;
double r383359 = a;
double r383360 = 0.5;
double r383361 = r383359 - r383360;
double r383362 = z;
double r383363 = 1.0;
double r383364 = t;
double r383365 = log(r383364);
double r383366 = r383363 - r383365;
double r383367 = y;
double r383368 = fma(r383362, r383366, r383367);
double r383369 = fma(r383358, r383361, r383368);
double r383370 = r383357 + r383369;
return r383370;
}




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.4 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied associate--l+0.1
Applied associate-+l+0.1
Simplified0.1
rmApplied associate-+l+0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020043 +o rules:numerics
(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 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))