x \cdot 0.5 + y \cdot \left(\left(1 - z\right) + \log z\right)
x \cdot 0.5 + \left(\left(\log \left(\sqrt[3]{z}\right) \cdot 2 + \left(1 - z\right)\right) \cdot y + y \cdot \log \left({z}^{0.3333333333333333}\right)\right)(FPCore (x y z) :precision binary64 (+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))
(FPCore (x y z) :precision binary64 (+ (* x 0.5) (+ (* (+ (* (log (cbrt z)) 2.0) (- 1.0 z)) y) (* y (log (pow z 0.3333333333333333))))))
double code(double x, double y, double z) {
return ((double) (((double) (x * 0.5)) + ((double) (y * ((double) (((double) (1.0 - z)) + ((double) log(z))))))));
}
double code(double x, double y, double z) {
return ((double) (((double) (x * 0.5)) + ((double) (((double) (((double) (((double) (((double) log(((double) cbrt(z)))) * 2.0)) + ((double) (1.0 - z)))) * y)) + ((double) (y * ((double) log(((double) pow(z, 0.3333333333333333))))))))));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program Error: 0.1 bits
rmApplied add-cube-cbrtError: 0.1 bits
Applied log-prodError: 0.1 bits
Applied associate-+r+Error: 0.1 bits
SimplifiedError: 0.1 bits
rmApplied distribute-lft-inError: 0.1 bits
SimplifiedError: 0.1 bits
SimplifiedError: 0.1 bits
rmApplied pow1/3Error: 0.1 bits
Final simplificationError: 0.1 bits
herbie shell --seed 2020204
(FPCore (x y z)
:name "System.Random.MWC.Distributions:gamma from mwc-random-0.13.3.2"
:precision binary64
:herbie-target
(- (+ y (* 0.5 x)) (* y (- z (log z))))
(+ (* x 0.5) (* y (+ (- 1.0 z) (log z)))))