3 \cdot \left(\left(\left(x \cdot 3\right) \cdot x - x \cdot 4\right) + 1\right)
\left(\left(\sqrt[3]{9} \cdot \sqrt[3]{9}\right) \cdot \left(\left(x \cdot \sqrt[3]{9}\right) \cdot x\right) + 3\right) - 12 \cdot xdouble code(double x) {
return (3.0 * ((((x * 3.0) * x) - (x * 4.0)) + 1.0));
}
double code(double x) {
return ((((cbrt(9.0) * cbrt(9.0)) * ((x * cbrt(9.0)) * x)) + 3.0) - (12.0 * x));
}




Bits error versus x
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
Simplified0.1
Taylor expanded around 0 0.1
rmApplied add-cube-cbrt0.1
Applied associate-*l*0.1
rmApplied unpow20.1
Applied associate-*r*0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020106
(FPCore (x)
:name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, D"
:precision binary64
:herbie-target
(+ 3 (- (* (* 9 x) x) (* 12 x)))
(* 3 (+ (- (* (* x 3) x) (* x 4)) 1)))