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

Percentage Accurate: 97.9% → 98.2%
Time: 9.2s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{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 11 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.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 98.2% 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}
Derivation
  1. Initial program 98.8%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-num98.8%

      \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
    2. un-div-inv99.0%

      \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
  4. Applied egg-rr99.0%

    \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
  5. Add Preprocessing

Alternative 2: 76.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+160}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+33}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.2000000000000001e160 or 2.5999999999999997e33 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified84.6%

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

    if -5.2000000000000001e160 < z < -7.1999999999999996e-13

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{z}} \]
      3. associate-/l*75.9%

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified75.9%

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

    if -7.1999999999999996e-13 < z < 2.5999999999999997e33

    1. Initial program 97.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+160}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-13}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+33}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 87.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6e8 or 7.9999999999999997e-75 < t

    1. Initial program 97.9%

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

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

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

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

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

    if -6e8 < t < 7.9999999999999997e-75

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
    4. Applied egg-rr99.9%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
      3. div-sub92.7%

        \[\leadsto x + \frac{y}{\color{blue}{\frac{z}{z} - \frac{a}{z}}} \]
      4. *-inverses92.7%

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

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

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

Alternative 4: 85.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+160} \lor \neg \left(z \leq 9.5 \cdot 10^{+68}\right):\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.2000000000000001e160 or 9.50000000000000069e68 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
    4. Applied egg-rr100.0%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z}}} \]
      3. div-sub95.3%

        \[\leadsto x + \frac{y}{\color{blue}{\frac{z}{z} - \frac{a}{z}}} \]
      4. *-inverses95.3%

        \[\leadsto x + \frac{y}{\color{blue}{1} - \frac{a}{z}} \]
    7. Simplified95.3%

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

    if -5.2000000000000001e160 < z < 9.50000000000000069e68

    1. Initial program 98.3%

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out85.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{1} \cdot \frac{-t}{z - a}} \]
      7. /-rgt-identity88.6%

        \[\leadsto x + \color{blue}{y} \cdot \frac{-t}{z - a} \]
      8. distribute-neg-frac88.6%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 84.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.7999999999999998e160 or 4.80000000000000004e67 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. clear-num99.9%

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{z - a}{z - t}}} \]
    4. Applied egg-rr100.0%

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

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

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

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

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

    if -5.7999999999999998e160 < z < 4.80000000000000004e67

    1. Initial program 98.3%

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

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z - a} \]
      3. distribute-lft-neg-out85.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{1} \cdot \frac{-t}{z - a}} \]
      7. /-rgt-identity88.6%

        \[\leadsto x + \color{blue}{y} \cdot \frac{-t}{z - a} \]
      8. distribute-neg-frac88.6%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 83.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.8 \cdot 10^{+160} \lor \neg \left(z \leq 8.8 \cdot 10^{+75}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.80000000000000061e160 or 8.80000000000000048e75 < z

    1. Initial program 99.9%

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

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

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

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

    if -6.80000000000000061e160 < z < 8.80000000000000048e75

    1. Initial program 98.4%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{1} \cdot \frac{-t}{z - a}} \]
      7. /-rgt-identity88.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 75.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+154} \lor \neg \left(z \leq 5 \cdot 10^{+32}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7500000000000001e154 or 4.9999999999999997e32 < z

    1. Initial program 99.9%

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

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

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

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

    if -1.7500000000000001e154 < z < 4.9999999999999997e32

    1. Initial program 98.3%

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

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

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

Alternative 8: 62.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-55} \lor \neg \left(z \leq 3.3 \cdot 10^{+72}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.3000000000000001e-55 or 3.3e72 < z

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified78.1%

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

    if -4.3000000000000001e-55 < z < 3.3e72

    1. Initial program 97.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-55} \lor \neg \left(z \leq 3.3 \cdot 10^{+72}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 52.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;y \leq 2.7 \cdot 10^{+222}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.75e173 or 2.70000000000000013e222 < y

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified33.3%

      \[\leadsto \color{blue}{y + x} \]
    6. Taylor expanded in y around inf 33.3%

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

    if -1.75e173 < y < 2.70000000000000013e222

    1. Initial program 98.5%

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

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

Alternative 10: 97.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + y \cdot \frac{z - t}{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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + y \cdot \frac{z - t}{z - a}
\end{array}
Derivation
  1. Initial program 98.8%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 11: 49.6% 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 98.8%

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

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

Developer Target 1: 98.2% 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 2024170 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
  :precision binary64

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

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