Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 97.3% → 99.5%
Time: 12.0s
Alternatives: 14
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
    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
    code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\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 14 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: 97.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
    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
    code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}

Alternative 1: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + a \cdot \frac{y - z}{-1 - \left(t - z\right)} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ x (* a (/ (- y z) (- -1.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
	return x + (a * ((y - z) / (-1.0 - (t - z))));
}
real(8) function code(x, y, z, t, a)
    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
    code = x + (a * ((y - z) / ((-1.0d0) - (t - z))))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (a * ((y - z) / (-1.0 - (t - z))));
}
def code(x, y, z, t, a):
	return x + (a * ((y - z) / (-1.0 - (t - z))))
function code(x, y, z, t, a)
	return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 - Float64(t - z)))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (a * ((y - z) / (-1.0 - (t - z))));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + a \cdot \frac{y - z}{-1 - \left(t - z\right)}
\end{array}
Derivation
  1. Initial program 97.0%

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
  2. Step-by-step derivation
    1. associate-/r/99.9%

      \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
  3. Simplified99.9%

    \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
  4. Add Preprocessing
  5. Final simplification99.9%

    \[\leadsto x + a \cdot \frac{y - z}{-1 - \left(t - z\right)} \]
  6. Add Preprocessing

Alternative 2: 71.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y \cdot a}{t}\\ \mathbf{if}\;t \leq -3.7 \cdot 10^{+205}:\\ \;\;\;\;x + a \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -3.25:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-119}:\\ \;\;\;\;x - a \cdot \frac{z}{z + -1}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-18}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (* y a) t))))
   (if (<= t -3.7e+205)
     (+ x (* a (/ z t)))
     (if (<= t -3.25)
       t_1
       (if (<= t 5e-119)
         (- x (* a (/ z (+ z -1.0))))
         (if (<= t 2.25e-18) (- x (* y a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((y * a) / t);
	double tmp;
	if (t <= -3.7e+205) {
		tmp = x + (a * (z / t));
	} else if (t <= -3.25) {
		tmp = t_1;
	} else if (t <= 5e-119) {
		tmp = x - (a * (z / (z + -1.0)));
	} else if (t <= 2.25e-18) {
		tmp = x - (y * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: t_1
    real(8) :: tmp
    t_1 = x - ((y * a) / t)
    if (t <= (-3.7d+205)) then
        tmp = x + (a * (z / t))
    else if (t <= (-3.25d0)) then
        tmp = t_1
    else if (t <= 5d-119) then
        tmp = x - (a * (z / (z + (-1.0d0))))
    else if (t <= 2.25d-18) then
        tmp = x - (y * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((y * a) / t);
	double tmp;
	if (t <= -3.7e+205) {
		tmp = x + (a * (z / t));
	} else if (t <= -3.25) {
		tmp = t_1;
	} else if (t <= 5e-119) {
		tmp = x - (a * (z / (z + -1.0)));
	} else if (t <= 2.25e-18) {
		tmp = x - (y * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - ((y * a) / t)
	tmp = 0
	if t <= -3.7e+205:
		tmp = x + (a * (z / t))
	elif t <= -3.25:
		tmp = t_1
	elif t <= 5e-119:
		tmp = x - (a * (z / (z + -1.0)))
	elif t <= 2.25e-18:
		tmp = x - (y * a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(y * a) / t))
	tmp = 0.0
	if (t <= -3.7e+205)
		tmp = Float64(x + Float64(a * Float64(z / t)));
	elseif (t <= -3.25)
		tmp = t_1;
	elseif (t <= 5e-119)
		tmp = Float64(x - Float64(a * Float64(z / Float64(z + -1.0))));
	elseif (t <= 2.25e-18)
		tmp = Float64(x - Float64(y * a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - ((y * a) / t);
	tmp = 0.0;
	if (t <= -3.7e+205)
		tmp = x + (a * (z / t));
	elseif (t <= -3.25)
		tmp = t_1;
	elseif (t <= 5e-119)
		tmp = x - (a * (z / (z + -1.0)));
	elseif (t <= 2.25e-18)
		tmp = x - (y * a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+205], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.25], t$95$1, If[LessEqual[t, 5e-119], N[(x - N[(a * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e-18], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y \cdot a}{t}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+205}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\

\mathbf{elif}\;t \leq -3.25:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 5 \cdot 10^{-119}:\\
\;\;\;\;x - a \cdot \frac{z}{z + -1}\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{-18}:\\
\;\;\;\;x - y \cdot a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -3.69999999999999981e205

    1. Initial program 93.6%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.8%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 99.8%

      \[\leadsto x - \color{blue}{\frac{y - z}{t}} \cdot a \]
    6. Taylor expanded in y around 0 78.4%

      \[\leadsto x - \frac{\color{blue}{-1 \cdot z}}{t} \cdot a \]
    7. Step-by-step derivation
      1. neg-mul-178.4%

        \[\leadsto x - \frac{\color{blue}{-z}}{t} \cdot a \]
    8. Simplified78.4%

      \[\leadsto x - \frac{\color{blue}{-z}}{t} \cdot a \]

    if -3.69999999999999981e205 < t < -3.25 or 2.24999999999999997e-18 < t

    1. Initial program 96.5%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 78.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around inf 77.5%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]

    if -3.25 < t < 4.99999999999999993e-119

    1. Initial program 98.0%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 99.4%

      \[\leadsto x - \color{blue}{\frac{y - z}{1 - z}} \cdot a \]
    6. Taylor expanded in y around 0 84.0%

      \[\leadsto x - \color{blue}{\left(-1 \cdot \frac{z}{1 - z}\right)} \cdot a \]
    7. Step-by-step derivation
      1. neg-mul-184.0%

        \[\leadsto x - \color{blue}{\left(-\frac{z}{1 - z}\right)} \cdot a \]
      2. distribute-neg-frac284.0%

        \[\leadsto x - \color{blue}{\frac{z}{-\left(1 - z\right)}} \cdot a \]
      3. sub-neg84.0%

        \[\leadsto x - \frac{z}{-\color{blue}{\left(1 + \left(-z\right)\right)}} \cdot a \]
      4. distribute-neg-in84.0%

        \[\leadsto x - \frac{z}{\color{blue}{\left(-1\right) + \left(-\left(-z\right)\right)}} \cdot a \]
      5. metadata-eval84.0%

        \[\leadsto x - \frac{z}{\color{blue}{-1} + \left(-\left(-z\right)\right)} \cdot a \]
      6. remove-double-neg84.0%

        \[\leadsto x - \frac{z}{-1 + \color{blue}{z}} \cdot a \]
    8. Simplified84.0%

      \[\leadsto x - \color{blue}{\frac{z}{-1 + z}} \cdot a \]

    if 4.99999999999999993e-119 < t < 2.24999999999999997e-18

    1. Initial program 99.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 65.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around 0 65.4%

      \[\leadsto x - \color{blue}{a \cdot y} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.7 \cdot 10^{+205}:\\ \;\;\;\;x + a \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -3.25:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-119}:\\ \;\;\;\;x - a \cdot \frac{z}{z + -1}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-18}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{a}{\frac{t}{z - y}}\\ \mathbf{if}\;t \leq -92:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-119}:\\ \;\;\;\;x - a \cdot \frac{z}{z + -1}\\ \mathbf{elif}\;t \leq 2400:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ a (/ t (- z y))))))
   (if (<= t -92.0)
     t_1
     (if (<= t 2.4e-119)
       (- x (* a (/ z (+ z -1.0))))
       (if (<= t 2400.0) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (a / (t / (z - y)));
	double tmp;
	if (t <= -92.0) {
		tmp = t_1;
	} else if (t <= 2.4e-119) {
		tmp = x - (a * (z / (z + -1.0)));
	} else if (t <= 2400.0) {
		tmp = x - (y * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: t_1
    real(8) :: tmp
    t_1 = x + (a / (t / (z - y)))
    if (t <= (-92.0d0)) then
        tmp = t_1
    else if (t <= 2.4d-119) then
        tmp = x - (a * (z / (z + (-1.0d0))))
    else if (t <= 2400.0d0) then
        tmp = x - (y * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (a / (t / (z - y)));
	double tmp;
	if (t <= -92.0) {
		tmp = t_1;
	} else if (t <= 2.4e-119) {
		tmp = x - (a * (z / (z + -1.0)));
	} else if (t <= 2400.0) {
		tmp = x - (y * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (a / (t / (z - y)))
	tmp = 0
	if t <= -92.0:
		tmp = t_1
	elif t <= 2.4e-119:
		tmp = x - (a * (z / (z + -1.0)))
	elif t <= 2400.0:
		tmp = x - (y * a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(a / Float64(t / Float64(z - y))))
	tmp = 0.0
	if (t <= -92.0)
		tmp = t_1;
	elseif (t <= 2.4e-119)
		tmp = Float64(x - Float64(a * Float64(z / Float64(z + -1.0))));
	elseif (t <= 2400.0)
		tmp = Float64(x - Float64(y * a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (a / (t / (z - y)));
	tmp = 0.0;
	if (t <= -92.0)
		tmp = t_1;
	elseif (t <= 2.4e-119)
		tmp = x - (a * (z / (z + -1.0)));
	elseif (t <= 2400.0)
		tmp = x - (y * a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -92.0], t$95$1, If[LessEqual[t, 2.4e-119], N[(x - N[(a * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2400.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{t}{z - y}}\\
\mathbf{if}\;t \leq -92:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-119}:\\
\;\;\;\;x - a \cdot \frac{z}{z + -1}\\

\mathbf{elif}\;t \leq 2400:\\
\;\;\;\;x - y \cdot a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -92 or 2400 < t

    1. Initial program 95.6%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.8%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto x - \color{blue}{a \cdot \frac{y - z}{\left(t - z\right) + 1}} \]
      2. clear-num99.8%

        \[\leadsto x - a \cdot \color{blue}{\frac{1}{\frac{\left(t - z\right) + 1}{y - z}}} \]
      3. un-div-inv99.9%

        \[\leadsto x - \color{blue}{\frac{a}{\frac{\left(t - z\right) + 1}{y - z}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto x - \color{blue}{\frac{a}{\frac{\left(t - z\right) + 1}{y - z}}} \]
    7. Taylor expanded in t around inf 89.7%

      \[\leadsto x - \frac{a}{\color{blue}{\frac{t}{y - z}}} \]

    if -92 < t < 2.40000000000000009e-119

    1. Initial program 98.0%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 99.4%

      \[\leadsto x - \color{blue}{\frac{y - z}{1 - z}} \cdot a \]
    6. Taylor expanded in y around 0 84.0%

      \[\leadsto x - \color{blue}{\left(-1 \cdot \frac{z}{1 - z}\right)} \cdot a \]
    7. Step-by-step derivation
      1. neg-mul-184.0%

        \[\leadsto x - \color{blue}{\left(-\frac{z}{1 - z}\right)} \cdot a \]
      2. distribute-neg-frac284.0%

        \[\leadsto x - \color{blue}{\frac{z}{-\left(1 - z\right)}} \cdot a \]
      3. sub-neg84.0%

        \[\leadsto x - \frac{z}{-\color{blue}{\left(1 + \left(-z\right)\right)}} \cdot a \]
      4. distribute-neg-in84.0%

        \[\leadsto x - \frac{z}{\color{blue}{\left(-1\right) + \left(-\left(-z\right)\right)}} \cdot a \]
      5. metadata-eval84.0%

        \[\leadsto x - \frac{z}{\color{blue}{-1} + \left(-\left(-z\right)\right)} \cdot a \]
      6. remove-double-neg84.0%

        \[\leadsto x - \frac{z}{-1 + \color{blue}{z}} \cdot a \]
    8. Simplified84.0%

      \[\leadsto x - \color{blue}{\frac{z}{-1 + z}} \cdot a \]

    if 2.40000000000000009e-119 < t < 2400

    1. Initial program 99.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 68.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around 0 68.4%

      \[\leadsto x - \color{blue}{a \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -92:\\ \;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-119}:\\ \;\;\;\;x - a \cdot \frac{z}{z + -1}\\ \mathbf{elif}\;t \leq 2400:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + a \cdot \frac{z - y}{t}\\ \mathbf{if}\;t \leq -95:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-120}:\\ \;\;\;\;x - a \cdot \frac{z}{z + -1}\\ \mathbf{elif}\;t \leq 520:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* a (/ (- z y) t)))))
   (if (<= t -95.0)
     t_1
     (if (<= t 2.9e-120)
       (- x (* a (/ z (+ z -1.0))))
       (if (<= t 520.0) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (a * ((z - y) / t));
	double tmp;
	if (t <= -95.0) {
		tmp = t_1;
	} else if (t <= 2.9e-120) {
		tmp = x - (a * (z / (z + -1.0)));
	} else if (t <= 520.0) {
		tmp = x - (y * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: t_1
    real(8) :: tmp
    t_1 = x + (a * ((z - y) / t))
    if (t <= (-95.0d0)) then
        tmp = t_1
    else if (t <= 2.9d-120) then
        tmp = x - (a * (z / (z + (-1.0d0))))
    else if (t <= 520.0d0) then
        tmp = x - (y * a)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (a * ((z - y) / t));
	double tmp;
	if (t <= -95.0) {
		tmp = t_1;
	} else if (t <= 2.9e-120) {
		tmp = x - (a * (z / (z + -1.0)));
	} else if (t <= 520.0) {
		tmp = x - (y * a);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (a * ((z - y) / t))
	tmp = 0
	if t <= -95.0:
		tmp = t_1
	elif t <= 2.9e-120:
		tmp = x - (a * (z / (z + -1.0)))
	elif t <= 520.0:
		tmp = x - (y * a)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(a * Float64(Float64(z - y) / t)))
	tmp = 0.0
	if (t <= -95.0)
		tmp = t_1;
	elseif (t <= 2.9e-120)
		tmp = Float64(x - Float64(a * Float64(z / Float64(z + -1.0))));
	elseif (t <= 520.0)
		tmp = Float64(x - Float64(y * a));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (a * ((z - y) / t));
	tmp = 0.0;
	if (t <= -95.0)
		tmp = t_1;
	elseif (t <= 2.9e-120)
		tmp = x - (a * (z / (z + -1.0)));
	elseif (t <= 520.0)
		tmp = x - (y * a);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -95.0], t$95$1, If[LessEqual[t, 2.9e-120], N[(x - N[(a * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 520.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z - y}{t}\\
\mathbf{if}\;t \leq -95:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.9 \cdot 10^{-120}:\\
\;\;\;\;x - a \cdot \frac{z}{z + -1}\\

\mathbf{elif}\;t \leq 520:\\
\;\;\;\;x - y \cdot a\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -95 or 520 < t

    1. Initial program 95.6%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.8%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 89.7%

      \[\leadsto x - \color{blue}{\frac{y - z}{t}} \cdot a \]

    if -95 < t < 2.9e-120

    1. Initial program 98.0%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 99.4%

      \[\leadsto x - \color{blue}{\frac{y - z}{1 - z}} \cdot a \]
    6. Taylor expanded in y around 0 84.0%

      \[\leadsto x - \color{blue}{\left(-1 \cdot \frac{z}{1 - z}\right)} \cdot a \]
    7. Step-by-step derivation
      1. neg-mul-184.0%

        \[\leadsto x - \color{blue}{\left(-\frac{z}{1 - z}\right)} \cdot a \]
      2. distribute-neg-frac284.0%

        \[\leadsto x - \color{blue}{\frac{z}{-\left(1 - z\right)}} \cdot a \]
      3. sub-neg84.0%

        \[\leadsto x - \frac{z}{-\color{blue}{\left(1 + \left(-z\right)\right)}} \cdot a \]
      4. distribute-neg-in84.0%

        \[\leadsto x - \frac{z}{\color{blue}{\left(-1\right) + \left(-\left(-z\right)\right)}} \cdot a \]
      5. metadata-eval84.0%

        \[\leadsto x - \frac{z}{\color{blue}{-1} + \left(-\left(-z\right)\right)} \cdot a \]
      6. remove-double-neg84.0%

        \[\leadsto x - \frac{z}{-1 + \color{blue}{z}} \cdot a \]
    8. Simplified84.0%

      \[\leadsto x - \color{blue}{\frac{z}{-1 + z}} \cdot a \]

    if 2.9e-120 < t < 520

    1. Initial program 99.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 68.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around 0 68.4%

      \[\leadsto x - \color{blue}{a \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification85.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -95:\\ \;\;\;\;x + a \cdot \frac{z - y}{t}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-120}:\\ \;\;\;\;x - a \cdot \frac{z}{z + -1}\\ \mathbf{elif}\;t \leq 520:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \frac{z - y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 91.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+24} \lor \neg \left(t \leq 5 \cdot 10^{+46}\right):\\ \;\;\;\;x - \frac{a}{\frac{t}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \frac{y - z}{z + -1}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -2.9e+24) (not (<= t 5e+46)))
   (- x (/ a (/ t (- y z))))
   (+ x (* a (/ (- y z) (+ z -1.0))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.9e+24) || !(t <= 5e+46)) {
		tmp = x - (a / (t / (y - z)));
	} else {
		tmp = x + (a * ((y - z) / (z + -1.0)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if ((t <= (-2.9d+24)) .or. (.not. (t <= 5d+46))) then
        tmp = x - (a / (t / (y - z)))
    else
        tmp = x + (a * ((y - z) / (z + (-1.0d0))))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.9e+24) || !(t <= 5e+46)) {
		tmp = x - (a / (t / (y - z)));
	} else {
		tmp = x + (a * ((y - z) / (z + -1.0)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2.9e+24) or not (t <= 5e+46):
		tmp = x - (a / (t / (y - z)))
	else:
		tmp = x + (a * ((y - z) / (z + -1.0)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.9e+24) || !(t <= 5e+46))
		tmp = Float64(x - Float64(a / Float64(t / Float64(y - z))));
	else
		tmp = Float64(x + Float64(a * Float64(Float64(y - z) / Float64(z + -1.0))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -2.9e+24) || ~((t <= 5e+46)))
		tmp = x - (a / (t / (y - z)));
	else
		tmp = x + (a * ((y - z) / (z + -1.0)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.9e+24], N[Not[LessEqual[t, 5e+46]], $MachinePrecision]], N[(x - N[(a / N[(t / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+24} \lor \neg \left(t \leq 5 \cdot 10^{+46}\right):\\
\;\;\;\;x - \frac{a}{\frac{t}{y - z}}\\

\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{y - z}{z + -1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.89999999999999979e24 or 5.0000000000000002e46 < t

    1. Initial program 95.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.8%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto x - \color{blue}{a \cdot \frac{y - z}{\left(t - z\right) + 1}} \]
      2. clear-num99.8%

        \[\leadsto x - a \cdot \color{blue}{\frac{1}{\frac{\left(t - z\right) + 1}{y - z}}} \]
      3. un-div-inv99.9%

        \[\leadsto x - \color{blue}{\frac{a}{\frac{\left(t - z\right) + 1}{y - z}}} \]
    6. Applied egg-rr99.9%

      \[\leadsto x - \color{blue}{\frac{a}{\frac{\left(t - z\right) + 1}{y - z}}} \]
    7. Taylor expanded in t around inf 92.4%

      \[\leadsto x - \frac{a}{\color{blue}{\frac{t}{y - z}}} \]

    if -2.89999999999999979e24 < t < 5.0000000000000002e46

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 97.5%

      \[\leadsto x - \color{blue}{\frac{y - z}{1 - z}} \cdot a \]
  3. Recombined 2 regimes into one program.
  4. Final simplification95.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.9 \cdot 10^{+24} \lor \neg \left(t \leq 5 \cdot 10^{+46}\right):\\ \;\;\;\;x - \frac{a}{\frac{t}{y - z}}\\ \mathbf{else}:\\ \;\;\;\;x + a \cdot \frac{y - z}{z + -1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 85.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2400000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\ \;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot a}{-1 - t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -2400000000.0) (not (<= z 5.8e-10)))
   (- x (/ (- z y) (/ z a)))
   (+ x (/ (* y a) (- -1.0 t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2400000000.0) || !(z <= 5.8e-10)) {
		tmp = x - ((z - y) / (z / a));
	} else {
		tmp = x + ((y * a) / (-1.0 - t));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if ((z <= (-2400000000.0d0)) .or. (.not. (z <= 5.8d-10))) then
        tmp = x - ((z - y) / (z / a))
    else
        tmp = x + ((y * a) / ((-1.0d0) - t))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2400000000.0) || !(z <= 5.8e-10)) {
		tmp = x - ((z - y) / (z / a));
	} else {
		tmp = x + ((y * a) / (-1.0 - t));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2400000000.0) or not (z <= 5.8e-10):
		tmp = x - ((z - y) / (z / a))
	else:
		tmp = x + ((y * a) / (-1.0 - t))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -2400000000.0) || !(z <= 5.8e-10))
		tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a)));
	else
		tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -2400000000.0) || ~((z <= 5.8e-10)))
		tmp = x - ((z - y) / (z / a));
	else
		tmp = x + ((y * a) / (-1.0 - t));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2400000000.0], N[Not[LessEqual[z, 5.8e-10]], $MachinePrecision]], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2400000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.4e9 or 5.79999999999999962e-10 < z

    1. Initial program 95.7%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 80.5%

      \[\leadsto x - \frac{y - z}{\color{blue}{-1 \cdot \frac{z}{a}}} \]
    4. Step-by-step derivation
      1. associate-*r/80.5%

        \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-1 \cdot z}{a}}} \]
      2. neg-mul-180.5%

        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-z}}{a}} \]
    5. Simplified80.5%

      \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-z}{a}}} \]

    if -2.4e9 < z < 5.79999999999999962e-10

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 90.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification85.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2400000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\ \;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot a}{-1 - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 81.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2400000000:\\ \;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\ \;\;\;\;x + \frac{y \cdot a}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{a}{z}\right) - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2400000000.0)
   (- x (* (+ y z) (/ a z)))
   (if (<= z 5.8e-10) (+ x (/ (* y a) (- -1.0 t))) (- (- x (/ a z)) a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2400000000.0) {
		tmp = x - ((y + z) * (a / z));
	} else if (z <= 5.8e-10) {
		tmp = x + ((y * a) / (-1.0 - t));
	} else {
		tmp = (x - (a / z)) - a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if (z <= (-2400000000.0d0)) then
        tmp = x - ((y + z) * (a / z))
    else if (z <= 5.8d-10) then
        tmp = x + ((y * a) / ((-1.0d0) - t))
    else
        tmp = (x - (a / z)) - a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2400000000.0) {
		tmp = x - ((y + z) * (a / z));
	} else if (z <= 5.8e-10) {
		tmp = x + ((y * a) / (-1.0 - t));
	} else {
		tmp = (x - (a / z)) - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2400000000.0:
		tmp = x - ((y + z) * (a / z))
	elif z <= 5.8e-10:
		tmp = x + ((y * a) / (-1.0 - t))
	else:
		tmp = (x - (a / z)) - a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2400000000.0)
		tmp = Float64(x - Float64(Float64(y + z) * Float64(a / z)));
	elseif (z <= 5.8e-10)
		tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t)));
	else
		tmp = Float64(Float64(x - Float64(a / z)) - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -2400000000.0)
		tmp = x - ((y + z) * (a / z));
	elseif (z <= 5.8e-10)
		tmp = x + ((y * a) / (-1.0 - t));
	else
		tmp = (x - (a / z)) - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2400000000.0], N[(x - N[(N[(y + z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-10], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2400000000:\\
\;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\

\mathbf{else}:\\
\;\;\;\;\left(x - \frac{a}{z}\right) - a\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.4e9

    1. Initial program 94.2%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 73.5%

      \[\leadsto x - \frac{y - z}{\color{blue}{-1 \cdot \frac{z}{a}}} \]
    4. Step-by-step derivation
      1. associate-*r/73.5%

        \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-1 \cdot z}{a}}} \]
      2. neg-mul-173.5%

        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-z}}{a}} \]
    5. Simplified73.5%

      \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-z}{a}}} \]
    6. Step-by-step derivation
      1. div-inv73.4%

        \[\leadsto x - \color{blue}{\left(y - z\right) \cdot \frac{1}{\frac{-z}{a}}} \]
      2. sub-neg73.4%

        \[\leadsto x - \color{blue}{\left(y + \left(-z\right)\right)} \cdot \frac{1}{\frac{-z}{a}} \]
      3. add-sqr-sqrt73.3%

        \[\leadsto x - \left(y + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      4. sqrt-unprod29.8%

        \[\leadsto x - \left(y + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      5. sqr-neg29.8%

        \[\leadsto x - \left(y + \sqrt{\color{blue}{z \cdot z}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      6. sqrt-unprod0.0%

        \[\leadsto x - \left(y + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      7. add-sqr-sqrt50.5%

        \[\leadsto x - \left(y + \color{blue}{z}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      8. clear-num50.6%

        \[\leadsto x - \left(y + z\right) \cdot \color{blue}{\frac{a}{-z}} \]
      9. add-sqr-sqrt50.5%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      10. sqrt-unprod48.9%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      11. sqr-neg48.9%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}} \]
      12. sqrt-unprod0.0%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      13. add-sqr-sqrt71.0%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{z}} \]
    7. Applied egg-rr71.0%

      \[\leadsto x - \color{blue}{\left(y + z\right) \cdot \frac{a}{z}} \]

    if -2.4e9 < z < 5.79999999999999962e-10

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 90.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]

    if 5.79999999999999962e-10 < z

    1. Initial program 96.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 90.0%

      \[\leadsto x - \color{blue}{\frac{y - z}{1 - z}} \cdot a \]
    6. Taylor expanded in y around 0 84.6%

      \[\leadsto x - \color{blue}{\left(-1 \cdot \frac{z}{1 - z}\right)} \cdot a \]
    7. Step-by-step derivation
      1. neg-mul-184.6%

        \[\leadsto x - \color{blue}{\left(-\frac{z}{1 - z}\right)} \cdot a \]
      2. distribute-neg-frac284.6%

        \[\leadsto x - \color{blue}{\frac{z}{-\left(1 - z\right)}} \cdot a \]
      3. sub-neg84.6%

        \[\leadsto x - \frac{z}{-\color{blue}{\left(1 + \left(-z\right)\right)}} \cdot a \]
      4. distribute-neg-in84.6%

        \[\leadsto x - \frac{z}{\color{blue}{\left(-1\right) + \left(-\left(-z\right)\right)}} \cdot a \]
      5. metadata-eval84.6%

        \[\leadsto x - \frac{z}{\color{blue}{-1} + \left(-\left(-z\right)\right)} \cdot a \]
      6. remove-double-neg84.6%

        \[\leadsto x - \frac{z}{-1 + \color{blue}{z}} \cdot a \]
    8. Simplified84.6%

      \[\leadsto x - \color{blue}{\frac{z}{-1 + z}} \cdot a \]
    9. Taylor expanded in z around inf 84.7%

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a}{z}\right) - a} \]
    10. Step-by-step derivation
      1. mul-1-neg84.7%

        \[\leadsto \left(x + \color{blue}{\left(-\frac{a}{z}\right)}\right) - a \]
      2. unsub-neg84.7%

        \[\leadsto \color{blue}{\left(x - \frac{a}{z}\right)} - a \]
    11. Simplified84.7%

      \[\leadsto \color{blue}{\left(x - \frac{a}{z}\right) - a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification84.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2400000000:\\ \;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\ \;\;\;\;x + \frac{y \cdot a}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{a}{z}\right) - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2200000000 \lor \neg \left(z \leq 3.5 \cdot 10^{-12}\right):\\ \;\;\;\;\left(x - \frac{a}{z}\right) - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -2200000000.0) (not (<= z 3.5e-12)))
   (- (- x (/ a z)) a)
   (- x (/ (* y a) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2200000000.0) || !(z <= 3.5e-12)) {
		tmp = (x - (a / z)) - a;
	} else {
		tmp = x - ((y * a) / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if ((z <= (-2200000000.0d0)) .or. (.not. (z <= 3.5d-12))) then
        tmp = (x - (a / z)) - a
    else
        tmp = x - ((y * a) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2200000000.0) || !(z <= 3.5e-12)) {
		tmp = (x - (a / z)) - a;
	} else {
		tmp = x - ((y * a) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2200000000.0) or not (z <= 3.5e-12):
		tmp = (x - (a / z)) - a
	else:
		tmp = x - ((y * a) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -2200000000.0) || !(z <= 3.5e-12))
		tmp = Float64(Float64(x - Float64(a / z)) - a);
	else
		tmp = Float64(x - Float64(Float64(y * a) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -2200000000.0) || ~((z <= 3.5e-12)))
		tmp = (x - (a / z)) - a;
	else
		tmp = x - ((y * a) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2200000000.0], N[Not[LessEqual[z, 3.5e-12]], $MachinePrecision]], N[(N[(x - N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2200000000 \lor \neg \left(z \leq 3.5 \cdot 10^{-12}\right):\\
\;\;\;\;\left(x - \frac{a}{z}\right) - a\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2e9 or 3.5e-12 < z

    1. Initial program 95.7%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 82.7%

      \[\leadsto x - \color{blue}{\frac{y - z}{1 - z}} \cdot a \]
    6. Taylor expanded in y around 0 78.1%

      \[\leadsto x - \color{blue}{\left(-1 \cdot \frac{z}{1 - z}\right)} \cdot a \]
    7. Step-by-step derivation
      1. neg-mul-178.1%

        \[\leadsto x - \color{blue}{\left(-\frac{z}{1 - z}\right)} \cdot a \]
      2. distribute-neg-frac278.1%

        \[\leadsto x - \color{blue}{\frac{z}{-\left(1 - z\right)}} \cdot a \]
      3. sub-neg78.1%

        \[\leadsto x - \frac{z}{-\color{blue}{\left(1 + \left(-z\right)\right)}} \cdot a \]
      4. distribute-neg-in78.1%

        \[\leadsto x - \frac{z}{\color{blue}{\left(-1\right) + \left(-\left(-z\right)\right)}} \cdot a \]
      5. metadata-eval78.1%

        \[\leadsto x - \frac{z}{\color{blue}{-1} + \left(-\left(-z\right)\right)} \cdot a \]
      6. remove-double-neg78.1%

        \[\leadsto x - \frac{z}{-1 + \color{blue}{z}} \cdot a \]
    8. Simplified78.1%

      \[\leadsto x - \color{blue}{\frac{z}{-1 + z}} \cdot a \]
    9. Taylor expanded in z around inf 78.1%

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a}{z}\right) - a} \]
    10. Step-by-step derivation
      1. mul-1-neg78.1%

        \[\leadsto \left(x + \color{blue}{\left(-\frac{a}{z}\right)}\right) - a \]
      2. unsub-neg78.1%

        \[\leadsto \color{blue}{\left(x - \frac{a}{z}\right)} - a \]
    11. Simplified78.1%

      \[\leadsto \color{blue}{\left(x - \frac{a}{z}\right) - a} \]

    if -2.2e9 < z < 3.5e-12

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 90.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around inf 71.0%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2200000000 \lor \neg \left(z \leq 3.5 \cdot 10^{-12}\right):\\ \;\;\;\;\left(x - \frac{a}{z}\right) - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 69.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1500000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1500000000.0) (not (<= z 5.8e-10)))
   (- x a)
   (- x (/ (* y a) t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1500000000.0) || !(z <= 5.8e-10)) {
		tmp = x - a;
	} else {
		tmp = x - ((y * a) / t);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if ((z <= (-1500000000.0d0)) .or. (.not. (z <= 5.8d-10))) then
        tmp = x - a
    else
        tmp = x - ((y * a) / t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1500000000.0) || !(z <= 5.8e-10)) {
		tmp = x - a;
	} else {
		tmp = x - ((y * a) / t);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1500000000.0) or not (z <= 5.8e-10):
		tmp = x - a
	else:
		tmp = x - ((y * a) / t)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1500000000.0) || !(z <= 5.8e-10))
		tmp = Float64(x - a);
	else
		tmp = Float64(x - Float64(Float64(y * a) / t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1500000000.0) || ~((z <= 5.8e-10)))
		tmp = x - a;
	else
		tmp = x - ((y * a) / t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1500000000.0], N[Not[LessEqual[z, 5.8e-10]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1500000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\
\;\;\;\;x - a\\

\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5e9 or 5.79999999999999962e-10 < z

    1. Initial program 95.7%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.9%

      \[\leadsto x - \color{blue}{a} \]

    if -1.5e9 < z < 5.79999999999999962e-10

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 90.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around inf 71.0%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification74.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1500000000 \lor \neg \left(z \leq 5.8 \cdot 10^{-10}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1600000000:\\ \;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{a}{z}\right) - a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1600000000.0)
   (- x (* (+ y z) (/ a z)))
   (if (<= z 5.8e-10) (- x (/ (* y a) t)) (- (- x (/ a z)) a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1600000000.0) {
		tmp = x - ((y + z) * (a / z));
	} else if (z <= 5.8e-10) {
		tmp = x - ((y * a) / t);
	} else {
		tmp = (x - (a / z)) - a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if (z <= (-1600000000.0d0)) then
        tmp = x - ((y + z) * (a / z))
    else if (z <= 5.8d-10) then
        tmp = x - ((y * a) / t)
    else
        tmp = (x - (a / z)) - a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1600000000.0) {
		tmp = x - ((y + z) * (a / z));
	} else if (z <= 5.8e-10) {
		tmp = x - ((y * a) / t);
	} else {
		tmp = (x - (a / z)) - a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1600000000.0:
		tmp = x - ((y + z) * (a / z))
	elif z <= 5.8e-10:
		tmp = x - ((y * a) / t)
	else:
		tmp = (x - (a / z)) - a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1600000000.0)
		tmp = Float64(x - Float64(Float64(y + z) * Float64(a / z)));
	elseif (z <= 5.8e-10)
		tmp = Float64(x - Float64(Float64(y * a) / t));
	else
		tmp = Float64(Float64(x - Float64(a / z)) - a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1600000000.0)
		tmp = x - ((y + z) * (a / z));
	elseif (z <= 5.8e-10)
		tmp = x - ((y * a) / t);
	else
		tmp = (x - (a / z)) - a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1600000000.0], N[(x - N[(N[(y + z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-10], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(a / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1600000000:\\
\;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\

\mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\

\mathbf{else}:\\
\;\;\;\;\left(x - \frac{a}{z}\right) - a\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.6e9

    1. Initial program 94.2%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 73.5%

      \[\leadsto x - \frac{y - z}{\color{blue}{-1 \cdot \frac{z}{a}}} \]
    4. Step-by-step derivation
      1. associate-*r/73.5%

        \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-1 \cdot z}{a}}} \]
      2. neg-mul-173.5%

        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-z}}{a}} \]
    5. Simplified73.5%

      \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-z}{a}}} \]
    6. Step-by-step derivation
      1. div-inv73.4%

        \[\leadsto x - \color{blue}{\left(y - z\right) \cdot \frac{1}{\frac{-z}{a}}} \]
      2. sub-neg73.4%

        \[\leadsto x - \color{blue}{\left(y + \left(-z\right)\right)} \cdot \frac{1}{\frac{-z}{a}} \]
      3. add-sqr-sqrt73.3%

        \[\leadsto x - \left(y + \color{blue}{\sqrt{-z} \cdot \sqrt{-z}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      4. sqrt-unprod29.8%

        \[\leadsto x - \left(y + \color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      5. sqr-neg29.8%

        \[\leadsto x - \left(y + \sqrt{\color{blue}{z \cdot z}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      6. sqrt-unprod0.0%

        \[\leadsto x - \left(y + \color{blue}{\sqrt{z} \cdot \sqrt{z}}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      7. add-sqr-sqrt50.5%

        \[\leadsto x - \left(y + \color{blue}{z}\right) \cdot \frac{1}{\frac{-z}{a}} \]
      8. clear-num50.6%

        \[\leadsto x - \left(y + z\right) \cdot \color{blue}{\frac{a}{-z}} \]
      9. add-sqr-sqrt50.5%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} \]
      10. sqrt-unprod48.9%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}}} \]
      11. sqr-neg48.9%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}} \]
      12. sqrt-unprod0.0%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} \]
      13. add-sqr-sqrt71.0%

        \[\leadsto x - \left(y + z\right) \cdot \frac{a}{\color{blue}{z}} \]
    7. Applied egg-rr71.0%

      \[\leadsto x - \color{blue}{\left(y + z\right) \cdot \frac{a}{z}} \]

    if -1.6e9 < z < 5.79999999999999962e-10

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 90.4%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around inf 71.0%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]

    if 5.79999999999999962e-10 < z

    1. Initial program 96.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in t around 0 90.0%

      \[\leadsto x - \color{blue}{\frac{y - z}{1 - z}} \cdot a \]
    6. Taylor expanded in y around 0 84.6%

      \[\leadsto x - \color{blue}{\left(-1 \cdot \frac{z}{1 - z}\right)} \cdot a \]
    7. Step-by-step derivation
      1. neg-mul-184.6%

        \[\leadsto x - \color{blue}{\left(-\frac{z}{1 - z}\right)} \cdot a \]
      2. distribute-neg-frac284.6%

        \[\leadsto x - \color{blue}{\frac{z}{-\left(1 - z\right)}} \cdot a \]
      3. sub-neg84.6%

        \[\leadsto x - \frac{z}{-\color{blue}{\left(1 + \left(-z\right)\right)}} \cdot a \]
      4. distribute-neg-in84.6%

        \[\leadsto x - \frac{z}{\color{blue}{\left(-1\right) + \left(-\left(-z\right)\right)}} \cdot a \]
      5. metadata-eval84.6%

        \[\leadsto x - \frac{z}{\color{blue}{-1} + \left(-\left(-z\right)\right)} \cdot a \]
      6. remove-double-neg84.6%

        \[\leadsto x - \frac{z}{-1 + \color{blue}{z}} \cdot a \]
    8. Simplified84.6%

      \[\leadsto x - \color{blue}{\frac{z}{-1 + z}} \cdot a \]
    9. Taylor expanded in z around inf 84.7%

      \[\leadsto \color{blue}{\left(x + -1 \cdot \frac{a}{z}\right) - a} \]
    10. Step-by-step derivation
      1. mul-1-neg84.7%

        \[\leadsto \left(x + \color{blue}{\left(-\frac{a}{z}\right)}\right) - a \]
      2. unsub-neg84.7%

        \[\leadsto \color{blue}{\left(x - \frac{a}{z}\right)} - a \]
    11. Simplified84.7%

      \[\leadsto \color{blue}{\left(x - \frac{a}{z}\right) - a} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification74.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1600000000:\\ \;\;\;\;x - \left(y + z\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-10}:\\ \;\;\;\;x - \frac{y \cdot a}{t}\\ \mathbf{else}:\\ \;\;\;\;\left(x - \frac{a}{z}\right) - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 73.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -61000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot a\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -61000.0) (not (<= z 2.25e-14))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -61000.0) || !(z <= 2.25e-14)) {
		tmp = x - a;
	} else {
		tmp = x - (y * a);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if ((z <= (-61000.0d0)) .or. (.not. (z <= 2.25d-14))) then
        tmp = x - a
    else
        tmp = x - (y * a)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -61000.0) || !(z <= 2.25e-14)) {
		tmp = x - a;
	} else {
		tmp = x - (y * a);
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -61000.0) or not (z <= 2.25e-14):
		tmp = x - a
	else:
		tmp = x - (y * a)
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -61000.0) || !(z <= 2.25e-14))
		tmp = Float64(x - a);
	else
		tmp = Float64(x - Float64(y * a));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -61000.0) || ~((z <= 2.25e-14)))
		tmp = x - a;
	else
		tmp = x - (y * a);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -61000.0], N[Not[LessEqual[z, 2.25e-14]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -61000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\
\;\;\;\;x - a\\

\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -61000 or 2.2499999999999999e-14 < z

    1. Initial program 95.7%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.0%

      \[\leadsto x - \color{blue}{a} \]

    if -61000 < z < 2.2499999999999999e-14

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 90.2%

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
    6. Taylor expanded in t around 0 66.4%

      \[\leadsto x - \color{blue}{a \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -61000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot a\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 66.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1400000000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1400000000.0) (not (<= z 2.25e-14))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1400000000.0) || !(z <= 2.25e-14)) {
		tmp = x - a;
	} else {
		tmp = x;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if ((z <= (-1400000000.0d0)) .or. (.not. (z <= 2.25d-14))) then
        tmp = x - a
    else
        tmp = x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1400000000.0) || !(z <= 2.25e-14)) {
		tmp = x - a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1400000000.0) or not (z <= 2.25e-14):
		tmp = x - a
	else:
		tmp = x
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1400000000.0) || !(z <= 2.25e-14))
		tmp = Float64(x - a);
	else
		tmp = x;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -1400000000.0) || ~((z <= 2.25e-14)))
		tmp = x - a;
	else
		tmp = x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1400000000.0], N[Not[LessEqual[z, 2.25e-14]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1400000000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\
\;\;\;\;x - a\\

\mathbf{else}:\\
\;\;\;\;x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4e9 or 2.2499999999999999e-14 < z

    1. Initial program 95.7%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/99.9%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.9%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.4%

      \[\leadsto x - \color{blue}{a} \]

    if -1.4e9 < z < 2.2499999999999999e-14

    1. Initial program 98.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. sub-neg98.4%

        \[\leadsto \color{blue}{x + \left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right)} \]
      2. +-commutative98.4%

        \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
      3. associate-/r/99.9%

        \[\leadsto \left(-\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right) + x \]
      4. distribute-rgt-neg-in99.9%

        \[\leadsto \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot \left(-a\right)} + x \]
      5. associate-*l/94.7%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(-a\right)}{\left(t - z\right) + 1}} + x \]
      6. associate-/l*98.4%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{-a}{\left(t - z\right) + 1}} + x \]
      7. fma-define98.4%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{-a}{\left(t - z\right) + 1}, x\right)} \]
      8. distribute-frac-neg98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
      9. distribute-neg-frac298.4%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
      10. distribute-neg-in98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
      12. distribute-neg-in98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
      13. remove-double-neg98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(\left(-t\right) + \color{blue}{z}\right) + \left(-1\right)}, x\right) \]
      14. +-commutative98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
      15. sub-neg98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
      16. metadata-eval98.4%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(z - t\right) + \color{blue}{-1}}, x\right) \]
    3. Simplified98.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{a}{\left(z - t\right) + -1}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 61.0%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1400000000 \lor \neg \left(z \leq 2.25 \cdot 10^{-14}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 51.6% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 2.55 \cdot 10^{+120}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;-a\\ \end{array} \end{array} \]
(FPCore (x y z t a) :precision binary64 (if (<= z 2.55e+120) x (- a)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= 2.55e+120) {
		tmp = x;
	} else {
		tmp = -a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    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) :: tmp
    if (z <= 2.55d+120) then
        tmp = x
    else
        tmp = -a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= 2.55e+120) {
		tmp = x;
	} else {
		tmp = -a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= 2.55e+120:
		tmp = x
	else:
		tmp = -a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= 2.55e+120)
		tmp = x;
	else
		tmp = Float64(-a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= 2.55e+120)
		tmp = x;
	else
		tmp = -a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 2.55e+120], x, (-a)]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.55 \cdot 10^{+120}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;-a\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 2.55000000000000014e120

    1. Initial program 97.4%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. sub-neg97.4%

        \[\leadsto \color{blue}{x + \left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right)} \]
      2. +-commutative97.4%

        \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
      3. associate-/r/99.9%

        \[\leadsto \left(-\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right) + x \]
      4. distribute-rgt-neg-in99.9%

        \[\leadsto \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot \left(-a\right)} + x \]
      5. associate-*l/87.4%

        \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(-a\right)}{\left(t - z\right) + 1}} + x \]
      6. associate-/l*97.5%

        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{-a}{\left(t - z\right) + 1}} + x \]
      7. fma-define97.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{-a}{\left(t - z\right) + 1}, x\right)} \]
      8. distribute-frac-neg97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
      9. distribute-neg-frac297.5%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
      10. distribute-neg-in97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
      12. distribute-neg-in97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
      13. remove-double-neg97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(\left(-t\right) + \color{blue}{z}\right) + \left(-1\right)}, x\right) \]
      14. +-commutative97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
      15. sub-neg97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
      16. metadata-eval97.5%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(z - t\right) + \color{blue}{-1}}, x\right) \]
    3. Simplified97.5%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{a}{\left(z - t\right) + -1}, x\right)} \]
    4. Add Preprocessing
    5. Taylor expanded in a around 0 56.3%

      \[\leadsto \color{blue}{x} \]

    if 2.55000000000000014e120 < z

    1. Initial program 95.3%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Step-by-step derivation
      1. associate-/r/100.0%

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified100.0%

      \[\leadsto \color{blue}{x - \frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 95.7%

      \[\leadsto x - \color{blue}{a} \]
    6. Taylor expanded in x around 0 59.0%

      \[\leadsto \color{blue}{-1 \cdot a} \]
    7. Step-by-step derivation
      1. neg-mul-159.0%

        \[\leadsto \color{blue}{-a} \]
    8. Simplified59.0%

      \[\leadsto \color{blue}{-a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 14: 54.1% accurate, 13.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
	return x;
}
real(8) function code(x, y, z, t, a)
    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
    code = x
end function
public static double code(double x, double y, double z, double t, double a) {
	return x;
}
def code(x, y, z, t, a):
	return x
function code(x, y, z, t, a)
	return x
end
function tmp = code(x, y, z, t, a)
	tmp = x;
end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 97.0%

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
  2. Step-by-step derivation
    1. sub-neg97.0%

      \[\leadsto \color{blue}{x + \left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right)} \]
    2. +-commutative97.0%

      \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
    3. associate-/r/99.9%

      \[\leadsto \left(-\color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a}\right) + x \]
    4. distribute-rgt-neg-in99.9%

      \[\leadsto \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot \left(-a\right)} + x \]
    5. associate-*l/83.0%

      \[\leadsto \color{blue}{\frac{\left(y - z\right) \cdot \left(-a\right)}{\left(t - z\right) + 1}} + x \]
    6. associate-/l*97.2%

      \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{-a}{\left(t - z\right) + 1}} + x \]
    7. fma-define97.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{-a}{\left(t - z\right) + 1}, x\right)} \]
    8. distribute-frac-neg97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
    9. distribute-neg-frac297.2%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
    10. distribute-neg-in97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
    11. sub-neg97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
    12. distribute-neg-in97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
    13. remove-double-neg97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(\left(-t\right) + \color{blue}{z}\right) + \left(-1\right)}, x\right) \]
    14. +-commutative97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
    15. sub-neg97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
    16. metadata-eval97.2%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(z - t\right) + \color{blue}{-1}}, x\right) \]
  3. Simplified97.2%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{a}{\left(z - t\right) + -1}, x\right)} \]
  4. Add Preprocessing
  5. Taylor expanded in a around 0 52.9%

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer Target 1: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{y - z}{\left(t - z\right) + 1} \cdot a \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
	return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
    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
    code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a):
	return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a))
end
function tmp = code(x, y, z, t, a)
	tmp = x - (((y - z) / ((t - z) + 1.0)) * a);
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}

Reproduce

?
herbie shell --seed 2024186 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

  :alt
  (! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))

  (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))