x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}x \cdot e^{y \cdot \left(\log z - t\right) - a \cdot \left(z + b\right)}(FPCore (x y z t a b) :precision binary64 (* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))
(FPCore (x y z t a b) :precision binary64 (* x (exp (- (* y (- (log z) t)) (* a (+ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
return x * exp((y * (log(z) - t)) + (a * (log(1.0 - z) - b)));
}
double code(double x, double y, double z, double t, double a, double b) {
return x * exp((y * (log(z) - t)) - (a * (z + b)));
}









Bits error versus x









Bits error versus y









Bits error versus z









Bits error versus t









Bits error versus a









Bits error versus b
Results
| Alternative 1 | |
|---|---|
| Error | 4.7 |
| Cost | 7554 |
| Alternative 2 | |
|---|---|
| Error | 6.2 |
| Cost | 7426 |
| Alternative 3 | |
|---|---|
| Error | 17.4 |
| Cost | 1622 |
| Alternative 4 | |
|---|---|
| Error | 17.4 |
| Cost | 1990 |
| Alternative 5 | |
|---|---|
| Error | 18.5 |
| Cost | 64 |
| Alternative 6 | |
|---|---|
| Error | 61.9 |
| Cost | 64 |

Initial program 2.1
Taylor expanded around 0 0.5
Simplified0.4
Simplified0.4
Final simplification0.4
herbie shell --seed 2021044
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, B"
:precision binary64
(* x (exp (+ (* y (- (log z) t)) (* a (- (log (- 1.0 z)) b))))))