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

Percentage Accurate: 97.1% → 99.7%
Time: 14.1s
Alternatives: 12
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 12 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.1% 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.7% 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.3%

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

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

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

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

Alternative 2: 76.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{a}{t} \cdot \left(z - y\right)\\ t_2 := x + \left(y - z\right) \cdot \frac{a}{z}\\ \mathbf{if}\;z \leq -5.7 \cdot 10^{+47}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{-139}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+63}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ a t) (- z y)))) (t_2 (+ x (* (- y z) (/ a z)))))
   (if (<= z -5.7e+47)
     t_2
     (if (<= z -1.9e-110)
       t_1
       (if (<= z 1.42e-139) (- x (* y a)) (if (<= z 1.05e+63) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((a / t) * (z - y));
	double t_2 = x + ((y - z) * (a / z));
	double tmp;
	if (z <= -5.7e+47) {
		tmp = t_2;
	} else if (z <= -1.9e-110) {
		tmp = t_1;
	} else if (z <= 1.42e-139) {
		tmp = x - (y * a);
	} else if (z <= 1.05e+63) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	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) :: t_2
    real(8) :: tmp
    t_1 = x + ((a / t) * (z - y))
    t_2 = x + ((y - z) * (a / z))
    if (z <= (-5.7d+47)) then
        tmp = t_2
    else if (z <= (-1.9d-110)) then
        tmp = t_1
    else if (z <= 1.42d-139) then
        tmp = x - (y * a)
    else if (z <= 1.05d+63) then
        tmp = t_1
    else
        tmp = t_2
    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 t_2 = x + ((y - z) * (a / z));
	double tmp;
	if (z <= -5.7e+47) {
		tmp = t_2;
	} else if (z <= -1.9e-110) {
		tmp = t_1;
	} else if (z <= 1.42e-139) {
		tmp = x - (y * a);
	} else if (z <= 1.05e+63) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((a / t) * (z - y))
	t_2 = x + ((y - z) * (a / z))
	tmp = 0
	if z <= -5.7e+47:
		tmp = t_2
	elif z <= -1.9e-110:
		tmp = t_1
	elif z <= 1.42e-139:
		tmp = x - (y * a)
	elif z <= 1.05e+63:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(a / t) * Float64(z - y)))
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(a / z)))
	tmp = 0.0
	if (z <= -5.7e+47)
		tmp = t_2;
	elseif (z <= -1.9e-110)
		tmp = t_1;
	elseif (z <= 1.42e-139)
		tmp = Float64(x - Float64(y * a));
	elseif (z <= 1.05e+63)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((a / t) * (z - y));
	t_2 = x + ((y - z) * (a / z));
	tmp = 0.0;
	if (z <= -5.7e+47)
		tmp = t_2;
	elseif (z <= -1.9e-110)
		tmp = t_1;
	elseif (z <= 1.42e-139)
		tmp = x - (y * a);
	elseif (z <= 1.05e+63)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(a / t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.7e+47], t$95$2, If[LessEqual[z, -1.9e-110], t$95$1, If[LessEqual[z, 1.42e-139], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+63], t$95$1, t$95$2]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + \frac{a}{t} \cdot \left(z - y\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -5.7 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.9 \cdot 10^{-110}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.42 \cdot 10^{-139}:\\
\;\;\;\;x - y \cdot a\\

\mathbf{elif}\;z \leq 1.05 \cdot 10^{+63}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.6999999999999997e47 or 1.0500000000000001e63 < z

    1. Initial program 94.8%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(\frac{y}{\frac{-z}{a}} - \frac{z}{\frac{-z}{a}}\right)} \]
      2. div-inv87.7%

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

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

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}} - \frac{z}{\frac{-z}{a}}\right) \]
      7. sqrt-unprod33.2%

        \[\leadsto x - \left(y \cdot \frac{a}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}} - \frac{z}{\frac{-z}{a}}\right) \]
      8. add-sqr-sqrt72.6%

        \[\leadsto x - \left(y \cdot \frac{a}{\color{blue}{z}} - \frac{z}{\frac{-z}{a}}\right) \]
      9. div-inv72.6%

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\left(y \cdot \frac{a}{z} - z \cdot \frac{a}{z}\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-out--49.3%

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

      \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(y - z\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv49.3%

        \[\leadsto \color{blue}{x + \left(-\frac{a}{z}\right) \cdot \left(y - z\right)} \]
      2. distribute-neg-frac49.3%

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

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

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

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

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

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

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

    if -5.6999999999999997e47 < z < -1.8999999999999999e-110 or 1.41999999999999997e-139 < z < 1.0500000000000001e63

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(y \cdot \frac{a}{t} - z \cdot \frac{a}{t}\right)} \]
      8. distribute-rgt-out--80.0%

        \[\leadsto x - \color{blue}{\frac{a}{t} \cdot \left(y - z\right)} \]
    6. Simplified80.0%

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

    if -1.8999999999999999e-110 < z < 1.41999999999999997e-139

    1. Initial program 99.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+47}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{a}{z}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{-110}:\\ \;\;\;\;x + \frac{a}{t} \cdot \left(z - y\right)\\ \mathbf{elif}\;z \leq 1.42 \cdot 10^{-139}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+63}:\\ \;\;\;\;x + \frac{a}{t} \cdot \left(z - y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{a}{z}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -1.05:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 1.4 \cdot 10^{-141}:\\
\;\;\;\;x - y \cdot a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05000000000000004 or 5.19999999999999977e49 < z

    1. Initial program 94.5%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(\frac{y}{\frac{-z}{a}} - \frac{z}{\frac{-z}{a}}\right)} \]
      2. div-inv83.8%

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{\color{blue}{\sqrt{-z} \cdot \sqrt{-z}}} - \frac{z}{\frac{-z}{a}}\right) \]
      5. sqrt-unprod75.5%

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

        \[\leadsto x - \left(y \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}} - \frac{z}{\frac{-z}{a}}\right) \]
      7. sqrt-unprod30.8%

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

        \[\leadsto x - \left(y \cdot \frac{a}{\color{blue}{z}} - \frac{z}{\frac{-z}{a}}\right) \]
      9. div-inv68.7%

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

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

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{z} - z \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}}\right) \]
      14. sqrt-unprod23.5%

        \[\leadsto x - \left(y \cdot \frac{a}{z} - z \cdot \frac{a}{\color{blue}{\sqrt{z} \cdot \sqrt{z}}}\right) \]
      15. add-sqr-sqrt48.6%

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

      \[\leadsto x - \color{blue}{\left(y \cdot \frac{a}{z} - z \cdot \frac{a}{z}\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-out--48.6%

        \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(y - z\right)} \]
    9. Simplified48.6%

      \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(y - z\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv48.6%

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

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

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

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

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

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

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

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

    if -1.05000000000000004 < z < 1.40000000000000006e-141

    1. Initial program 99.8%

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

        \[\leadsto x - \color{blue}{\frac{y - z}{\left(t - z\right) + 1} \cdot a} \]
    3. Simplified99.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 95.5%

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

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

    if 1.40000000000000006e-141 < z < 5.19999999999999977e49

    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 z around 0 78.8%

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

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
    7. Step-by-step derivation
      1. *-commutative70.7%

        \[\leadsto x - \frac{\color{blue}{y \cdot a}}{t} \]
      2. associate-*r/72.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{a}{t}} \]
    8. Simplified72.7%

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

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

Alternative 4: 87.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -6.7 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.5 \cdot 10^{+63}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.7e48 or 1.5e63 < z

    1. Initial program 94.7%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(\frac{y}{\frac{-z}{a}} - \frac{z}{\frac{-z}{a}}\right)} \]
      2. div-inv87.6%

        \[\leadsto x - \left(\color{blue}{y \cdot \frac{1}{\frac{-z}{a}}} - \frac{z}{\frac{-z}{a}}\right) \]
      3. clear-num87.7%

        \[\leadsto x - \left(y \cdot \color{blue}{\frac{a}{-z}} - \frac{z}{\frac{-z}{a}}\right) \]
      4. add-sqr-sqrt47.4%

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}} - \frac{z}{\frac{-z}{a}}\right) \]
      7. sqrt-unprod33.6%

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{z} - \color{blue}{z \cdot \frac{1}{\frac{-z}{a}}}\right) \]
      10. clear-num72.3%

        \[\leadsto x - \left(y \cdot \frac{a}{z} - z \cdot \color{blue}{\frac{a}{-z}}\right) \]
      11. add-sqr-sqrt38.6%

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{z} - z \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}}\right) \]
      14. sqrt-unprod25.2%

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

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

      \[\leadsto x - \color{blue}{\left(y \cdot \frac{a}{z} - z \cdot \frac{a}{z}\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-out--48.7%

        \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(y - z\right)} \]
    9. Simplified48.7%

      \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(y - z\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv48.7%

        \[\leadsto \color{blue}{x + \left(-\frac{a}{z}\right) \cdot \left(y - z\right)} \]
      2. distribute-neg-frac48.7%

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

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

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

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

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

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

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

    if -6.7e48 < z < 45

    1. Initial program 99.2%

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

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

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

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

    if 45 < z < 1.5e63

    1. Initial program 96.0%

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

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

      \[\leadsto x - \color{blue}{\left(-1 \cdot \frac{a \cdot z}{t} + \frac{a \cdot y}{t}\right)} \]
    5. Step-by-step derivation
      1. +-commutative80.3%

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

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{t} + \color{blue}{\left(-\frac{a \cdot z}{t}\right)}\right) \]
      5. *-commutative80.2%

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

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

        \[\leadsto x - \color{blue}{\left(y \cdot \frac{a}{t} - z \cdot \frac{a}{t}\right)} \]
      8. distribute-rgt-out--84.3%

        \[\leadsto x - \color{blue}{\frac{a}{t} \cdot \left(y - z\right)} \]
    6. Simplified84.3%

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

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

Alternative 5: 87.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{a}{z}\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.79999999999999998e49 or 9.7999999999999994e62 < z

    1. Initial program 94.7%

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

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

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

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

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

        \[\leadsto x - \color{blue}{\left(\frac{y}{\frac{-z}{a}} - \frac{z}{\frac{-z}{a}}\right)} \]
      2. div-inv87.6%

        \[\leadsto x - \left(\color{blue}{y \cdot \frac{1}{\frac{-z}{a}}} - \frac{z}{\frac{-z}{a}}\right) \]
      3. clear-num87.7%

        \[\leadsto x - \left(y \cdot \color{blue}{\frac{a}{-z}} - \frac{z}{\frac{-z}{a}}\right) \]
      4. add-sqr-sqrt47.4%

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}} - \frac{z}{\frac{-z}{a}}\right) \]
      7. sqrt-unprod33.6%

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{z} - \color{blue}{z \cdot \frac{1}{\frac{-z}{a}}}\right) \]
      10. clear-num72.3%

        \[\leadsto x - \left(y \cdot \frac{a}{z} - z \cdot \color{blue}{\frac{a}{-z}}\right) \]
      11. add-sqr-sqrt38.6%

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

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

        \[\leadsto x - \left(y \cdot \frac{a}{z} - z \cdot \frac{a}{\sqrt{\color{blue}{z \cdot z}}}\right) \]
      14. sqrt-unprod25.2%

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

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

      \[\leadsto x - \color{blue}{\left(y \cdot \frac{a}{z} - z \cdot \frac{a}{z}\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-out--48.7%

        \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(y - z\right)} \]
    9. Simplified48.7%

      \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(y - z\right)} \]
    10. Step-by-step derivation
      1. cancel-sign-sub-inv48.7%

        \[\leadsto \color{blue}{x + \left(-\frac{a}{z}\right) \cdot \left(y - z\right)} \]
      2. distribute-neg-frac48.7%

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

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

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

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

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

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

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

    if -1.79999999999999998e49 < z < 0.022499999999999999

    1. Initial program 99.2%

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

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

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

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

    if 0.022499999999999999 < z < 9.7999999999999994e62

    1. Initial program 96.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 inf 88.1%

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

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

Alternative 6: 88.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x - \left(a - a \cdot \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.14 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1399999999999999e48 or 1.0999999999999999e63 < z

    1. Initial program 94.7%

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

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

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

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

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

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

        \[\leadsto x - \left(a + \color{blue}{\left(-\frac{a \cdot y}{z}\right)}\right) \]
      2. unsub-neg81.3%

        \[\leadsto x - \color{blue}{\left(a - \frac{a \cdot y}{z}\right)} \]
      3. associate-/l*91.8%

        \[\leadsto x - \left(a - \color{blue}{a \cdot \frac{y}{z}}\right) \]
    8. Simplified91.8%

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

    if -1.1399999999999999e48 < z < 880

    1. Initial program 99.2%

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

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

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

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

    if 880 < z < 1.0999999999999999e63

    1. Initial program 96.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 inf 88.1%

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

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

Alternative 7: 72.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+25}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;z \leq 2.5 \cdot 10^{-138}:\\
\;\;\;\;x - y \cdot a\\

\mathbf{elif}\;z \leq 9.8 \cdot 10^{+62}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.5999999999999996e25 or 9.7999999999999994e62 < z

    1. Initial program 94.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 inf 76.7%

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

    if -4.5999999999999996e25 < z < 2.49999999999999994e-138

    1. Initial program 99.8%

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

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

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

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

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

    if 2.49999999999999994e-138 < z < 9.7999999999999994e62

    1. Initial program 96.5%

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

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

      \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{t}} \]
    5. Step-by-step derivation
      1. sub-neg61.5%

        \[\leadsto \color{blue}{x + \left(--1 \cdot \frac{a \cdot z}{t}\right)} \]
      2. mul-1-neg61.5%

        \[\leadsto x + \left(-\color{blue}{\left(-\frac{a \cdot z}{t}\right)}\right) \]
      3. remove-double-neg61.5%

        \[\leadsto x + \color{blue}{\frac{a \cdot z}{t}} \]
      4. associate-/l*61.5%

        \[\leadsto x + \color{blue}{a \cdot \frac{z}{t}} \]
    6. Simplified61.5%

      \[\leadsto \color{blue}{x + a \cdot \frac{z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification73.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.6 \cdot 10^{+25}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 2.5 \cdot 10^{-138}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 9.8 \cdot 10^{+62}:\\ \;\;\;\;x + a \cdot \frac{z}{t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 73.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+17}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;z \leq 7.8 \cdot 10^{-140}:\\
\;\;\;\;x - y \cdot a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.8e17 or 4.60000000000000004e49 < z

    1. Initial program 94.2%

      \[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 75.7%

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

    if -8.8e17 < z < 7.80000000000000038e-140

    1. Initial program 99.8%

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

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

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

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

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

    if 7.80000000000000038e-140 < z < 4.60000000000000004e49

    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 z around 0 78.8%

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

      \[\leadsto x - \color{blue}{\frac{a \cdot y}{t}} \]
    7. Step-by-step derivation
      1. *-commutative70.7%

        \[\leadsto x - \frac{\color{blue}{y \cdot a}}{t} \]
      2. associate-*r/72.7%

        \[\leadsto x - \color{blue}{y \cdot \frac{a}{t}} \]
    8. Simplified72.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.8 \cdot 10^{+17}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{-140}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+49}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 90.0% accurate, 0.6× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8e18 or 7.20000000000000003e205 < t

    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.0%

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

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

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

    if -8e18 < t < 7.20000000000000003e205

    1. Initial program 97.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 t around 0 94.7%

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

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

Alternative 10: 74.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+19} \lor \neg \left(z \leq 6.4 \cdot 10^{+22}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3e19 or 6.4e22 < z

    1. Initial program 94.6%

      \[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 73.9%

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

    if -3e19 < z < 6.4e22

    1. Initial program 99.2%

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

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

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

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

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

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

Alternative 11: 67.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.25e13 or 6.20000000000000022e24 < z

    1. Initial program 94.5%

      \[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 74.6%

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

    if -1.25e13 < z < 6.20000000000000022e24

    1. Initial program 99.2%

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

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

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

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

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

Alternative 12: 54.5% 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.3%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification58.0%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 99.7% 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 2024046 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

  :alt
  (- x (* (/ (- y z) (+ (- t z) 1.0)) a))

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