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

Percentage Accurate: 97.0% → 99.5%
Time: 12.9s
Alternatives: 17
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 17 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.0% 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 + \frac{a}{\frac{-1 + \left(z - t\right)}{y - z}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ x (/ a (/ (+ -1.0 (- z t)) (- y z)))))
double code(double x, double y, double z, double t, double a) {
	return x + (a / ((-1.0 + (z - t)) / (y - 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 / (((-1.0d0) + (z - t)) / (y - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (a / ((-1.0 + (z - t)) / (y - z)));
}
def code(x, y, z, t, a):
	return x + (a / ((-1.0 + (z - t)) / (y - z)))
function code(x, y, z, t, a)
	return Float64(x + Float64(a / Float64(Float64(-1.0 + Float64(z - t)) / Float64(y - z))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (a / ((-1.0 + (z - t)) / (y - z)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(a / N[(N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \frac{a}{\frac{-1 + \left(z - t\right)}{y - z}}
\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.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. Step-by-step derivation
    1. *-commutative99.9%

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

      \[\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. Final simplification99.9%

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

Alternative 2: 70.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \frac{a}{t}\\ \mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 7.3 \cdot 10^{-261}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{elif}\;t \leq 1650:\\ \;\;\;\;x - 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 -8.6e-13)
     t_1
     (if (<= t 7.3e-261) (- x (* a y)) (if (<= t 1650.0) (- x 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 <= -8.6e-13) {
		tmp = t_1;
	} else if (t <= 7.3e-261) {
		tmp = x - (a * y);
	} else if (t <= 1650.0) {
		tmp = x - 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 <= (-8.6d-13)) then
        tmp = t_1
    else if (t <= 7.3d-261) then
        tmp = x - (a * y)
    else if (t <= 1650.0d0) then
        tmp = x - 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 <= -8.6e-13) {
		tmp = t_1;
	} else if (t <= 7.3e-261) {
		tmp = x - (a * y);
	} else if (t <= 1650.0) {
		tmp = x - a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * (a / t))
	tmp = 0
	if t <= -8.6e-13:
		tmp = t_1
	elif t <= 7.3e-261:
		tmp = x - (a * y)
	elif t <= 1650.0:
		tmp = x - a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * Float64(a / t)))
	tmp = 0.0
	if (t <= -8.6e-13)
		tmp = t_1;
	elseif (t <= 7.3e-261)
		tmp = Float64(x - Float64(a * y));
	elseif (t <= 1650.0)
		tmp = Float64(x - 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 <= -8.6e-13)
		tmp = t_1;
	elseif (t <= 7.3e-261)
		tmp = x - (a * y);
	elseif (t <= 1650.0)
		tmp = x - a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-13], t$95$1, If[LessEqual[t, 7.3e-261], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1650.0], N[(x - a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a}{t}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1650:\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.5999999999999997e-13 or 1650 < t

    1. Initial program 97.2%

      \[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 y around inf 77.0%

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

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

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

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

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

    if -8.5999999999999997e-13 < t < 7.29999999999999974e-261

    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 y around inf 84.4%

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

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

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

    if 7.29999999999999974e-261 < t < 1650

    1. Initial program 95.7%

      \[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.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \mathbf{elif}\;t \leq 7.3 \cdot 10^{-261}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{elif}\;t \leq 1650:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{a}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 70.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - a \cdot \frac{y}{t}\\ \mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-263}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{elif}\;t \leq 2400:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* a (/ y t)))))
   (if (<= t -8.6e-13)
     t_1
     (if (<= t 3.4e-263) (- x (* a y)) (if (<= t 2400.0) (- x a) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (a * (y / t));
	double tmp;
	if (t <= -8.6e-13) {
		tmp = t_1;
	} else if (t <= 3.4e-263) {
		tmp = x - (a * y);
	} else if (t <= 2400.0) {
		tmp = x - 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 * (y / t))
    if (t <= (-8.6d-13)) then
        tmp = t_1
    else if (t <= 3.4d-263) then
        tmp = x - (a * y)
    else if (t <= 2400.0d0) then
        tmp = x - 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 * (y / t));
	double tmp;
	if (t <= -8.6e-13) {
		tmp = t_1;
	} else if (t <= 3.4e-263) {
		tmp = x - (a * y);
	} else if (t <= 2400.0) {
		tmp = x - a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (a * (y / t))
	tmp = 0
	if t <= -8.6e-13:
		tmp = t_1
	elif t <= 3.4e-263:
		tmp = x - (a * y)
	elif t <= 2400.0:
		tmp = x - a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(a * Float64(y / t)))
	tmp = 0.0
	if (t <= -8.6e-13)
		tmp = t_1;
	elseif (t <= 3.4e-263)
		tmp = Float64(x - Float64(a * y));
	elseif (t <= 2400.0)
		tmp = Float64(x - a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (a * (y / t));
	tmp = 0.0;
	if (t <= -8.6e-13)
		tmp = t_1;
	elseif (t <= 3.4e-263)
		tmp = x - (a * y);
	elseif (t <= 2400.0)
		tmp = x - 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[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-13], t$95$1, If[LessEqual[t, 3.4e-263], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2400.0], N[(x - a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 97.2%

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

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

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

    if -8.5999999999999997e-13 < t < 3.40000000000000004e-263

    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 y around inf 84.4%

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

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

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

    if 3.40000000000000004e-263 < t < 2400

    1. Initial program 95.7%

      \[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.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 3.4 \cdot 10^{-263}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{elif}\;t \leq 2400:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 70.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\

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

\mathbf{elif}\;t \leq 1450:\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.5999999999999997e-13

    1. Initial program 95.8%

      \[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 inf 77.7%

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

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

    if -8.5999999999999997e-13 < t < 2.15e-268

    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 y around inf 84.4%

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

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

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

    if 2.15e-268 < t < 1450

    1. Initial program 95.7%

      \[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.6%

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

    if 1450 < t

    1. Initial program 98.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.0%

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

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

        \[\leadsto x - \color{blue}{a \cdot \frac{y}{t}} \]
      2. clear-num87.4%

        \[\leadsto x - a \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      3. un-div-inv87.4%

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    8. Applied egg-rr87.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;x - a \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-268}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{elif}\;t \leq 1450:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \frac{a}{\frac{t}{y}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 89.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.0001 \lor \neg \left(y \leq 2 \cdot 10^{-11}\right):\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.00000000000000005e-4 or 1.99999999999999988e-11 < y

    1. Initial program 97.2%

      \[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 y around inf 91.7%

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

    if -1.00000000000000005e-4 < y < 1.99999999999999988e-11

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{z}{\color{blue}{-1 - \left(t - z\right)}} \cdot a \]
      9. associate--r-96.7%

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

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

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

Alternative 6: 89.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00051 \lor \neg \left(y \leq 1.45 \cdot 10^{-11}\right):\\
\;\;\;\;x - a \cdot \frac{y}{\left(t + 1\right) - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.1e-4 or 1.45e-11 < y

    1. Initial program 97.2%

      \[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 y around inf 91.7%

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

    if -5.1e-4 < y < 1.45e-11

    1. Initial program 97.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. Step-by-step derivation
      1. *-commutative99.9%

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

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

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

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

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

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

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

        \[\leadsto x - \frac{a}{-\left(\frac{1 + t}{z} - \color{blue}{1}\right)} \]
    9. Simplified96.8%

      \[\leadsto x - \frac{a}{\color{blue}{-\left(\frac{1 + t}{z} - 1\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.9%

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

Alternative 7: 87.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+98}:\\
\;\;\;\;x + \frac{a}{-1 + \frac{t}{z}}\\

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

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


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

    1. Initial program 90.8%

      \[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. Step-by-step derivation
      1. *-commutative100.0%

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

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

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

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

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

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

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

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

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

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

    if -3.10000000000000019e98 < z < 1.06e86

    1. Initial program 98.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 y around inf 92.5%

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

    if 1.06e86 < z

    1. Initial program 97.8%

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

      \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-1 \cdot z}}{a}} \]
    4. Step-by-step derivation
      1. mul-1-neg94.8%

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

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

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

Alternative 8: 84.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+85} \lor \neg \left(z \leq 2.6 \cdot 10^{+82}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.4999999999999994e85 or 2.5999999999999998e82 < 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 82.3%

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

    if -8.4999999999999994e85 < z < 2.5999999999999998e82

    1. Initial program 98.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 0 87.0%

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

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

Alternative 9: 89.0% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5e12 or 3.9e6 < 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/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 86.2%

      \[\leadsto x - \frac{y - z}{\color{blue}{-1 \cdot z}} \cdot a \]
    6. Step-by-step derivation
      1. mul-1-neg86.2%

        \[\leadsto x - \frac{y - z}{\color{blue}{-z}} \cdot a \]
    7. Simplified86.2%

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

      \[\leadsto x - \color{blue}{\frac{z + -1 \cdot y}{z}} \cdot a \]
    9. Step-by-step derivation
      1. neg-mul-186.2%

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

        \[\leadsto x - \frac{\color{blue}{z - y}}{z} \cdot a \]
    10. Simplified86.2%

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

    if -8.5e12 < z < 3.9e6

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

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

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

Alternative 10: 76.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+18}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.05e18

    1. Initial program 95.1%

      \[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 inf 84.0%

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

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

    if -1.05e18 < t < 8e3

    1. Initial program 97.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 y around inf 76.2%

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

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

        \[\leadsto x - \color{blue}{\frac{a}{1 - z} \cdot y} \]
      2. *-commutative78.3%

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

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

    if 8e3 < t

    1. Initial program 98.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.0%

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

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

        \[\leadsto x - \color{blue}{a \cdot \frac{y}{t}} \]
      2. clear-num87.4%

        \[\leadsto x - a \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      3. un-div-inv87.4%

        \[\leadsto x - \color{blue}{\frac{a}{\frac{t}{y}}} \]
    8. Applied egg-rr87.4%

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

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

Alternative 11: 89.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -68000000000:\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\

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

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


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

    1. Initial program 93.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 inf 87.8%

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

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

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

      \[\leadsto x - \color{blue}{\frac{z + -1 \cdot y}{z}} \cdot a \]
    9. Step-by-step derivation
      1. neg-mul-187.8%

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

        \[\leadsto x - \frac{\color{blue}{z - y}}{z} \cdot a \]
    10. Simplified87.8%

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

    if -6.8e10 < z < 5e7

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

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

    if 5e7 < z

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{z + -1 \cdot y}{z}} \cdot a \]
    9. Step-by-step derivation
      1. neg-mul-184.7%

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

        \[\leadsto x - \frac{\color{blue}{z - y}}{z} \cdot a \]
    10. Simplified84.7%

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

        \[\leadsto x - \color{blue}{a \cdot \frac{z - y}{z}} \]
      2. clear-num84.7%

        \[\leadsto x - a \cdot \color{blue}{\frac{1}{\frac{z}{z - y}}} \]
      3. un-div-inv84.7%

        \[\leadsto x - \color{blue}{\frac{a}{\frac{z}{z - y}}} \]
    12. Applied egg-rr84.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -68000000000:\\ \;\;\;\;x + a \cdot \frac{y - z}{z}\\ \mathbf{elif}\;z \leq 50000000:\\ \;\;\;\;x + a \cdot \frac{y}{-1 - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{a}{\frac{z}{y - z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 87.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -47000000:\\
\;\;\;\;x + a \cdot \frac{y - z}{z}\\

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

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


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

    1. Initial program 93.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 inf 87.8%

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

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

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

      \[\leadsto x - \color{blue}{\frac{z + -1 \cdot y}{z}} \cdot a \]
    9. Step-by-step derivation
      1. neg-mul-187.8%

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

        \[\leadsto x - \frac{\color{blue}{z - y}}{z} \cdot a \]
    10. Simplified87.8%

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

    if -4.7e7 < z < 7.0000000000000003e78

    1. Initial program 98.6%

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

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

    if 7.0000000000000003e78 < z

    1. Initial program 97.8%

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

      \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-1 \cdot z}}{a}} \]
    4. Step-by-step derivation
      1. mul-1-neg94.8%

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

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

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

Alternative 13: 72.3% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.2000000000000004e-23 or 4.5000000000000002e-49 < z

    1. Initial program 95.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. Taylor expanded in z around inf 71.1%

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

    if -9.2000000000000004e-23 < z < 4.5000000000000002e-49

    1. Initial program 99.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 y around inf 95.7%

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

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

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

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

Alternative 14: 99.6% accurate, 1.0× speedup?

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

\\
x + a \cdot \frac{y - z}{-1 + \left(z - t\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.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(z - t\right)} \]
  6. Add Preprocessing

Alternative 15: 59.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+239}:\\
\;\;\;\;a \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.5000000000000008e239

    1. Initial program 99.9%

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

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

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

      \[\leadsto x - \frac{y - z}{\color{blue}{-1 \cdot z}} \cdot a \]
    6. Step-by-step derivation
      1. mul-1-neg67.2%

        \[\leadsto x - \frac{y - z}{\color{blue}{-z}} \cdot a \]
    7. Simplified67.2%

      \[\leadsto x - \frac{y - z}{\color{blue}{-z}} \cdot a \]
    8. Taylor expanded in y around inf 40.4%

      \[\leadsto \color{blue}{\frac{a \cdot y}{z}} \]
    9. Step-by-step derivation
      1. associate-/l*53.3%

        \[\leadsto \color{blue}{a \cdot \frac{y}{z}} \]
    10. Simplified53.3%

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

    if -9.5000000000000008e239 < y

    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. Taylor expanded in z around inf 65.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+239}:\\ \;\;\;\;a \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 61.0% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.7 \cdot 10^{+116}:\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.7e116

    1. Initial program 97.2%

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

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

    if 2.7e116 < t

    1. Initial program 97.8%

      \[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 z around inf 45.0%

      \[\leadsto x - \frac{y - z}{\color{blue}{-1 \cdot z}} \cdot a \]
    6. Step-by-step derivation
      1. mul-1-neg45.0%

        \[\leadsto x - \frac{y - z}{\color{blue}{-z}} \cdot a \]
    7. Simplified45.0%

      \[\leadsto x - \frac{y - z}{\color{blue}{-z}} \cdot a \]
    8. Taylor expanded in x around inf 66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.7 \cdot 10^{+116}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 53.2% 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.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 59.1%

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

      \[\leadsto x - \frac{y - z}{\color{blue}{-z}} \cdot a \]
  7. Simplified59.1%

    \[\leadsto x - \frac{y - z}{\color{blue}{-z}} \cdot a \]
  8. Taylor expanded in x around inf 54.5%

    \[\leadsto \color{blue}{x} \]
  9. Final simplification54.5%

    \[\leadsto x \]
  10. Add Preprocessing

Developer target: 99.6% 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 2024096 
(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))))