?

Average Error: 20.3 → 15.7
Time: 47.3s
Precision: binary64
Cost: 40393

?

\[ \begin{array}{c}[z, t] = \mathsf{sort}([z, t])\\ \end{array} \]
\[\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+147} \lor \neg \left(z \cdot t \leq 5000000000\right):\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sqrt{x} \cdot \mathsf{fma}\left(\cos \left(t \cdot \frac{z}{-3}\right), \cos y, \sin y \cdot \sin \left(\left(z \cdot t\right) \cdot 0.3333333333333333\right)\right)\right) - \frac{a}{b \cdot 3}\\ \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= (* z t) -2e+147) (not (<= (* z t) 5000000000.0)))
   (fma 2.0 (sqrt x) (/ (/ a -3.0) b))
   (-
    (*
     2.0
     (*
      (sqrt x)
      (fma
       (cos (* t (/ z -3.0)))
       (cos y)
       (* (sin y) (sin (* (* z t) 0.3333333333333333))))))
    (/ a (* b 3.0)))))
double code(double x, double y, double z, double t, double a, double b) {
	return ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (((z * t) <= -2e+147) || !((z * t) <= 5000000000.0)) {
		tmp = fma(2.0, sqrt(x), ((a / -3.0) / b));
	} else {
		tmp = (2.0 * (sqrt(x) * fma(cos((t * (z / -3.0))), cos(y), (sin(y) * sin(((z * t) * 0.3333333333333333)))))) - (a / (b * 3.0));
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	return Float64(Float64(Float64(2.0 * sqrt(x)) * cos(Float64(y - Float64(Float64(z * t) / 3.0)))) - Float64(a / Float64(b * 3.0)))
end
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((Float64(z * t) <= -2e+147) || !(Float64(z * t) <= 5000000000.0))
		tmp = fma(2.0, sqrt(x), Float64(Float64(a / -3.0) / b));
	else
		tmp = Float64(Float64(2.0 * Float64(sqrt(x) * fma(cos(Float64(t * Float64(z / -3.0))), cos(y), Float64(sin(y) * sin(Float64(Float64(z * t) * 0.3333333333333333)))))) - Float64(a / Float64(b * 3.0)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+147], N[Not[LessEqual[N[(z * t), $MachinePrecision], 5000000000.0]], $MachinePrecision]], N[(2.0 * N[Sqrt[x], $MachinePrecision] + N[(N[(a / -3.0), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(N[Cos[N[(t * N[(z / -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Cos[y], $MachinePrecision] + N[(N[Sin[y], $MachinePrecision] * N[Sin[N[(N[(z * t), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3}
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+147} \lor \neg \left(z \cdot t \leq 5000000000\right):\\
\;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{x} \cdot \mathsf{fma}\left(\cos \left(t \cdot \frac{z}{-3}\right), \cos y, \sin y \cdot \sin \left(\left(z \cdot t\right) \cdot 0.3333333333333333\right)\right)\right) - \frac{a}{b \cdot 3}\\


\end{array}

Error?

Target

Original20.3
Target18.2
Herbie15.7
\[\begin{array}{l} \mathbf{if}\;z < -1.3793337487235141 \cdot 10^{+129}:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(\frac{1}{y} - \frac{\frac{0.3333333333333333}{z}}{t}\right) - \frac{\frac{a}{3}}{b}\\ \mathbf{elif}\;z < 3.516290613555987 \cdot 10^{+106}:\\ \;\;\;\;\left(\sqrt{x} \cdot 2\right) \cdot \cos \left(y - \frac{t}{3} \cdot z\right) - \frac{\frac{a}{3}}{b}\\ \mathbf{else}:\\ \;\;\;\;\cos \left(y - \frac{\frac{0.3333333333333333}{z}}{t}\right) \cdot \left(2 \cdot \sqrt{x}\right) - \frac{\frac{a}{b}}{3}\\ \end{array} \]

Derivation?

  1. Split input into 2 regimes
  2. if (*.f64 z t) < -2e147 or 5e9 < (*.f64 z t)

    1. Initial program 42.7

      \[\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]
    2. Simplified42.6

      \[\leadsto \color{blue}{\mathsf{fma}\left(2, \sqrt{x} \cdot \cos \left(\mathsf{fma}\left(z, t \cdot -0.3333333333333333, y\right)\right), \frac{\frac{a}{-3}}{b}\right)} \]
      Proof

      [Start]42.7

      \[ \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]

      associate-*l* [=>]42.7

      \[ \color{blue}{2 \cdot \left(\sqrt{x} \cdot \cos \left(y - \frac{z \cdot t}{3}\right)\right)} - \frac{a}{b \cdot 3} \]

      fma-neg [=>]42.7

      \[ \color{blue}{\mathsf{fma}\left(2, \sqrt{x} \cdot \cos \left(y - \frac{z \cdot t}{3}\right), -\frac{a}{b \cdot 3}\right)} \]

      remove-double-neg [<=]42.7

      \[ \mathsf{fma}\left(2, \color{blue}{-\left(-\sqrt{x} \cdot \cos \left(y - \frac{z \cdot t}{3}\right)\right)}, -\frac{a}{b \cdot 3}\right) \]
    3. Taylor expanded in z around 0 32.1

      \[\leadsto \mathsf{fma}\left(2, \sqrt{x} \cdot \color{blue}{\cos y}, \frac{\frac{a}{-3}}{b}\right) \]
    4. Taylor expanded in y around 0 32.0

      \[\leadsto \mathsf{fma}\left(2, \color{blue}{\sqrt{x}}, \frac{\frac{a}{-3}}{b}\right) \]

    if -2e147 < (*.f64 z t) < 5e9

    1. Initial program 5.9

      \[\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]
    2. Simplified5.9

      \[\leadsto \color{blue}{2 \cdot \left(\sqrt{x} \cdot \cos \left(y - \frac{z}{\frac{3}{t}}\right)\right) - \frac{a}{3 \cdot b}} \]
      Proof

      [Start]5.9

      \[ \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]

      associate-*l* [=>]5.9

      \[ \color{blue}{2 \cdot \left(\sqrt{x} \cdot \cos \left(y - \frac{z \cdot t}{3}\right)\right)} - \frac{a}{b \cdot 3} \]

      associate-/l* [=>]5.9

      \[ 2 \cdot \left(\sqrt{x} \cdot \cos \left(y - \color{blue}{\frac{z}{\frac{3}{t}}}\right)\right) - \frac{a}{b \cdot 3} \]

      *-commutative [=>]5.9

      \[ 2 \cdot \left(\sqrt{x} \cdot \cos \left(y - \frac{z}{\frac{3}{t}}\right)\right) - \frac{a}{\color{blue}{3 \cdot b}} \]
    3. Applied egg-rr5.2

      \[\leadsto 2 \cdot \left(\sqrt{x} \cdot \color{blue}{\left(\cos y \cdot \cos \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right) + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)}\right) - \frac{a}{3 \cdot b} \]
    4. Simplified5.2

      \[\leadsto 2 \cdot \left(\sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(\cos \left(t \cdot \frac{z}{-3}\right), \cos y, \sin y \cdot \sin \left(0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)}\right) - \frac{a}{3 \cdot b} \]
      Proof

      [Start]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos y \cdot \cos \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right) + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      *-commutative [=>]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\color{blue}{\cos \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right) \cdot \cos y} + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      cos-neg [<=]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\color{blue}{\cos \left(-t \cdot \left(z \cdot 0.3333333333333333\right)\right)} \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      distribute-lft-neg-in [=>]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos \color{blue}{\left(\left(-t\right) \cdot \left(z \cdot 0.3333333333333333\right)\right)} \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      *-commutative [=>]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos \left(\left(-t\right) \cdot \color{blue}{\left(0.3333333333333333 \cdot z\right)}\right) \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      associate-*l* [<=]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos \color{blue}{\left(\left(\left(-t\right) \cdot 0.3333333333333333\right) \cdot z\right)} \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      distribute-lft-neg-in [<=]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos \left(\color{blue}{\left(-t \cdot 0.3333333333333333\right)} \cdot z\right) \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      distribute-lft-neg-in [<=]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos \color{blue}{\left(-\left(t \cdot 0.3333333333333333\right) \cdot z\right)} \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      *-commutative [=>]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos \left(-\color{blue}{\left(0.3333333333333333 \cdot t\right)} \cdot z\right) \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      associate-*r* [<=]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \left(\cos \left(-\color{blue}{0.3333333333333333 \cdot \left(t \cdot z\right)}\right) \cdot \cos y + \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)\right) - \frac{a}{3 \cdot b} \]

      fma-def [=>]5.2

      \[ 2 \cdot \left(\sqrt{x} \cdot \color{blue}{\mathsf{fma}\left(\cos \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right), \cos y, \sin y \cdot \sin \left(t \cdot \left(z \cdot 0.3333333333333333\right)\right)\right)}\right) - \frac{a}{3 \cdot b} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification15.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+147} \lor \neg \left(z \cdot t \leq 5000000000\right):\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sqrt{x} \cdot \mathsf{fma}\left(\cos \left(t \cdot \frac{z}{-3}\right), \cos y, \sin y \cdot \sin \left(\left(z \cdot t\right) \cdot 0.3333333333333333\right)\right)\right) - \frac{a}{b \cdot 3}\\ \end{array} \]

Alternatives

Alternative 1
Error15.7
Cost34121
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+147} \lor \neg \left(z \cdot t \leq 5000000000\right):\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(t \cdot \frac{z}{3}\right) - \sin y \cdot \sin \left(t \cdot \left(z \cdot -0.3333333333333333\right)\right)\right) - \frac{a}{b \cdot 3}\\ \end{array} \]
Alternative 2
Error15.7
Cost34120
\[\begin{array}{l} t_1 := z \cdot \left(t \cdot -0.3333333333333333\right)\\ t_2 := \frac{a}{b \cdot 3}\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+222}:\\ \;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(2 \cdot \sqrt{x \cdot {\cos y}^{2}}\right)\right) - t_2\\ \mathbf{elif}\;z \cdot t \leq 5000000000:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos t_1 - \sin y \cdot \sin t_1\right) - t_2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \end{array} \]
Alternative 3
Error16.1
Cost33800
\[\begin{array}{l} t_1 := \frac{a}{b \cdot 3}\\ \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+240}:\\ \;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(2 \cdot \sqrt{x \cdot {\cos y}^{2}}\right)\right) - t_1\\ \mathbf{elif}\;z \cdot t \leq 10^{+177}:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{\sqrt[3]{t}}{\frac{3}{z}} \cdot {\left(\sqrt[3]{t}\right)}^{2}\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2, {\left(\sqrt[3]{\sqrt{x} \cdot \cos y}\right)}^{3}, \frac{\frac{a}{-3}}{b}\right)\\ \end{array} \]
Alternative 4
Error16.2
Cost33800
\[\begin{array}{l} t_1 := 2 \cdot \sqrt{x}\\ \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+140}:\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+107}:\\ \;\;\;\;t_1 \cdot \cos \left(y - {\left(\sqrt[3]{z}\right)}^{2} \cdot \frac{\sqrt[3]{z}}{\frac{3}{t}}\right) - \frac{a}{b \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{expm1}\left({\left({\left(\mathsf{log1p}\left(t_1\right)\right)}^{3}\right)}^{0.3333333333333333}\right) + \frac{-a}{b \cdot 3}\\ \end{array} \]
Alternative 5
Error16.2
Cost33800
\[\begin{array}{l} t_1 := 2 \cdot \sqrt{x}\\ \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+140}:\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+107}:\\ \;\;\;\;t_1 \cdot \cos \left(y - \frac{{\left(\sqrt[3]{z}\right)}^{2}}{\frac{3}{t \cdot \sqrt[3]{z}}}\right) - \frac{a}{b \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{expm1}\left({\left({\left(\mathsf{log1p}\left(t_1\right)\right)}^{3}\right)}^{0.3333333333333333}\right) + \frac{-a}{b \cdot 3}\\ \end{array} \]
Alternative 6
Error16.1
Cost33028
\[\begin{array}{l} t_1 := \frac{a}{b \cdot 3}\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+222}:\\ \;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(2 \cdot \sqrt{x \cdot {\cos y}^{2}}\right)\right) - t_1\\ \mathbf{elif}\;z \cdot t \leq 5000000000:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y + z \cdot \frac{-1}{\frac{3}{t}}\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \end{array} \]
Alternative 7
Error16.1
Cost20164
\[\begin{array}{l} t_1 := \frac{a}{b \cdot 3}\\ t_2 := 2 \cdot \sqrt{x}\\ \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+222}:\\ \;\;\;\;t_2 \cdot \left|\cos y\right| - t_1\\ \mathbf{elif}\;z \cdot t \leq 5000000000:\\ \;\;\;\;t_2 \cdot \cos \left(y + z \cdot \frac{-1}{\frac{3}{t}}\right) - t_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \end{array} \]
Alternative 8
Error16.1
Cost14537
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+147} \lor \neg \left(z \cdot t \leq 5000000000\right):\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y + z \cdot \frac{-1}{\frac{3}{t}}\right) - \frac{a}{b \cdot 3}\\ \end{array} \]
Alternative 9
Error16.1
Cost14409
\[\begin{array}{l} \mathbf{if}\;z \cdot t \leq -1 \cdot 10^{+240} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+107}\right):\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - t \cdot \frac{z}{3}\right) - \frac{a}{b \cdot 3}\\ \end{array} \]
Alternative 10
Error19.4
Cost14025
\[\begin{array}{l} t_1 := \frac{a}{b \cdot 3}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-105} \lor \neg \left(t_1 \leq 2 \cdot 10^{-113}\right):\\ \;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(2 \cdot \cos y\right)\\ \end{array} \]
Alternative 11
Error19.4
Cost13897
\[\begin{array}{l} t_1 := \frac{a}{b \cdot 3}\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-105} \lor \neg \left(t_1 \leq 2 \cdot 10^{-113}\right):\\ \;\;\;\;2 \cdot \sqrt{x} - t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{x} \cdot \left(2 \cdot \cos y\right)\\ \end{array} \]
Alternative 12
Error16.5
Cost13504
\[\cos y \cdot \left(2 \cdot \sqrt{x}\right) + a \cdot \frac{-0.3333333333333333}{b} \]
Alternative 13
Error24.5
Cost6976
\[2 \cdot \sqrt{x} - \frac{a}{b \cdot 3} \]
Alternative 14
Error33.4
Cost6857
\[\begin{array}{l} \mathbf{if}\;b \leq -4 \cdot 10^{+213} \lor \neg \left(b \leq 6.5 \cdot 10^{+146}\right):\\ \;\;\;\;2 \cdot \sqrt{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{a}{-3}}{b}\\ \end{array} \]
Alternative 15
Error35.7
Cost320
\[-0.3333333333333333 \cdot \frac{a}{b} \]
Alternative 16
Error35.7
Cost320
\[a \cdot \frac{-0.3333333333333333}{b} \]
Alternative 17
Error35.7
Cost320
\[\frac{a \cdot -0.3333333333333333}{b} \]
Alternative 18
Error35.6
Cost320
\[\frac{\frac{a}{-3}}{b} \]

Error

Reproduce?

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

  :herbie-target
  (if (< z -1.3793337487235141e+129) (- (* (* 2.0 (sqrt x)) (cos (- (/ 1.0 y) (/ (/ 0.3333333333333333 z) t)))) (/ (/ a 3.0) b)) (if (< z 3.516290613555987e+106) (- (* (* (sqrt x) 2.0) (cos (- y (* (/ t 3.0) z)))) (/ (/ a 3.0) b)) (- (* (cos (- y (/ (/ 0.3333333333333333 z) t))) (* 2.0 (sqrt x))) (/ (/ a b) 3.0))))

  (- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))