Average Error: 1.3 → 0.2
Time: 4.9s
Precision: binary64
\[\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(x \cdot \left(\frac{\sqrt{t}}{y \cdot \left(27 \cdot \left(z \cdot 2\right)\right)} \cdot 3\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(x \cdot \left(\frac{\sqrt{t}}{y \cdot \left(27 \cdot \left(z \cdot 2\right)\right)} \cdot 3\right)\right)}{\sqrt{3}}}{\sqrt{3}}
double code(double x, double y, double z, double t) {
	return ((double) (((double) (1.0 / 3.0)) * ((double) acos(((double) (((double) (((double) (3.0 * ((double) (x / ((double) (y * 27.0)))))) / ((double) (z * 2.0)))) * ((double) sqrt(t))))))));
}
double code(double x, double y, double z, double t) {
	return ((double) (1.0 * ((double) (((double) (((double) acos(((double) (x * ((double) (((double) (((double) sqrt(t)) / ((double) (y * ((double) (27.0 * ((double) (z * 2.0)))))))) * 3.0)))))) / ((double) sqrt(3.0)))) / ((double) 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. Simplified1.2

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

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

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

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

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

Reproduce

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

  :herbie-target
  (/ (acos (* (/ (/ x 27.0) (* y z)) (/ (sqrt t) (/ 2.0 3.0)))) 3.0)

  (* (/ 1.0 3.0) (acos (* (/ (* 3.0 (/ x (* y 27.0))) (* z 2.0)) (sqrt t)))))