Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A

Percentage Accurate: 85.7% → 99.6%
Time: 12.3s
Alternatives: 14
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 85.7% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(z - t\right)\\ t_2 := \frac{t\_1}{z - a}\\ \mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+276}\right):\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t\_1}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- z t))) (t_2 (/ t_1 (- z a))))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+276)))
     (+ x (* (- z t) (/ y (- z a))))
     (- x (/ t_1 (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double t_2 = t_1 / (z - a);
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+276)) {
		tmp = x + ((z - t) * (y / (z - a)));
	} else {
		tmp = x - (t_1 / (a - z));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double t_2 = t_1 / (z - a);
	double tmp;
	if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+276)) {
		tmp = x + ((z - t) * (y / (z - a)));
	} else {
		tmp = x - (t_1 / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z - t)
	t_2 = t_1 / (z - a)
	tmp = 0
	if (t_2 <= -math.inf) or not (t_2 <= 1e+276):
		tmp = x + ((z - t) * (y / (z - a)))
	else:
		tmp = x - (t_1 / (a - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z - t))
	t_2 = Float64(t_1 / Float64(z - a))
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+276))
		tmp = Float64(x + Float64(Float64(z - t) * Float64(y / Float64(z - a))));
	else
		tmp = Float64(x - Float64(t_1 / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z - t);
	t_2 = t_1 / (z - a);
	tmp = 0.0;
	if ((t_2 <= -Inf) || ~((t_2 <= 1e+276)))
		tmp = x + ((z - t) * (y / (z - a)));
	else
		tmp = x - (t_1 / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+276]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t$95$1 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 1.0000000000000001e276 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 35.8%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a}} + x \]
      3. fma-define99.8%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. fma-undefine99.9%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.0000000000000001e276

    1. Initial program 99.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.6%

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

Alternative 2: 98.1% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
	return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a)
	return fma(y, Float64(Float64(z - t) / Float64(z - a)), x)
end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Derivation
  1. Initial program 84.6%

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

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

      \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a}} + x \]
    3. fma-define99.5%

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
  4. Add Preprocessing
  5. Final simplification99.5%

    \[\leadsto \mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right) \]
  6. Add Preprocessing

Alternative 3: 96.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(z - t\right)\\ t_2 := \frac{t\_1}{z - a}\\ \mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+276}\right):\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{t\_1}{a - z}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (- z t))) (t_2 (/ t_1 (- z a))))
   (if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+276)))
     (* (- z t) (/ y (- z a)))
     (- x (/ t_1 (- a z))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double t_2 = t_1 / (z - a);
	double tmp;
	if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+276)) {
		tmp = (z - t) * (y / (z - a));
	} else {
		tmp = x - (t_1 / (a - z));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z - t);
	double t_2 = t_1 / (z - a);
	double tmp;
	if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+276)) {
		tmp = (z - t) * (y / (z - a));
	} else {
		tmp = x - (t_1 / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z - t)
	t_2 = t_1 / (z - a)
	tmp = 0
	if (t_2 <= -math.inf) or not (t_2 <= 1e+276):
		tmp = (z - t) * (y / (z - a))
	else:
		tmp = x - (t_1 / (a - z))
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z - t))
	t_2 = Float64(t_1 / Float64(z - a))
	tmp = 0.0
	if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+276))
		tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a)));
	else
		tmp = Float64(x - Float64(t_1 / Float64(a - z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z - t);
	t_2 = t_1 / (z - a);
	tmp = 0.0;
	if ((t_2 <= -Inf) || ~((t_2 <= 1e+276)))
		tmp = (z - t) * (y / (z - a));
	else
		tmp = x - (t_1 / (a - z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+276]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t$95$1 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
t_2 := \frac{t\_1}{z - a}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+276}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 1.0000000000000001e276 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

    1. Initial program 35.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} \]
    5. Applied egg-rr86.3%

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.0000000000000001e276

    1. Initial program 99.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification96.4%

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

Alternative 4: 80.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -1 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.9 \cdot 10^{-80}:\\ \;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\ \mathbf{elif}\;z \leq -2.1 \cdot 10^{-106}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{-23}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ z (- z a))))))
   (if (<= z -1e-9)
     t_1
     (if (<= z -2.9e-80)
       (* (- z t) (/ y (- z a)))
       (if (<= z -2.1e-106)
         (+ y x)
         (if (<= z 7.6e-23) (+ x (* y (/ t a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (z / (z - a)));
	double tmp;
	if (z <= -1e-9) {
		tmp = t_1;
	} else if (z <= -2.9e-80) {
		tmp = (z - t) * (y / (z - a));
	} else if (z <= -2.1e-106) {
		tmp = y + x;
	} else if (z <= 7.6e-23) {
		tmp = x + (y * (t / 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 * (z / (z - a)))
    if (z <= (-1d-9)) then
        tmp = t_1
    else if (z <= (-2.9d-80)) then
        tmp = (z - t) * (y / (z - a))
    else if (z <= (-2.1d-106)) then
        tmp = y + x
    else if (z <= 7.6d-23) then
        tmp = x + (y * (t / 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 * (z / (z - a)));
	double tmp;
	if (z <= -1e-9) {
		tmp = t_1;
	} else if (z <= -2.9e-80) {
		tmp = (z - t) * (y / (z - a));
	} else if (z <= -2.1e-106) {
		tmp = y + x;
	} else if (z <= 7.6e-23) {
		tmp = x + (y * (t / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (z / (z - a)))
	tmp = 0
	if z <= -1e-9:
		tmp = t_1
	elif z <= -2.9e-80:
		tmp = (z - t) * (y / (z - a))
	elif z <= -2.1e-106:
		tmp = y + x
	elif z <= 7.6e-23:
		tmp = x + (y * (t / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(z / Float64(z - a))))
	tmp = 0.0
	if (z <= -1e-9)
		tmp = t_1;
	elseif (z <= -2.9e-80)
		tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a)));
	elseif (z <= -2.1e-106)
		tmp = Float64(y + x);
	elseif (z <= 7.6e-23)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (z / (z - a)));
	tmp = 0.0;
	if (z <= -1e-9)
		tmp = t_1;
	elseif (z <= -2.9e-80)
		tmp = (z - t) * (y / (z - a));
	elseif (z <= -2.1e-106)
		tmp = y + x;
	elseif (z <= 7.6e-23)
		tmp = x + (y * (t / 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[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1e-9], t$95$1, If[LessEqual[z, -2.9e-80], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.1e-106], N[(y + x), $MachinePrecision], If[LessEqual[z, 7.6e-23], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -2.9 \cdot 10^{-80}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\

\mathbf{elif}\;z \leq -2.1 \cdot 10^{-106}:\\
\;\;\;\;y + x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.00000000000000006e-9 or 7.60000000000000023e-23 < z

    1. Initial program 76.4%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{z - a}} \]
    4. Step-by-step derivation
      1. +-commutative69.2%

        \[\leadsto \color{blue}{\frac{y \cdot z}{z - a} + x} \]
      2. associate-/l*88.2%

        \[\leadsto \color{blue}{y \cdot \frac{z}{z - a}} + x \]
    5. Simplified88.2%

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

    if -1.00000000000000006e-9 < z < -2.89999999999999998e-80

    1. Initial program 96.1%

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}} \]
    4. Step-by-step derivation
      1. *-commutative84.1%

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

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

        \[\leadsto \color{blue}{\frac{y}{z - a} \cdot \left(z - t\right)} \]
    5. Applied egg-rr84.1%

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

    if -2.89999999999999998e-80 < z < -2.10000000000000003e-106

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative100.0%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified100.0%

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

    if -2.10000000000000003e-106 < z < 7.60000000000000023e-23

    1. Initial program 93.8%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative93.8%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \left(z - t\right), \frac{1}{z - a}, x\right)} \]
    4. Applied egg-rr93.8%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    7. Simplified87.1%

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

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

Alternative 5: 62.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq -2.4 \cdot 10^{+156}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

\mathbf{elif}\;y \leq -1.45 \cdot 10^{+109} \lor \neg \left(y \leq 9.4 \cdot 10^{+182}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.1999999999999999e209 or -2.4000000000000001e156 < y < -1.45e109 or 9.39999999999999966e182 < y

    1. Initial program 59.2%

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}} \]
    4. Taylor expanded in a around 0 28.3%

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z}} \]
    5. Step-by-step derivation
      1. associate-/l*59.9%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub60.0%

        \[\leadsto y \cdot \color{blue}{\left(\frac{z}{z} - \frac{t}{z}\right)} \]
      3. *-inverses60.0%

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

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

    if -3.1999999999999999e209 < y < -2.4000000000000001e156

    1. Initial program 76.1%

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}} \]
    4. Taylor expanded in z around 0 51.4%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified67.2%

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

    if -1.45e109 < y < 9.39999999999999966e182

    1. Initial program 92.8%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative70.0%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified70.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+209}:\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{elif}\;y \leq -2.4 \cdot 10^{+156}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq -1.45 \cdot 10^{+109} \lor \neg \left(y \leq 9.4 \cdot 10^{+182}\right):\\ \;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 85.0% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.9e35 or 1.60000000000000007e37 < z

    1. Initial program 71.7%

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

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{z - a} + x} \]
      2. associate-/l*92.2%

        \[\leadsto \color{blue}{y \cdot \frac{z}{z - a}} + x \]
    5. Simplified92.2%

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

    if -1.9e35 < z < 1.12e-178

    1. Initial program 96.0%

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

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

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

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

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

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

    if 1.12e-178 < z < 1.60000000000000007e37

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + t \cdot \frac{y}{\left(-z\right) + \left(-\color{blue}{\left(-a\right)}\right)} \]
      9. remove-double-neg91.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+35}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 1.12 \cdot 10^{-178}:\\ \;\;\;\;x + y \cdot \frac{t - z}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+37}:\\ \;\;\;\;x + t \cdot \frac{y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 81.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-24} \lor \neg \left(z \leq 3.2 \cdot 10^{-40}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{t}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.99999999999999995e-24 or 3.20000000000000002e-40 < z

    1. Initial program 77.2%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{z}} \]
    4. Step-by-step derivation
      1. associate-/l*38.7%

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z}} \]
      2. div-sub38.7%

        \[\leadsto y \cdot \color{blue}{\left(\frac{z}{z} - \frac{t}{z}\right)} \]
      3. *-inverses38.7%

        \[\leadsto y \cdot \left(\color{blue}{1} - \frac{t}{z}\right) \]
    5. Simplified84.7%

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

    if -2.99999999999999995e-24 < z < 3.20000000000000002e-40

    1. Initial program 94.2%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative94.2%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \left(z - t\right), \frac{1}{z - a}, x\right)} \]
    4. Applied egg-rr94.1%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    7. Simplified84.1%

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

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

Alternative 8: 82.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+35} \lor \neg \left(z \leq 1.3 \cdot 10^{-31}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.50000000000000001e35 or 1.29999999999999998e-31 < z

    1. Initial program 75.5%

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

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

        \[\leadsto \color{blue}{\frac{y \cdot z}{z - a} + x} \]
      2. associate-/l*89.6%

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

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

    if -5.50000000000000001e35 < z < 1.29999999999999998e-31

    1. Initial program 94.0%

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

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

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

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

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

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

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

Alternative 9: 77.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.65 \cdot 10^{+38} \lor \neg \left(z \leq 4 \cdot 10^{+14}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.65e38 or 4e14 < z

    1. Initial program 73.3%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative82.2%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified82.2%

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

    if -1.65e38 < z < 4e14

    1. Initial program 94.5%

      \[x + \frac{y \cdot \left(z - t\right)}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutative94.5%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot \left(z - t\right), \frac{1}{z - a}, x\right)} \]
    4. Applied egg-rr94.5%

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
    7. Simplified79.9%

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

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

Alternative 10: 57.7% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{-113} \lor \neg \left(x \leq 3.2 \cdot 10^{-165}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.8000000000000005e-113 or 3.20000000000000013e-165 < x

    1. Initial program 83.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative72.7%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified72.7%

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

    if -6.8000000000000005e-113 < x < 3.20000000000000013e-165

    1. Initial program 88.9%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{z - a}} + x \]
      3. fma-define99.7%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num99.7%

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

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{{\left(\frac{z - a}{z - t}\right)}^{-1}}, x\right) \]
    6. Applied egg-rr99.7%

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{{\left(\frac{z - a}{z - t}\right)}^{-1}}, x\right) \]
    7. Step-by-step derivation
      1. unpow-199.7%

        \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{1}{\frac{z - a}{z - t}}}, x\right) \]
    8. Applied egg-rr99.7%

      \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{1}{\frac{z - a}{z - t}}}, x\right) \]
    9. Taylor expanded in t around inf 54.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z - a}} \]
    10. Step-by-step derivation
      1. mul-1-neg54.9%

        \[\leadsto \color{blue}{-\frac{t \cdot y}{z - a}} \]
      2. associate-/l*45.9%

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z - a}} \]
      3. distribute-lft-neg-in45.9%

        \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{y}{z - a}} \]
    11. Simplified45.9%

      \[\leadsto \color{blue}{\left(-t\right) \cdot \frac{y}{z - a}} \]
    12. Taylor expanded in z around 0 41.5%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    13. Step-by-step derivation
      1. *-commutative41.5%

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a}} \]
    14. Simplified41.6%

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

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

Alternative 11: 52.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+70}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 2.06 \cdot 10^{+108}:\\
\;\;\;\;x\\

\mathbf{else}:\\
\;\;\;\;y\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.00000000000000005e70 or 2.06000000000000009e108 < y

    1. Initial program 65.6%

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}} \]
    4. Taylor expanded in z around inf 34.7%

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

    if -7.00000000000000005e70 < y < 2.06000000000000009e108

    1. Initial program 94.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7 \cdot 10^{+70}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 2.06 \cdot 10^{+108}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 60.5% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.50000000000000011e244

    1. Initial program 64.3%

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

      \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{z - a}} \]
    4. Taylor expanded in z around 0 51.6%

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    6. Simplified52.7%

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

    if -6.50000000000000011e244 < t

    1. Initial program 85.9%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative62.8%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified62.8%

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

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

Alternative 13: 60.2% accurate, 3.7× speedup?

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

\\
y + x
\end{array}
Derivation
  1. Initial program 84.6%

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

    \[\leadsto \color{blue}{x + y} \]
  4. Step-by-step derivation
    1. +-commutative60.4%

      \[\leadsto \color{blue}{y + x} \]
  5. Simplified60.4%

    \[\leadsto \color{blue}{y + x} \]
  6. Final simplification60.4%

    \[\leadsto y + x \]
  7. Add Preprocessing

Alternative 14: 50.9% accurate, 11.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 84.6%

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

    \[\leadsto \color{blue}{x} \]
  4. Final simplification48.0%

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 98.3% accurate, 1.0× speedup?

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

\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}

Reproduce

?
herbie shell --seed 2024039 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- z a) (- z t))))

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