?

Average Accuracy: 68.0% → 74.8%
Time: 36.3s
Precision: binary64
Cost: 61257

?

\[\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]
\[\begin{array}{l} t_1 := \mathsf{fma}\left(t, z \cdot -0.3333333333333333, y\right)\\ t_2 := y - \frac{z \cdot t}{3}\\ t_3 := \mathsf{fma}\left(z \cdot -0.3333333333333333, t, \left(z \cdot t\right) \cdot 0.3333333333333333\right)\\ t_4 := \frac{a}{3 \cdot b}\\ \mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 5 \cdot 10^{+299}\right):\\ \;\;\;\;e^{\log \left(2 \cdot \sqrt{x}\right)} - t_4\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sqrt{x} \cdot \left(\cos t_1 \cdot \cos t_3 - \sin t_1 \cdot \sin t_3\right)\right) - t_4\\ \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
 (let* ((t_1 (fma t (* z -0.3333333333333333) y))
        (t_2 (- y (/ (* z t) 3.0)))
        (t_3 (fma (* z -0.3333333333333333) t (* (* z t) 0.3333333333333333)))
        (t_4 (/ a (* 3.0 b))))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 5e+299)))
     (- (exp (log (* 2.0 (sqrt x)))) t_4)
     (-
      (* 2.0 (* (sqrt x) (- (* (cos t_1) (cos t_3)) (* (sin t_1) (sin t_3)))))
      t_4))))
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 t_1 = fma(t, (z * -0.3333333333333333), y);
	double t_2 = y - ((z * t) / 3.0);
	double t_3 = fma((z * -0.3333333333333333), t, ((z * t) * 0.3333333333333333));
	double t_4 = a / (3.0 * b);
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 5e+299)) {
		tmp = exp(log((2.0 * sqrt(x)))) - t_4;
	} else {
		tmp = (2.0 * (sqrt(x) * ((cos(t_1) * cos(t_3)) - (sin(t_1) * sin(t_3))))) - t_4;
	}
	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)
	t_1 = fma(t, Float64(z * -0.3333333333333333), y)
	t_2 = Float64(y - Float64(Float64(z * t) / 3.0))
	t_3 = fma(Float64(z * -0.3333333333333333), t, Float64(Float64(z * t) * 0.3333333333333333))
	t_4 = Float64(a / Float64(3.0 * b))
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 5e+299))
		tmp = Float64(exp(log(Float64(2.0 * sqrt(x)))) - t_4);
	else
		tmp = Float64(Float64(2.0 * Float64(sqrt(x) * Float64(Float64(cos(t_1) * cos(t_3)) - Float64(sin(t_1) * sin(t_3))))) - t_4);
	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_] := Block[{t$95$1 = N[(t * N[(z * -0.3333333333333333), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z * -0.3333333333333333), $MachinePrecision] * t + N[(N[(z * t), $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a / N[(3.0 * b), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 5e+299]], $MachinePrecision]], N[(N[Exp[N[Log[N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - t$95$4), $MachinePrecision], N[(N[(2.0 * N[(N[Sqrt[x], $MachinePrecision] * N[(N[(N[Cos[t$95$1], $MachinePrecision] * N[Cos[t$95$3], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t$95$1], $MachinePrecision] * N[Sin[t$95$3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $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}
t_1 := \mathsf{fma}\left(t, z \cdot -0.3333333333333333, y\right)\\
t_2 := y - \frac{z \cdot t}{3}\\
t_3 := \mathsf{fma}\left(z \cdot -0.3333333333333333, t, \left(z \cdot t\right) \cdot 0.3333333333333333\right)\\
t_4 := \frac{a}{3 \cdot b}\\
\mathbf{if}\;t_2 \leq -\infty \lor \neg \left(t_2 \leq 5 \cdot 10^{+299}\right):\\
\;\;\;\;e^{\log \left(2 \cdot \sqrt{x}\right)} - t_4\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{x} \cdot \left(\cos t_1 \cdot \cos t_3 - \sin t_1 \cdot \sin t_3\right)\right) - t_4\\


\end{array}

Error?

Target

Original68.0%
Target70.5%
Herbie74.8%
\[\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 y (/.f64 (*.f64 z t) 3)) < -inf.0 or 5.0000000000000003e299 < (-.f64 y (/.f64 (*.f64 z t) 3))

    1. Initial program 5.0%

      \[\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]
    2. Taylor expanded in z around 0 45.2%

      \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \color{blue}{\cos y} - \frac{a}{b \cdot 3} \]
    3. Applied egg-rr34.4%

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

      [Start]45.2

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

      add-exp-log [=>]34.4

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

      associate-*l* [=>]34.4

      \[ e^{\log \color{blue}{\left(2 \cdot \left(\sqrt{x} \cdot \cos y\right)\right)}} - \frac{a}{b \cdot 3} \]
    4. Taylor expanded in y around 0 43.7%

      \[\leadsto e^{\color{blue}{\log \left(2 \cdot \sqrt{x}\right)}} - \frac{a}{b \cdot 3} \]

    if -inf.0 < (-.f64 y (/.f64 (*.f64 z t) 3)) < 5.0000000000000003e299

    1. Initial program 77.2%

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

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

      [Start]77.2

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

      associate-*l* [=>]77.2

      \[ \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 [=>]77.2

      \[ \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 [<=]77.2

      \[ \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) \]

      fma-neg [<=]77.2

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

      remove-double-neg [=>]77.2

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

      associate-*l/ [<=]77.2

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

      *-commutative [=>]77.2

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

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

      [Start]77.2

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

      *-un-lft-identity [=>]77.2

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

      add-sqr-sqrt [=>]45.5

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

      prod-diff [=>]45.5

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

      add-sqr-sqrt [<=]45.6

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

      fma-neg [<=]45.6

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

      *-un-lft-identity [<=]45.6

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

      cos-sum [=>]45.6

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

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

      [Start]79.4

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

      fma-neg [=>]79.4

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

      *-lft-identity [<=]79.4

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

      fma-neg [<=]79.4

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

      *-lft-identity [=>]79.4

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

      *-commutative [=>]79.4

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

      associate-*r* [<=]78.7

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

      *-commutative [=>]78.7

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

      associate-*r* [<=]79.3

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

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

Alternatives

Alternative 1
Accuracy67.2%
Cost13897
\[\begin{array}{l} t_1 := \frac{a}{3 \cdot b}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{-125} \lor \neg \left(t_1 \leq 5 \cdot 10^{-40}\right):\\ \;\;\;\;2 \cdot \sqrt{x} - t_1\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\sqrt{x} \cdot \cos y\right)\\ \end{array} \]
Alternative 2
Accuracy72.6%
Cost13504
\[\left(2 \cdot \sqrt{x}\right) \cdot \cos y - a \cdot \frac{0.3333333333333333}{b} \]
Alternative 3
Accuracy72.7%
Cost13504
\[\left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{a}{3 \cdot b} \]
Alternative 4
Accuracy59.8%
Cost6976
\[2 \cdot \sqrt{x} - 0.3333333333333333 \cdot \frac{a}{b} \]
Alternative 5
Accuracy59.9%
Cost6976
\[2 \cdot \sqrt{x} - \frac{a}{3 \cdot b} \]
Alternative 6
Accuracy43.0%
Cost6720
\[\frac{a}{\frac{b}{\sqrt[3]{-0.037037037037037035}}} \]
Alternative 7
Accuracy43.0%
Cost320
\[-0.3333333333333333 \cdot \frac{a}{b} \]
Alternative 8
Accuracy43.0%
Cost320
\[\frac{a \cdot -0.3333333333333333}{b} \]

Error

Reproduce?

herbie shell --seed 2023146 
(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))))