Average Error: 1.3 → 1.3
Time: 1.6m
Precision: 64
Internal precision: 128
\[\frac{1.0}{3.0} \cdot \cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\]
\[e^{\frac{{\left(\log \left(\frac{1.0}{3.0}\right)\right)}^2 - {\left(\log \left(\cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\right)\right)}^2}{\log \left(\frac{1.0}{3.0}\right) - \log \left(\cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\right)}}\]

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Target

Original1.3
Comparison1.2
Herbie1.3
\[ \frac{\cos^{-1} \left(\frac{\frac{x}{27.0}}{y \cdot z} \cdot \frac{\sqrt{t}}{\frac{2.0}{3.0}}\right)}{3.0} \]

Derivation

  1. Initial program 1.3

    \[\frac{1.0}{3.0} \cdot \cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\]
  2. Using strategy rm
  3. Applied add-exp-log 1.3

    \[\leadsto \frac{1.0}{3.0} \cdot \color{blue}{e^{\log \left(\cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\right)}}\]
  4. Applied add-exp-log 1.3

    \[\leadsto \color{blue}{e^{\log \left(\frac{1.0}{3.0}\right)}} \cdot e^{\log \left(\cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\right)}\]
  5. Applied prod-exp 1.3

    \[\leadsto \color{blue}{e^{\log \left(\frac{1.0}{3.0}\right) + \log \left(\cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\right)}}\]
  6. Using strategy rm
  7. Applied flip-+ 1.3

    \[\leadsto e^{\color{blue}{\frac{{\left(\log \left(\frac{1.0}{3.0}\right)\right)}^2 - {\left(\log \left(\cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\right)\right)}^2}{\log \left(\frac{1.0}{3.0}\right) - \log \left(\cos^{-1} \left(\frac{3.0 \cdot \frac{x}{y \cdot 27.0}}{z \cdot 2.0} \cdot \sqrt{t}\right)\right)}}}\]
  8. Removed slow pow expressions

Runtime

Time bar (total: 1.6m) Debug log

Please include this information when filing a bug report:

herbie --seed '#(4215513951 1342756486 2269817927 823851437 3473369866 732294885)'
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, D"

  :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)))))