3 \cdot \left(\left(\left(x \cdot 3\right) \cdot x - x \cdot 4\right) + 1\right)
3 + x \cdot \left(x \cdot 9 - 12\right)
(FPCore (x) :precision binary64 (* 3.0 (+ (- (* (* x 3.0) x) (* x 4.0)) 1.0)))
(FPCore (x) :precision binary64 (+ 3.0 (* x (- (* x 9.0) 12.0))))
double code(double x) {
return ((double) (3.0 * ((double) (((double) (((double) (((double) (x * 3.0)) * x)) - ((double) (x * 4.0)))) + 1.0))));
}
double code(double x) {
return ((double) (3.0 + ((double) (x * ((double) (((double) (x * 9.0)) - 12.0))))));
}




Bits error versus x
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program Error: 0.1 bits
SimplifiedError: 0.1 bits
Taylor expanded around 0 Error: 0.1 bits
SimplifiedError: 0.1 bits
Final simplificationError: 0.1 bits
herbie shell --seed 2020204
(FPCore (x)
:name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(+ 3.0 (- (* (* 9.0 x) x) (* 12.0 x)))
(* 3.0 (+ (- (* (* x 3.0) x) (* x 4.0)) 1.0)))