Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, K

Percentage Accurate: 70.7% → 77.1%
Time: 13.0s
Alternatives: 8
Speedup: N/A×

Specification

?
\[\begin{array}{l} \\ \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\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))))
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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((2.0d0 * sqrt(x)) * cos((y - ((z * t) / 3.0d0)))) - (a / (b * 3.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((2.0 * Math.sqrt(x)) * Math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
def code(x, y, z, t, a, b):
	return ((2.0 * math.sqrt(x)) * math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0))
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 tmp = code(x, y, z, t, a, b)
	tmp = ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
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]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 8 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 70.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\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))))
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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a, b)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((2.0d0 * sqrt(x)) * cos((y - ((z * t) / 3.0d0)))) - (a / (b * 3.0d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return ((2.0 * Math.sqrt(x)) * Math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
def code(x, y, z, t, a, b):
	return ((2.0 * math.sqrt(x)) * math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0))
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 tmp = code(x, y, z, t, a, b)
	tmp = ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
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]
\begin{array}{l}

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

Alternative 1: 77.1% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right)\\ t_2 := \left(t \cdot z\right) \cdot -0.3333333333333333\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+37}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}\\ \mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+150}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos t\_2 \cdot \cos y - \sin t\_2 \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{a}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))))
        (t_2 (* (* t z) -0.3333333333333333)))
   (if (<= t_1 2e+37)
     (/
      (fma
       -0.3333333333333333
       a
       (*
        2.0
        (*
         (*
          b
          (-
           (* (cos y) (sin (fma -0.3333333333333333 (* t z) (/ PI 2.0))))
           (* (sin y) (sin (* -0.3333333333333333 (* t z))))))
         (pow x 0.5))))
      b)
     (if (<= t_1 4e+150)
       (*
        (fma
         (* 2.0 (pow (pow x -1.0) 0.5))
         (- (* (cos t_2) (cos y)) (* (sin t_2) (sin y)))
         (* (/ (/ a b) x) -0.3333333333333333))
        x)
       (* -0.3333333333333333 (/ a b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)));
	double t_2 = (t * z) * -0.3333333333333333;
	double tmp;
	if (t_1 <= 2e+37) {
		tmp = fma(-0.3333333333333333, a, (2.0 * ((b * ((cos(y) * sin(fma(-0.3333333333333333, (t * z), (((double) M_PI) / 2.0)))) - (sin(y) * sin((-0.3333333333333333 * (t * z)))))) * pow(x, 0.5)))) / b;
	} else if (t_1 <= 4e+150) {
		tmp = fma((2.0 * pow(pow(x, -1.0), 0.5)), ((cos(t_2) * cos(y)) - (sin(t_2) * sin(y))), (((a / b) / x) * -0.3333333333333333)) * x;
	} else {
		tmp = -0.3333333333333333 * (a / b);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(2.0 * sqrt(x)) * cos(Float64(y - Float64(Float64(z * t) / 3.0))))
	t_2 = Float64(Float64(t * z) * -0.3333333333333333)
	tmp = 0.0
	if (t_1 <= 2e+37)
		tmp = Float64(fma(-0.3333333333333333, a, Float64(2.0 * Float64(Float64(b * Float64(Float64(cos(y) * sin(fma(-0.3333333333333333, Float64(t * z), Float64(pi / 2.0)))) - Float64(sin(y) * sin(Float64(-0.3333333333333333 * Float64(t * z)))))) * (x ^ 0.5)))) / b);
	elseif (t_1 <= 4e+150)
		tmp = Float64(fma(Float64(2.0 * ((x ^ -1.0) ^ 0.5)), Float64(Float64(cos(t_2) * cos(y)) - Float64(sin(t_2) * sin(y))), Float64(Float64(Float64(a / b) / x) * -0.3333333333333333)) * x);
	else
		tmp = Float64(-0.3333333333333333 * Float64(a / b));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * z), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+37], N[(N[(-0.3333333333333333 * a + N[(2.0 * N[(N[(b * N[(N[(N[Cos[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 4e+150], N[(N[(N[(2.0 * N[Power[N[Power[x, -1.0], $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[t$95$2], $MachinePrecision] * N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[t$95$2], $MachinePrecision] * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(a / b), $MachinePrecision] / x), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(-0.3333333333333333 * N[(a / b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right)\\
t_2 := \left(t \cdot z\right) \cdot -0.3333333333333333\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+37}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+150}:\\
\;\;\;\;\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos t\_2 \cdot \cos y - \sin t\_2 \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x\\

\mathbf{else}:\\
\;\;\;\;-0.3333333333333333 \cdot \frac{a}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64))))) < 1.99999999999999991e37

    1. Initial program 82.9%

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

      \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
    4. Step-by-step derivation
      1. Applied rewrites83.0%

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

        \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right)} \]
      3. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot \color{blue}{x} \]
        2. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x} \]
      5. Taylor expanded in b around 0

        \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{\color{blue}{b}} \]
      6. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{b} \]
      7. Applied rewrites82.0%

        \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{\color{blue}{b}} \]
      8. Step-by-step derivation
        1. lift-cos.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        2. lift-+.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        5. cos-sumN/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        6. lower--.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        8. lift-cos.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        9. sin-+PI/2-revN/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        10. lower-sin.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        11. lift-/.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        12. lift-PI.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\pi}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        13. lower-fma.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        14. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        15. lower-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        16. lift-sin.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        17. lower-sin.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        18. lift-*.f64N/A

          \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
        19. lift-*.f6483.3

          \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b} \]
      9. Applied rewrites83.3%

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

      if 1.99999999999999991e37 < (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64))))) < 3.99999999999999992e150

      1. Initial program 73.2%

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

        \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
      4. Step-by-step derivation
        1. Applied rewrites73.4%

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

          \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right)} \]
        3. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot \color{blue}{x} \]
          2. lower-*.f64N/A

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x} \]
        5. Step-by-step derivation
          1. lift-cos.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          2. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          3. lift-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3} + y\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          4. cos-sumN/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          5. lower--.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          6. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          7. lower-cos.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          8. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          9. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          10. lift-cos.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          11. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          12. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          13. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          14. lift-sin.f64N/A

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot \frac{-1}{3}\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
          15. lift-sin.f6475.0

            \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\left(t \cdot z\right) \cdot -0.3333333333333333\right) \cdot \cos y - \sin \left(\left(t \cdot z\right) \cdot -0.3333333333333333\right) \cdot \sin y, \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x \]
        6. Applied rewrites75.0%

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

        if 3.99999999999999992e150 < (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64)))))

        1. Initial program 0.0%

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

          \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{a}{b}} \]
        4. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{-1}{3} \cdot \color{blue}{\frac{a}{b}} \]
          2. lower-/.f6457.0

            \[\leadsto -0.3333333333333333 \cdot \frac{a}{\color{blue}{b}} \]
        5. Applied rewrites57.0%

          \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{a}{b}} \]
      5. Recombined 3 regimes into one program.
      6. Add Preprocessing

      Alternative 2: 77.1% accurate, N/A× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right)\\ \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+35}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+142}:\\ \;\;\;\;\mathsf{fma}\left(2 \cdot \frac{1}{{x}^{0.5}}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{a}{b}\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0))))))
         (if (<= t_1 5e+35)
           (/
            (fma
             -0.3333333333333333
             a
             (*
              2.0
              (*
               (*
                b
                (-
                 (* (cos y) (sin (fma -0.3333333333333333 (* t z) (/ PI 2.0))))
                 (* (sin y) (sin (* -0.3333333333333333 (* t z))))))
               (pow x 0.5))))
            b)
           (if (<= t_1 5e+142)
             (*
              (fma
               (* 2.0 (/ 1.0 (pow x 0.5)))
               (cos (fma (* t z) -0.3333333333333333 y))
               (* (/ (/ a b) x) -0.3333333333333333))
              x)
             (* -0.3333333333333333 (/ a b))))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = (2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)));
      	double tmp;
      	if (t_1 <= 5e+35) {
      		tmp = fma(-0.3333333333333333, a, (2.0 * ((b * ((cos(y) * sin(fma(-0.3333333333333333, (t * z), (((double) M_PI) / 2.0)))) - (sin(y) * sin((-0.3333333333333333 * (t * z)))))) * pow(x, 0.5)))) / b;
      	} else if (t_1 <= 5e+142) {
      		tmp = fma((2.0 * (1.0 / pow(x, 0.5))), cos(fma((t * z), -0.3333333333333333, y)), (((a / b) / x) * -0.3333333333333333)) * x;
      	} else {
      		tmp = -0.3333333333333333 * (a / b);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = Float64(Float64(2.0 * sqrt(x)) * cos(Float64(y - Float64(Float64(z * t) / 3.0))))
      	tmp = 0.0
      	if (t_1 <= 5e+35)
      		tmp = Float64(fma(-0.3333333333333333, a, Float64(2.0 * Float64(Float64(b * Float64(Float64(cos(y) * sin(fma(-0.3333333333333333, Float64(t * z), Float64(pi / 2.0)))) - Float64(sin(y) * sin(Float64(-0.3333333333333333 * Float64(t * z)))))) * (x ^ 0.5)))) / b);
      	elseif (t_1 <= 5e+142)
      		tmp = Float64(fma(Float64(2.0 * Float64(1.0 / (x ^ 0.5))), cos(fma(Float64(t * z), -0.3333333333333333, y)), Float64(Float64(Float64(a / b) / x) * -0.3333333333333333)) * x);
      	else
      		tmp = Float64(-0.3333333333333333 * Float64(a / b));
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+35], N[(N[(-0.3333333333333333 * a + N[(2.0 * N[(N[(b * N[(N[(N[Cos[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 5e+142], N[(N[(N[(2.0 * N[(1.0 / N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Cos[N[(N[(t * z), $MachinePrecision] * -0.3333333333333333 + y), $MachinePrecision]], $MachinePrecision] + N[(N[(N[(a / b), $MachinePrecision] / x), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(-0.3333333333333333 * N[(a / b), $MachinePrecision]), $MachinePrecision]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right)\\
      \mathbf{if}\;t\_1 \leq 5 \cdot 10^{+35}:\\
      \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+142}:\\
      \;\;\;\;\mathsf{fma}\left(2 \cdot \frac{1}{{x}^{0.5}}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;-0.3333333333333333 \cdot \frac{a}{b}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64))))) < 5.00000000000000021e35

        1. Initial program 83.3%

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

          \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
        4. Step-by-step derivation
          1. Applied rewrites83.4%

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

            \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right)} \]
          3. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot \color{blue}{x} \]
            2. lower-*.f64N/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x} \]
          5. Taylor expanded in b around 0

            \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{\color{blue}{b}} \]
          6. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{b} \]
          7. Applied rewrites82.4%

            \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{\color{blue}{b}} \]
          8. Step-by-step derivation
            1. lift-cos.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            2. lift-+.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            4. lift-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            5. cos-sumN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            6. lower--.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            8. lift-cos.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            9. sin-+PI/2-revN/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            10. lower-sin.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            11. lift-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            12. lift-PI.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\pi}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            14. lift-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            15. lower-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            16. lift-sin.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            17. lower-sin.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            18. lift-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
            19. lift-*.f6483.7

              \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b} \]
          9. Applied rewrites83.7%

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

          if 5.00000000000000021e35 < (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64))))) < 5.0000000000000001e142

          1. Initial program 76.0%

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

            \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
          4. Step-by-step derivation
            1. Applied rewrites75.8%

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

              \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right)} \]
            3. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot \color{blue}{x} \]
              2. lower-*.f64N/A

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x} \]
            5. Step-by-step derivation
              1. lift-pow.f64N/A

                \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              2. lift-pow.f64N/A

                \[\leadsto \mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{\frac{1}{2}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              3. pow1/2N/A

                \[\leadsto \mathsf{fma}\left(2 \cdot \sqrt{{x}^{-1}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              4. inv-powN/A

                \[\leadsto \mathsf{fma}\left(2 \cdot \sqrt{\frac{1}{x}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              5. sqrt-divN/A

                \[\leadsto \mathsf{fma}\left(2 \cdot \frac{\sqrt{1}}{\sqrt{x}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              6. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(2 \cdot \frac{1}{\sqrt{x}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              7. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(2 \cdot \frac{1}{\sqrt{x}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              8. pow1/2N/A

                \[\leadsto \mathsf{fma}\left(2 \cdot \frac{1}{{x}^{\frac{1}{2}}}, \cos \left(\mathsf{fma}\left(t \cdot z, \frac{-1}{3}, y\right)\right), \frac{\frac{a}{b}}{x} \cdot \frac{-1}{3}\right) \cdot x \]
              9. lower-pow.f6476.3

                \[\leadsto \mathsf{fma}\left(2 \cdot \frac{1}{{x}^{0.5}}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x \]
            6. Applied rewrites76.3%

              \[\leadsto \mathsf{fma}\left(2 \cdot \frac{1}{{x}^{0.5}}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x \]

            if 5.0000000000000001e142 < (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64)))))

            1. Initial program 0.1%

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

              \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{a}{b}} \]
            4. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto \frac{-1}{3} \cdot \color{blue}{\frac{a}{b}} \]
              2. lower-/.f6453.2

                \[\leadsto -0.3333333333333333 \cdot \frac{a}{\color{blue}{b}} \]
            5. Applied rewrites53.2%

              \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{a}{b}} \]
          5. Recombined 3 regimes into one program.
          6. Add Preprocessing

          Alternative 3: 77.1% accurate, N/A× speedup?

          \[\begin{array}{l} \\ \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{\frac{a}{b}}{3} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (- (* (* 2.0 (sqrt x)) (cos y)) (/ (/ 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)) - ((a / b) / 3.0);
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b)
          use fmin_fmax_functions
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              code = ((2.0d0 * sqrt(x)) * cos(y)) - ((a / b) / 3.0d0)
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	return ((2.0 * Math.sqrt(x)) * Math.cos(y)) - ((a / b) / 3.0);
          }
          
          def code(x, y, z, t, a, b):
          	return ((2.0 * math.sqrt(x)) * math.cos(y)) - ((a / b) / 3.0)
          
          function code(x, y, z, t, a, b)
          	return Float64(Float64(Float64(2.0 * sqrt(x)) * cos(y)) - Float64(Float64(a / b) / 3.0))
          end
          
          function tmp = code(x, y, z, t, a, b)
          	tmp = ((2.0 * sqrt(x)) * cos(y)) - ((a / b) / 3.0);
          end
          
          code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(N[(a / b), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{\frac{a}{b}}{3}
          \end{array}
          
          Derivation
          1. Initial program 68.3%

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

            \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
          4. Step-by-step derivation
            1. Applied rewrites77.0%

              \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
            2. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{a}{\color{blue}{b \cdot 3}} \]
              2. lift-/.f64N/A

                \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \color{blue}{\frac{a}{b \cdot 3}} \]
              3. associate-/r*N/A

                \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \color{blue}{\frac{\frac{a}{b}}{3}} \]
              4. lower-/.f64N/A

                \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \color{blue}{\frac{\frac{a}{b}}{3}} \]
              5. lift-/.f6477.1

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

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

            Alternative 4: 76.0% accurate, N/A× speedup?

            \[\begin{array}{l} \\ \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{a}{b \cdot 3} \end{array} \]
            (FPCore (x y z t a b)
             :precision binary64
             (- (* (* 2.0 (sqrt x)) (cos y)) (/ 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)) - (a / (b * 3.0));
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z, t, a, b)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8), intent (in) :: b
                code = ((2.0d0 * sqrt(x)) * cos(y)) - (a / (b * 3.0d0))
            end function
            
            public static double code(double x, double y, double z, double t, double a, double b) {
            	return ((2.0 * Math.sqrt(x)) * Math.cos(y)) - (a / (b * 3.0));
            }
            
            def code(x, y, z, t, a, b):
            	return ((2.0 * math.sqrt(x)) * math.cos(y)) - (a / (b * 3.0))
            
            function code(x, y, z, t, a, b)
            	return Float64(Float64(Float64(2.0 * sqrt(x)) * cos(y)) - Float64(a / Float64(b * 3.0)))
            end
            
            function tmp = code(x, y, z, t, a, b)
            	tmp = ((2.0 * sqrt(x)) * cos(y)) - (a / (b * 3.0));
            end
            
            code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
            
            \begin{array}{l}
            
            \\
            \left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{a}{b \cdot 3}
            \end{array}
            
            Derivation
            1. Initial program 68.3%

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

              \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
            4. Step-by-step derivation
              1. Applied rewrites77.0%

                \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
              2. Add Preprocessing

              Alternative 5: 75.2% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{a}{b \cdot 3}\\ \mathbf{if}\;\cos \left(y - \frac{z \cdot t}{3}\right) \leq 0.9999999999998:\\ \;\;\;\;\left(2 \cdot e^{\log x \cdot 0.5}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\pi \cdot 0.5\right) - t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (/ a (* b 3.0))))
                 (if (<= (cos (- y (/ (* z t) 3.0))) 0.9999999999998)
                   (-
                    (*
                     (* 2.0 (exp (* (log x) 0.5)))
                     (+ (* (cos y) (cos (* z (/ t 3.0)))) (* (sin y) (sin (/ (* t z) 3.0)))))
                    t_1)
                   (- (* (* 2.0 (sqrt x)) (sin (* PI 0.5))) t_1))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = a / (b * 3.0);
              	double tmp;
              	if (cos((y - ((z * t) / 3.0))) <= 0.9999999999998) {
              		tmp = ((2.0 * exp((log(x) * 0.5))) * ((cos(y) * cos((z * (t / 3.0)))) + (sin(y) * sin(((t * z) / 3.0))))) - t_1;
              	} else {
              		tmp = ((2.0 * sqrt(x)) * sin((((double) M_PI) * 0.5))) - t_1;
              	}
              	return tmp;
              }
              
              public static double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = a / (b * 3.0);
              	double tmp;
              	if (Math.cos((y - ((z * t) / 3.0))) <= 0.9999999999998) {
              		tmp = ((2.0 * Math.exp((Math.log(x) * 0.5))) * ((Math.cos(y) * Math.cos((z * (t / 3.0)))) + (Math.sin(y) * Math.sin(((t * z) / 3.0))))) - t_1;
              	} else {
              		tmp = ((2.0 * Math.sqrt(x)) * Math.sin((Math.PI * 0.5))) - t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b):
              	t_1 = a / (b * 3.0)
              	tmp = 0
              	if math.cos((y - ((z * t) / 3.0))) <= 0.9999999999998:
              		tmp = ((2.0 * math.exp((math.log(x) * 0.5))) * ((math.cos(y) * math.cos((z * (t / 3.0)))) + (math.sin(y) * math.sin(((t * z) / 3.0))))) - t_1
              	else:
              		tmp = ((2.0 * math.sqrt(x)) * math.sin((math.pi * 0.5))) - t_1
              	return tmp
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(a / Float64(b * 3.0))
              	tmp = 0.0
              	if (cos(Float64(y - Float64(Float64(z * t) / 3.0))) <= 0.9999999999998)
              		tmp = Float64(Float64(Float64(2.0 * exp(Float64(log(x) * 0.5))) * Float64(Float64(cos(y) * cos(Float64(z * Float64(t / 3.0)))) + Float64(sin(y) * sin(Float64(Float64(t * z) / 3.0))))) - t_1);
              	else
              		tmp = Float64(Float64(Float64(2.0 * sqrt(x)) * sin(Float64(pi * 0.5))) - t_1);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b)
              	t_1 = a / (b * 3.0);
              	tmp = 0.0;
              	if (cos((y - ((z * t) / 3.0))) <= 0.9999999999998)
              		tmp = ((2.0 * exp((log(x) * 0.5))) * ((cos(y) * cos((z * (t / 3.0)))) + (sin(y) * sin(((t * z) / 3.0))))) - t_1;
              	else
              		tmp = ((2.0 * sqrt(x)) * sin((pi * 0.5))) - t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 0.9999999999998], N[(N[(N[(2.0 * N[Exp[N[(N[Log[x], $MachinePrecision] * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[y], $MachinePrecision] * N[Cos[N[(z * N[(t / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + N[(N[Sin[y], $MachinePrecision] * N[Sin[N[(N[(t * z), $MachinePrecision] / 3.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Sin[N[(Pi * 0.5), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \frac{a}{b \cdot 3}\\
              \mathbf{if}\;\cos \left(y - \frac{z \cdot t}{3}\right) \leq 0.9999999999998:\\
              \;\;\;\;\left(2 \cdot e^{\log x \cdot 0.5}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - t\_1\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\pi \cdot 0.5\right) - t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64)))) < 0.999999999999800049

                1. Initial program 72.1%

                  \[\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-cos.f64N/A

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

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{\left(y - \frac{z \cdot t}{3}\right)} - \frac{a}{b \cdot 3} \]
                  3. lift-*.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{\color{blue}{z \cdot t}}{3}\right) - \frac{a}{b \cdot 3} \]
                  4. lift-/.f64N/A

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

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\cos y \cdot \cos \left(\frac{z \cdot t}{3}\right) + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right)} - \frac{a}{b \cdot 3} \]
                  6. lower-+.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\cos y \cdot \cos \left(\frac{z \cdot t}{3}\right) + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right)} - \frac{a}{b \cdot 3} \]
                  7. lower-*.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\cos y \cdot \cos \left(\frac{z \cdot t}{3}\right)} + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  8. lower-cos.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\color{blue}{\cos y} \cdot \cos \left(\frac{z \cdot t}{3}\right) + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  9. lower-cos.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \color{blue}{\cos \left(\frac{z \cdot t}{3}\right)} + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  10. associate-/l*N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \color{blue}{\left(z \cdot \frac{t}{3}\right)} + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  11. lower-*.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \color{blue}{\left(z \cdot \frac{t}{3}\right)} + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  12. lower-/.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \color{blue}{\frac{t}{3}}\right) + \sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  13. lower-*.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \color{blue}{\sin y \cdot \sin \left(\frac{z \cdot t}{3}\right)}\right) - \frac{a}{b \cdot 3} \]
                  14. lower-sin.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \color{blue}{\sin y} \cdot \sin \left(\frac{z \cdot t}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  15. lower-sin.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \color{blue}{\sin \left(\frac{z \cdot t}{3}\right)}\right) - \frac{a}{b \cdot 3} \]
                  16. associate-/l*N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \color{blue}{\left(z \cdot \frac{t}{3}\right)}\right) - \frac{a}{b \cdot 3} \]
                  17. lower-*.f64N/A

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

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

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \color{blue}{\left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(z \cdot \frac{t}{3}\right)\right)} - \frac{a}{b \cdot 3} \]
                5. Step-by-step derivation
                  1. lift-*.f64N/A

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

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(z \cdot \color{blue}{\frac{t}{3}}\right)\right) - \frac{a}{b \cdot 3} \]
                  3. associate-*r/N/A

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

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{\color{blue}{t \cdot z}}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  5. lower-/.f64N/A

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

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

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \color{blue}{\left(\frac{t \cdot z}{3}\right)}\right) - \frac{a}{b \cdot 3} \]
                7. Step-by-step derivation
                  1. lift-sqrt.f64N/A

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

                    \[\leadsto \left(2 \cdot \color{blue}{{x}^{\frac{1}{2}}}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  3. pow-to-expN/A

                    \[\leadsto \left(2 \cdot \color{blue}{e^{\log x \cdot \frac{1}{2}}}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  4. lower-exp.f64N/A

                    \[\leadsto \left(2 \cdot \color{blue}{e^{\log x \cdot \frac{1}{2}}}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  5. lower-*.f64N/A

                    \[\leadsto \left(2 \cdot e^{\color{blue}{\log x \cdot \frac{1}{2}}}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                  6. lower-log.f6472.0

                    \[\leadsto \left(2 \cdot e^{\color{blue}{\log x} \cdot 0.5}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - \frac{a}{b \cdot 3} \]
                8. Applied rewrites72.0%

                  \[\leadsto \left(2 \cdot \color{blue}{e^{\log x \cdot 0.5}}\right) \cdot \left(\cos y \cdot \cos \left(z \cdot \frac{t}{3}\right) + \sin y \cdot \sin \left(\frac{t \cdot z}{3}\right)\right) - \frac{a}{b \cdot 3} \]

                if 0.999999999999800049 < (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64))))

                1. Initial program 62.1%

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

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \color{blue}{\cos \left(\mathsf{neg}\left(\frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)} - \frac{a}{b \cdot 3} \]
                4. Step-by-step derivation
                  1. sin-+PI/2-revN/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{1}{3} \cdot \left(t \cdot z\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \frac{a}{b \cdot 3} \]
                  2. lower-sin.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{1}{3} \cdot \left(t \cdot z\right)\right)\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \frac{a}{b \cdot 3} \]
                  3. distribute-lft-neg-inN/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\left(\mathsf{neg}\left(\frac{1}{3}\right)\right) \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \frac{a}{b \cdot 3} \]
                  4. metadata-evalN/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \frac{a}{b \cdot 3} \]
                  5. associate-*r*N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\left(\frac{-1}{3} \cdot t\right) \cdot z + \frac{\mathsf{PI}\left(\right)}{2}\right) - \frac{a}{b \cdot 3} \]
                  6. lower-fma.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3} \cdot t, z, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \frac{a}{b \cdot 3} \]
                  7. lower-*.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3} \cdot t, z, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \frac{a}{b \cdot 3} \]
                  8. lower-/.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3} \cdot t, z, \frac{\mathsf{PI}\left(\right)}{2}\right)\right) - \frac{a}{b \cdot 3} \]
                  9. lower-PI.f6462.1

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333 \cdot t, z, \frac{\pi}{2}\right)\right) - \frac{a}{b \cdot 3} \]
                5. Applied rewrites62.1%

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \color{blue}{\sin \left(\mathsf{fma}\left(-0.3333333333333333 \cdot t, z, \frac{\pi}{2}\right)\right)} - \frac{a}{b \cdot 3} \]
                6. Taylor expanded in z around 0

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\frac{1}{2} \cdot \mathsf{PI}\left(\right)\right) - \frac{a}{b \cdot 3} \]
                7. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{1}{2}\right) - \frac{a}{b \cdot 3} \]
                  2. lower-*.f64N/A

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\mathsf{PI}\left(\right) \cdot \frac{1}{2}\right) - \frac{a}{b \cdot 3} \]
                  3. lift-PI.f6485.2

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\pi \cdot 0.5\right) - \frac{a}{b \cdot 3} \]
                8. Applied rewrites85.2%

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \sin \left(\pi \cdot 0.5\right) - \frac{a}{b \cdot 3} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 6: 73.9% accurate, N/A× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) \leq 4 \cdot 10^{+150}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{a}{b}\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (if (<= (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) 4e+150)
                 (/
                  (fma
                   -0.3333333333333333
                   a
                   (*
                    2.0
                    (*
                     (*
                      b
                      (-
                       (* (cos y) (sin (fma -0.3333333333333333 (* t z) (/ PI 2.0))))
                       (* (sin y) (sin (* -0.3333333333333333 (* t z))))))
                     (pow x 0.5))))
                  b)
                 (* -0.3333333333333333 (/ a b))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double tmp;
              	if (((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) <= 4e+150) {
              		tmp = fma(-0.3333333333333333, a, (2.0 * ((b * ((cos(y) * sin(fma(-0.3333333333333333, (t * z), (((double) M_PI) / 2.0)))) - (sin(y) * sin((-0.3333333333333333 * (t * z)))))) * pow(x, 0.5)))) / b;
              	} else {
              		tmp = -0.3333333333333333 * (a / b);
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b)
              	tmp = 0.0
              	if (Float64(Float64(2.0 * sqrt(x)) * cos(Float64(y - Float64(Float64(z * t) / 3.0)))) <= 4e+150)
              		tmp = Float64(fma(-0.3333333333333333, a, Float64(2.0 * Float64(Float64(b * Float64(Float64(cos(y) * sin(fma(-0.3333333333333333, Float64(t * z), Float64(pi / 2.0)))) - Float64(sin(y) * sin(Float64(-0.3333333333333333 * Float64(t * z)))))) * (x ^ 0.5)))) / b);
              	else
              		tmp = Float64(-0.3333333333333333 * Float64(a / b));
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 4e+150], N[(N[(-0.3333333333333333 * a + N[(2.0 * N[(N[(b * N[(N[(N[Cos[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(-0.3333333333333333 * N[(a / b), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) \leq 4 \cdot 10^{+150}:\\
              \;\;\;\;\frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}\\
              
              \mathbf{else}:\\
              \;\;\;\;-0.3333333333333333 \cdot \frac{a}{b}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64))))) < 3.99999999999999992e150

                1. Initial program 80.2%

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

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
                4. Step-by-step derivation
                  1. Applied rewrites80.3%

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

                    \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot \color{blue}{x} \]
                    2. lower-*.f64N/A

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x} \]
                  5. Taylor expanded in b around 0

                    \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{\color{blue}{b}} \]
                  6. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{b} \]
                  7. Applied rewrites76.7%

                    \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{\color{blue}{b}} \]
                  8. Step-by-step derivation
                    1. lift-cos.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    2. lift-+.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    5. cos-sumN/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    6. lower--.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    8. lift-cos.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    9. sin-+PI/2-revN/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    10. lower-sin.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    11. lift-/.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    12. lift-PI.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\pi}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    13. lower-fma.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    14. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    15. lower-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    16. lift-sin.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    17. lower-sin.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    18. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    19. lift-*.f6477.9

                      \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b} \]
                  9. Applied rewrites77.9%

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

                  if 3.99999999999999992e150 < (*.f64 (*.f64 #s(literal 2 binary64) (sqrt.f64 x)) (cos.f64 (-.f64 y (/.f64 (*.f64 z t) #s(literal 3 binary64)))))

                  1. Initial program 0.0%

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

                    \[\leadsto \color{blue}{\frac{-1}{3} \cdot \frac{a}{b}} \]
                  4. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{-1}{3} \cdot \color{blue}{\frac{a}{b}} \]
                    2. lower-/.f6457.0

                      \[\leadsto -0.3333333333333333 \cdot \frac{a}{\color{blue}{b}} \]
                  5. Applied rewrites57.0%

                    \[\leadsto \color{blue}{-0.3333333333333333 \cdot \frac{a}{b}} \]
                5. Recombined 2 regimes into one program.
                6. Add Preprocessing

                Alternative 7: 67.7% accurate, N/A× speedup?

                \[\begin{array}{l} \\ \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b} \end{array} \]
                (FPCore (x y z t a b)
                 :precision binary64
                 (/
                  (fma
                   -0.3333333333333333
                   a
                   (*
                    2.0
                    (*
                     (*
                      b
                      (-
                       (* (cos y) (sin (fma -0.3333333333333333 (* t z) (/ PI 2.0))))
                       (* (sin y) (sin (* -0.3333333333333333 (* t z))))))
                     (pow x 0.5))))
                  b))
                double code(double x, double y, double z, double t, double a, double b) {
                	return fma(-0.3333333333333333, a, (2.0 * ((b * ((cos(y) * sin(fma(-0.3333333333333333, (t * z), (((double) M_PI) / 2.0)))) - (sin(y) * sin((-0.3333333333333333 * (t * z)))))) * pow(x, 0.5)))) / b;
                }
                
                function code(x, y, z, t, a, b)
                	return Float64(fma(-0.3333333333333333, a, Float64(2.0 * Float64(Float64(b * Float64(Float64(cos(y) * sin(fma(-0.3333333333333333, Float64(t * z), Float64(pi / 2.0)))) - Float64(sin(y) * sin(Float64(-0.3333333333333333 * Float64(t * z)))))) * (x ^ 0.5)))) / b)
                end
                
                code[x_, y_, z_, t_, a_, b_] := N[(N[(-0.3333333333333333 * a + N[(2.0 * N[(N[(b * N[(N[(N[Cos[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision] + N[(Pi / 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(N[Sin[y], $MachinePrecision] * N[Sin[N[(-0.3333333333333333 * N[(t * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}
                \end{array}
                
                Derivation
                1. Initial program 68.3%

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

                  \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
                4. Step-by-step derivation
                  1. Applied rewrites77.0%

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

                    \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right)} \]
                  3. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot \color{blue}{x} \]
                    2. lower-*.f64N/A

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x} \]
                  5. Taylor expanded in b around 0

                    \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{\color{blue}{b}} \]
                  6. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{b} \]
                  7. Applied rewrites65.3%

                    \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{\color{blue}{b}} \]
                  8. Step-by-step derivation
                    1. lift-cos.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    2. lift-+.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    5. cos-sumN/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    6. lower--.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    8. lift-cos.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \cos \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    9. sin-+PI/2-revN/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    10. lower-sin.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    11. lift-/.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\mathsf{PI}\left(\right)}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    12. lift-PI.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right) + \frac{\pi}{2}\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    13. lower-fma.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    14. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    15. lower-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    16. lift-sin.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    17. lower-sin.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    18. lift-*.f64N/A

                      \[\leadsto \frac{\mathsf{fma}\left(\frac{-1}{3}, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(\frac{-1}{3}, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(\frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{\frac{1}{2}}\right)\right)}{b} \]
                    19. lift-*.f6466.4

                      \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b} \]
                  9. Applied rewrites66.4%

                    \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \left(\cos y \cdot \sin \left(\mathsf{fma}\left(-0.3333333333333333, t \cdot z, \frac{\pi}{2}\right)\right) - \sin y \cdot \sin \left(-0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b} \]
                  10. Add Preprocessing

                  Alternative 8: 67.3% accurate, N/A× speedup?

                  \[\begin{array}{l} \\ \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (/
                    (fma
                     -0.3333333333333333
                     a
                     (* 2.0 (* (* b (cos (+ y (* -0.3333333333333333 (* t z))))) (pow x 0.5))))
                    b))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	return fma(-0.3333333333333333, a, (2.0 * ((b * cos((y + (-0.3333333333333333 * (t * z))))) * pow(x, 0.5)))) / b;
                  }
                  
                  function code(x, y, z, t, a, b)
                  	return Float64(fma(-0.3333333333333333, a, Float64(2.0 * Float64(Float64(b * cos(Float64(y + Float64(-0.3333333333333333 * Float64(t * z))))) * (x ^ 0.5)))) / b)
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := N[(N[(-0.3333333333333333 * a + N[(2.0 * N[(N[(b * N[Cos[N[(y + N[(-0.3333333333333333 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[Power[x, 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{b}
                  \end{array}
                  
                  Derivation
                  1. Initial program 68.3%

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

                    \[\leadsto \left(2 \cdot \sqrt{x}\right) \cdot \cos \color{blue}{y} - \frac{a}{b \cdot 3} \]
                  4. Step-by-step derivation
                    1. Applied rewrites77.0%

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

                      \[\leadsto \color{blue}{x \cdot \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right)} \]
                    3. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \left(\frac{-1}{3} \cdot \frac{a}{b \cdot x} + 2 \cdot \left(\sqrt{\frac{1}{x}} \cdot \cos \left(y - \frac{1}{3} \cdot \left(t \cdot z\right)\right)\right)\right) \cdot \color{blue}{x} \]
                      2. lower-*.f64N/A

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(2 \cdot {\left({x}^{-1}\right)}^{0.5}, \cos \left(\mathsf{fma}\left(t \cdot z, -0.3333333333333333, y\right)\right), \frac{\frac{a}{b}}{x} \cdot -0.3333333333333333\right) \cdot x} \]
                    5. Taylor expanded in b around 0

                      \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{\color{blue}{b}} \]
                    6. Step-by-step derivation
                      1. lower-/.f64N/A

                        \[\leadsto \frac{\frac{-1}{3} \cdot a + 2 \cdot \left(\left(b \cdot \cos \left(y + \frac{-1}{3} \cdot \left(t \cdot z\right)\right)\right) \cdot \sqrt{x}\right)}{b} \]
                    7. Applied rewrites65.3%

                      \[\leadsto \frac{\mathsf{fma}\left(-0.3333333333333333, a, 2 \cdot \left(\left(b \cdot \cos \left(y + -0.3333333333333333 \cdot \left(t \cdot z\right)\right)\right) \cdot {x}^{0.5}\right)\right)}{\color{blue}{b}} \]
                    8. Add Preprocessing

                    Reproduce

                    ?
                    herbie shell --seed 2025065 
                    (FPCore (x y z t a b)
                      :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, K"
                      :precision binary64
                    
                      :alt
                      (! :herbie-platform default (if (< z -1379333748723514100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (* 2 (sqrt x)) (cos (- (/ 1 y) (/ (/ 3333333333333333/10000000000000000 z) t)))) (/ (/ a 3) b)) (if (< z 35162906135559870000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (* (sqrt x) 2) (cos (- y (* (/ t 3) z)))) (/ (/ a 3) b)) (- (* (cos (- y (/ (/ 3333333333333333/10000000000000000 z) t))) (* 2 (sqrt x))) (/ (/ a b) 3)))))
                    
                      (- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))