\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(\left(y + x\right) - \mathsf{fma}\left(\log y, y + 0.5, z\right)\right) + 0 \cdot \mathsf{fma}\left(y + 0.5, \log y, z\right)double f(double x, double y, double z) {
double r313149 = x;
double r313150 = y;
double r313151 = 0.5;
double r313152 = r313150 + r313151;
double r313153 = log(r313150);
double r313154 = r313152 * r313153;
double r313155 = r313149 - r313154;
double r313156 = r313155 + r313150;
double r313157 = z;
double r313158 = r313156 - r313157;
return r313158;
}
double f(double x, double y, double z) {
double r313159 = y;
double r313160 = x;
double r313161 = r313159 + r313160;
double r313162 = log(r313159);
double r313163 = 0.5;
double r313164 = r313159 + r313163;
double r313165 = z;
double r313166 = fma(r313162, r313164, r313165);
double r313167 = r313161 - r313166;
double r313168 = 0.0;
double r313169 = fma(r313164, r313162, r313165);
double r313170 = r313168 * r313169;
double r313171 = r313167 + r313170;
return r313171;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
Simplified0.1
rmApplied add-cube-cbrt0.9
Applied add-cube-cbrt1.3
Applied prod-diff1.3
Simplified0.5
Simplified0.5
rmApplied *-un-lft-identity0.5
Applied cbrt-prod0.5
Applied unpow-prod-down0.5
Simplified0.5
Simplified0.1
Final simplification0.1
herbie shell --seed 2019303 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(- (- (+ y x) z) (* (+ y 0.5) (log y)))
(- (+ (- x (* (+ y 0.5) (log y))) y) z))