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

Percentage Accurate: 98.4% → 98.4%
Time: 9.8s
Alternatives: 14
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 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: 98.4% 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.4% 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 98.8%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Step-by-step derivation
    1. +-commutative98.8%

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

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

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

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

Alternative 2: 76.2% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.02 \cdot 10^{-14} \lor \neg \left(z \leq 8.4 \cdot 10^{+58}\right) \land z \leq 7 \cdot 10^{+125}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.7999999999999998e142 or 1.02e-14 < z < 8.40000000000000048e58 or 7.00000000000000023e125 < z

    1. Initial program 100.0%

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

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

    if -4.7999999999999998e142 < z < -1.30000000000000005e-38

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified90.1%

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

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

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

        \[\leadsto \frac{y}{\frac{\color{blue}{-z}}{t}} + x \]
    7. Simplified80.3%

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot t}{z}} \]
      2. metadata-eval77.9%

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

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

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

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

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

    if -1.30000000000000005e-38 < z < 1.02e-14 or 8.40000000000000048e58 < z < 7.00000000000000023e125

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+142}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{-38}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{-14} \lor \neg \left(z \leq 8.4 \cdot 10^{+58}\right) \land z \leq 7 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 3: 76.3% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;z \leq 1.75 \cdot 10^{-12} \lor \neg \left(z \leq 4.5 \cdot 10^{+57}\right) \land z \leq 7 \cdot 10^{+125}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.20000000000000043e142 or 1.75e-12 < z < 4.49999999999999996e57 or 7.00000000000000023e125 < z

    1. Initial program 100.0%

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

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

    if -5.20000000000000043e142 < z < -2.69999999999999981e-32

    1. Initial program 99.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified90.1%

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

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

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

        \[\leadsto \frac{y}{\frac{\color{blue}{-z}}{t}} + x \]
    7. Simplified80.3%

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot t}{z}} \]
      2. metadata-eval77.9%

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{t}{z}} \]
      6. associate-*r/77.9%

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{z}{t}}} \]
    10. Simplified80.3%

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

    if -2.69999999999999981e-32 < z < 1.75e-12 or 4.49999999999999996e57 < z < 7.00000000000000023e125

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+142}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq -2.7 \cdot 10^{-32}:\\ \;\;\;\;x - \frac{y}{\frac{z}{t}}\\ \mathbf{elif}\;z \leq 1.75 \cdot 10^{-12} \lor \neg \left(z \leq 4.5 \cdot 10^{+57}\right) \land z \leq 7 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 4: 81.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - t}{z}\\ \mathbf{if}\;z \leq -2.6 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-133}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-48}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 6.5128 \cdot 10^{-45}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z t) z)))))
   (if (<= z -2.6e-47)
     t_1
     (if (<= z 5.8e-133)
       (+ x (* y (/ t a)))
       (if (<= z 1.65e-48)
         (+ x (* y (/ z (- z a))))
         (if (<= z 6.5128e-45) (+ x (* t (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -2.6e-47) {
		tmp = t_1;
	} else if (z <= 5.8e-133) {
		tmp = x + (y * (t / a));
	} else if (z <= 1.65e-48) {
		tmp = x + (y * (z / (z - a)));
	} else if (z <= 6.5128e-45) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * ((z - t) / z))
    if (z <= (-2.6d-47)) then
        tmp = t_1
    else if (z <= 5.8d-133) then
        tmp = x + (y * (t / a))
    else if (z <= 1.65d-48) then
        tmp = x + (y * (z / (z - a)))
    else if (z <= 6.5128d-45) then
        tmp = x + (t * (y / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - t) / z));
	double tmp;
	if (z <= -2.6e-47) {
		tmp = t_1;
	} else if (z <= 5.8e-133) {
		tmp = x + (y * (t / a));
	} else if (z <= 1.65e-48) {
		tmp = x + (y * (z / (z - a)));
	} else if (z <= 6.5128e-45) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - t) / z))
	tmp = 0
	if z <= -2.6e-47:
		tmp = t_1
	elif z <= 5.8e-133:
		tmp = x + (y * (t / a))
	elif z <= 1.65e-48:
		tmp = x + (y * (z / (z - a)))
	elif z <= 6.5128e-45:
		tmp = x + (t * (y / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / z)))
	tmp = 0.0
	if (z <= -2.6e-47)
		tmp = t_1;
	elseif (z <= 5.8e-133)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 1.65e-48)
		tmp = Float64(x + Float64(y * Float64(z / Float64(z - a))));
	elseif (z <= 6.5128e-45)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - t) / z));
	tmp = 0.0;
	if (z <= -2.6e-47)
		tmp = t_1;
	elseif (z <= 5.8e-133)
		tmp = x + (y * (t / a));
	elseif (z <= 1.65e-48)
		tmp = x + (y * (z / (z - a)));
	elseif (z <= 6.5128e-45)
		tmp = x + (t * (y / 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[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e-47], t$95$1, If[LessEqual[z, 5.8e-133], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-48], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5128e-45], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{-48}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.6e-47 or 6.5128000000000001e-45 < z

    1. Initial program 99.9%

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

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

    if -2.6e-47 < z < 5.7999999999999997e-133

    1. Initial program 97.7%

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

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

    if 5.7999999999999997e-133 < z < 1.65e-48

    1. Initial program 95.5%

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

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

    if 1.65e-48 < z < 6.5128000000000001e-45

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{\frac{y \cdot t}{a} + x} \]
    3. Step-by-step derivation
      1. div-inv79.1%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y}{a}} + x \]
    4. Applied egg-rr79.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{-47}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-133}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-48}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 6.5128 \cdot 10^{-45}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]

Alternative 5: 81.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{if}\;z \leq -3.7 \cdot 10^{-47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-135}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-47}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 6.5128 \cdot 10^{-45}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (/ y (/ z (- z t))))))
   (if (<= z -3.7e-47)
     t_1
     (if (<= z 9.2e-135)
       (+ x (* y (/ t a)))
       (if (<= z 1.55e-47)
         (+ x (* y (/ z (- z a))))
         (if (<= z 6.5128e-45) (+ x (* t (/ y a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (z / (z - t)));
	double tmp;
	if (z <= -3.7e-47) {
		tmp = t_1;
	} else if (z <= 9.2e-135) {
		tmp = x + (y * (t / a));
	} else if (z <= 1.55e-47) {
		tmp = x + (y * (z / (z - a)));
	} else if (z <= 6.5128e-45) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y / (z / (z - t)))
    if (z <= (-3.7d-47)) then
        tmp = t_1
    else if (z <= 9.2d-135) then
        tmp = x + (y * (t / a))
    else if (z <= 1.55d-47) then
        tmp = x + (y * (z / (z - a)))
    else if (z <= 6.5128d-45) then
        tmp = x + (t * (y / a))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y / (z / (z - t)));
	double tmp;
	if (z <= -3.7e-47) {
		tmp = t_1;
	} else if (z <= 9.2e-135) {
		tmp = x + (y * (t / a));
	} else if (z <= 1.55e-47) {
		tmp = x + (y * (z / (z - a)));
	} else if (z <= 6.5128e-45) {
		tmp = x + (t * (y / a));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y / (z / (z - t)))
	tmp = 0
	if z <= -3.7e-47:
		tmp = t_1
	elif z <= 9.2e-135:
		tmp = x + (y * (t / a))
	elif z <= 1.55e-47:
		tmp = x + (y * (z / (z - a)))
	elif z <= 6.5128e-45:
		tmp = x + (t * (y / a))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y / Float64(z / Float64(z - t))))
	tmp = 0.0
	if (z <= -3.7e-47)
		tmp = t_1;
	elseif (z <= 9.2e-135)
		tmp = Float64(x + Float64(y * Float64(t / a)));
	elseif (z <= 1.55e-47)
		tmp = Float64(x + Float64(y * Float64(z / Float64(z - a))));
	elseif (z <= 6.5128e-45)
		tmp = Float64(x + Float64(t * Float64(y / a)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y / (z / (z - t)));
	tmp = 0.0;
	if (z <= -3.7e-47)
		tmp = t_1;
	elseif (z <= 9.2e-135)
		tmp = x + (y * (t / a));
	elseif (z <= 1.55e-47)
		tmp = x + (y * (z / (z - a)));
	elseif (z <= 6.5128e-45)
		tmp = x + (t * (y / 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 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e-47], t$95$1, If[LessEqual[z, 9.2e-135], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-47], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5128e-45], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{-47}:\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.7e-47 or 6.5128000000000001e-45 < z

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified89.7%

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

    if -3.7e-47 < z < 9.1999999999999996e-135

    1. Initial program 97.7%

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

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

    if 9.1999999999999996e-135 < z < 1.5499999999999999e-47

    1. Initial program 95.5%

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

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

    if 1.5499999999999999e-47 < z < 6.5128000000000001e-45

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{\frac{y \cdot t}{a} + x} \]
    3. Step-by-step derivation
      1. div-inv79.1%

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

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

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

        \[\leadsto t \cdot \color{blue}{\frac{y}{a}} + x \]
    4. Applied egg-rr79.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.7 \cdot 10^{-47}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-135}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-47}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 6.5128 \cdot 10^{-45}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \end{array} \]

Alternative 6: 76.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 9.2 \cdot 10^{-14} \lor \neg \left(z \leq 1.88 \cdot 10^{+59}\right) \land z \leq 7 \cdot 10^{+125}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.0999999999999998e-47 or 9.19999999999999993e-14 < z < 1.87999999999999989e59 or 7.00000000000000023e125 < z

    1. Initial program 99.9%

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

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

    if -3.0999999999999998e-47 < z < 9.19999999999999993e-14 or 1.87999999999999989e59 < z < 7.00000000000000023e125

    1. Initial program 97.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{-47}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-14} \lor \neg \left(z \leq 1.88 \cdot 10^{+59}\right) \land z \leq 7 \cdot 10^{+125}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 7: 80.8% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.49999999999999991e-48 or 1.1e-134 < z

    1. Initial program 99.4%

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

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

    if -3.49999999999999991e-48 < z < 1.1e-134

    1. Initial program 97.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-48} \lor \neg \left(z \leq 1.1 \cdot 10^{-134}\right):\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \end{array} \]

Alternative 8: 82.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-149} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\
\;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.6999999999999999e-149 or 3.8000000000000002e-15 < z

    1. Initial program 99.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{z}{z - t}}} + x \]
    4. Simplified87.1%

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

    if -1.6999999999999999e-149 < z < 3.8000000000000002e-15

    1. Initial program 97.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-149} \lor \neg \left(z \leq 3.8 \cdot 10^{-15}\right):\\ \;\;\;\;x + \frac{y}{\frac{z}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\ \end{array} \]

Alternative 9: 87.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6000000000000001e41 or 7e10 < t

    1. Initial program 97.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. clear-num97.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot t}{z - a}} \]
      2. mul-1-neg83.8%

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

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

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

        \[\leadsto \color{blue}{x - \frac{t}{\frac{z - a}{y}}} \]
      6. associate-/r/88.1%

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

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

    if -2.6000000000000001e41 < t < 7e10

    1. Initial program 99.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+41} \lor \neg \left(t \leq 70000000000\right):\\ \;\;\;\;x - y \cdot \frac{t}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \end{array} \]

Alternative 10: 87.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+44}:\\ \;\;\;\;x - \frac{t}{\frac{z - a}{y}}\\ \mathbf{elif}\;t \leq 4600000000:\\ \;\;\;\;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 (<= t -4.4e+44)
   (- x (/ t (/ (- z a) y)))
   (if (<= t 4600000000.0)
     (+ 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 (t <= -4.4e+44) {
		tmp = x - (t / ((z - a) / y));
	} else if (t <= 4600000000.0) {
		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 (t <= (-4.4d+44)) then
        tmp = x - (t / ((z - a) / y))
    else if (t <= 4600000000.0d0) 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 (t <= -4.4e+44) {
		tmp = x - (t / ((z - a) / y));
	} else if (t <= 4600000000.0) {
		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 t <= -4.4e+44:
		tmp = x - (t / ((z - a) / y))
	elif t <= 4600000000.0:
		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 (t <= -4.4e+44)
		tmp = Float64(x - Float64(t / Float64(Float64(z - a) / y)));
	elseif (t <= 4600000000.0)
		tmp = Float64(x + Float64(y * Float64(z / Float64(z - a))));
	else
		tmp = Float64(x - Float64(y * Float64(t / Float64(z - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -4.4e+44)
		tmp = x - (t / ((z - a) / y));
	elseif (t <= 4600000000.0)
		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[LessEqual[t, -4.4e+44], N[(x - N[(t / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4600000000.0], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4600000000:\\
\;\;\;\;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 3 regimes
  2. if t < -4.39999999999999991e44

    1. Initial program 95.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. clear-num95.4%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{y}{z - a} \cdot t} \]
      3. clear-num86.0%

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

        \[\leadsto x - \color{blue}{\frac{1 \cdot t}{\frac{z - a}{y}}} \]
      5. *-un-lft-identity86.0%

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

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

    if -4.39999999999999991e44 < t < 4.6e9

    1. Initial program 99.9%

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

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

    if 4.6e9 < t

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t}{\frac{z - a}{y}}} \]
      6. associate-/r/90.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+44}:\\ \;\;\;\;x - \frac{t}{\frac{z - a}{y}}\\ \mathbf{elif}\;t \leq 4600000000:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t}{z - a}\\ \end{array} \]

Alternative 11: 87.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+40}:\\ \;\;\;\;x - t \cdot \frac{y}{z - a}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+17}:\\ \;\;\;\;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 (<= t -1.15e+40)
   (- x (* t (/ y (- z a))))
   (if (<= t 6.2e+17) (+ 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 (t <= -1.15e+40) {
		tmp = x - (t * (y / (z - a)));
	} else if (t <= 6.2e+17) {
		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 (t <= (-1.15d+40)) then
        tmp = x - (t * (y / (z - a)))
    else if (t <= 6.2d+17) 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 (t <= -1.15e+40) {
		tmp = x - (t * (y / (z - a)));
	} else if (t <= 6.2e+17) {
		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 t <= -1.15e+40:
		tmp = x - (t * (y / (z - a)))
	elif t <= 6.2e+17:
		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 (t <= -1.15e+40)
		tmp = Float64(x - Float64(t * Float64(y / Float64(z - a))));
	elseif (t <= 6.2e+17)
		tmp = Float64(x + Float64(y * Float64(z / Float64(z - a))));
	else
		tmp = Float64(x - Float64(y * Float64(t / Float64(z - a))));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (t <= -1.15e+40)
		tmp = x - (t * (y / (z - a)));
	elseif (t <= 6.2e+17)
		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[LessEqual[t, -1.15e+40], N[(x - N[(t * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e+17], N[(x + N[(y * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{+17}:\\
\;\;\;\;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 3 regimes
  2. if t < -1.14999999999999997e40

    1. Initial program 95.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. clear-num95.4%

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

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

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

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

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

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

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

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

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

    if -1.14999999999999997e40 < t < 6.2e17

    1. Initial program 99.9%

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

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

    if 6.2e17 < t

    1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t}{\frac{z - a}{y}}} \]
      6. associate-/r/90.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.15 \cdot 10^{+40}:\\ \;\;\;\;x - t \cdot \frac{y}{z - a}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{+17}:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \frac{t}{z - a}\\ \end{array} \]

Alternative 12: 98.4% accurate, 1.0× speedup?

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

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

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Final simplification98.8%

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

Alternative 13: 63.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+175}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.65 \cdot 10^{+116}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.49999999999999989e175 or 1.6499999999999999e116 < a

    1. Initial program 99.9%

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

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

    if -4.49999999999999989e175 < a < 1.6499999999999999e116

    1. Initial program 98.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.5 \cdot 10^{+175}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{+116}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

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 98.8%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification48.8%

    \[\leadsto x \]

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

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

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