Average Error: 1.3 → 0.2
Time: 5.4s
Precision: 64
\[\frac{1}{3} \cdot \cos^{-1} \left(\frac{3 \cdot \frac{x}{y \cdot 27}}{z \cdot 2} \cdot \sqrt{t}\right)\]
\[1 \cdot \frac{\frac{\cos^{-1} \left(0.055555555555555552 \cdot \left(\sqrt{t} \cdot \frac{x}{z \cdot y}\right)\right)}{\sqrt{3}}}{\sqrt{3}}\]
\frac{1}{3} \cdot \cos^{-1} \left(\frac{3 \cdot \frac{x}{y \cdot 27}}{z \cdot 2} \cdot \sqrt{t}\right)
1 \cdot \frac{\frac{\cos^{-1} \left(0.055555555555555552 \cdot \left(\sqrt{t} \cdot \frac{x}{z \cdot y}\right)\right)}{\sqrt{3}}}{\sqrt{3}}
double code(double x, double y, double z, double t) {
	return ((1.0 / 3.0) * acos((((3.0 * (x / (y * 27.0))) / (z * 2.0)) * sqrt(t))));
}
double code(double x, double y, double z, double t) {
	return (1.0 * ((acos((0.05555555555555555 * (sqrt(t) * (x / (z * y))))) / sqrt(3.0)) / sqrt(3.0)));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.3
Target1.2
Herbie0.2
\[\frac{\cos^{-1} \left(\frac{\frac{x}{27}}{y \cdot z} \cdot \frac{\sqrt{t}}{\frac{2}{3}}\right)}{3}\]

Derivation

  1. Initial program 1.3

    \[\frac{1}{3} \cdot \cos^{-1} \left(\frac{3 \cdot \frac{x}{y \cdot 27}}{z \cdot 2} \cdot \sqrt{t}\right)\]
  2. Taylor expanded around 0 1.2

    \[\leadsto \frac{1}{3} \cdot \cos^{-1} \left(\color{blue}{\left(0.055555555555555552 \cdot \frac{x}{z \cdot y}\right)} \cdot \sqrt{t}\right)\]
  3. Using strategy rm
  4. Applied div-inv1.2

    \[\leadsto \color{blue}{\left(1 \cdot \frac{1}{3}\right)} \cdot \cos^{-1} \left(\left(0.055555555555555552 \cdot \frac{x}{z \cdot y}\right) \cdot \sqrt{t}\right)\]
  5. Applied associate-*l*1.2

    \[\leadsto \color{blue}{1 \cdot \left(\frac{1}{3} \cdot \cos^{-1} \left(\left(0.055555555555555552 \cdot \frac{x}{z \cdot y}\right) \cdot \sqrt{t}\right)\right)}\]
  6. Simplified1.2

    \[\leadsto 1 \cdot \color{blue}{\frac{\cos^{-1} \left(0.055555555555555552 \cdot \left(\sqrt{t} \cdot \frac{x}{z \cdot y}\right)\right)}{3}}\]
  7. Using strategy rm
  8. Applied add-sqr-sqrt0.3

    \[\leadsto 1 \cdot \frac{\cos^{-1} \left(0.055555555555555552 \cdot \left(\sqrt{t} \cdot \frac{x}{z \cdot y}\right)\right)}{\color{blue}{\sqrt{3} \cdot \sqrt{3}}}\]
  9. Applied associate-/r*0.2

    \[\leadsto 1 \cdot \color{blue}{\frac{\frac{\cos^{-1} \left(0.055555555555555552 \cdot \left(\sqrt{t} \cdot \frac{x}{z \cdot y}\right)\right)}{\sqrt{3}}}{\sqrt{3}}}\]
  10. Final simplification0.2

    \[\leadsto 1 \cdot \frac{\frac{\cos^{-1} \left(0.055555555555555552 \cdot \left(\sqrt{t} \cdot \frac{x}{z \cdot y}\right)\right)}{\sqrt{3}}}{\sqrt{3}}\]

Reproduce

herbie shell --seed 2020079 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, D"
  :precision binary64

  :herbie-target
  (/ (acos (* (/ (/ x 27) (* y z)) (/ (sqrt t) (/ 2 3)))) 3)

  (* (/ 1 3) (acos (* (/ (* 3 (/ x (* y 27))) (* z 2)) (sqrt t)))))