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

Percentage Accurate: 98.0% → 98.0%
Time: 9.7s
Alternatives: 10
Speedup: 1.0×

Specification

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

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

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

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

Alternative 1: 98.0% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 73.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.02 \cdot 10^{+36}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-24}:\\
\;\;\;\;y \cdot \frac{-t}{a - t}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if t < -1.02000000000000003e36 or 3.49999999999999997e142 < t

    1. Initial program 100.0%

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

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

    if -1.02000000000000003e36 < t < 4.79999999999999983e-55

    1. Initial program 97.5%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    4. Simplified86.0%

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

    if 4.79999999999999983e-55 < t < 4.7999999999999996e-24

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - t}{y}}} \]
    7. Simplified58.1%

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

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

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

        \[\leadsto -\color{blue}{\frac{t}{a - t} \cdot y} \]
      3. *-commutative67.7%

        \[\leadsto -\color{blue}{y \cdot \frac{t}{a - t}} \]
      4. distribute-lft-neg-in67.7%

        \[\leadsto \color{blue}{\left(-y\right) \cdot \frac{t}{a - t}} \]
    10. Simplified67.7%

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

    if 4.7999999999999996e-24 < t < 5.9999999999999996e102

    1. Initial program 99.7%

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

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

    if 5.9999999999999996e102 < t < 4.99999999999999972e118

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{a - t}} \]
      3. distribute-rgt-neg-out99.7%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{a - t}\right)} \]
      4. distribute-neg-frac99.7%

        \[\leadsto t \cdot \color{blue}{\frac{-y}{a - t}} \]
    10. Simplified99.7%

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

    if 4.99999999999999972e118 < t < 3.49999999999999997e142

    1. Initial program 100.0%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    4. Simplified100.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{+36}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-55}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \frac{-t}{a - t}\\ \mathbf{elif}\;t \leq 6 \cdot 10^{+102}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+118}:\\ \;\;\;\;t \cdot \frac{-y}{a - t}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+142}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 86.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.70000000000000029e36 or 1.65e13 < z

    1. Initial program 97.4%

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

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

    if -3.70000000000000029e36 < z < 1.65e13

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    4. Simplified93.3%

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    5. Step-by-step derivation
      1. frac-2neg93.3%

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

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

        \[\leadsto x + \color{blue}{t} \cdot \frac{1}{-\frac{a - t}{y}} \]
      4. distribute-neg-frac93.2%

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

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

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

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

      \[\leadsto x + \color{blue}{t \cdot \frac{1}{\frac{\left(-a\right) + t}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/93.8%

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

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

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

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

        \[\leadsto x + t \cdot \frac{y}{\color{blue}{t - a}} \]
    8. Simplified93.9%

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

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

Alternative 4: 86.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.24999999999999998e39 or 1.9e15 < z

    1. Initial program 97.4%

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

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

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

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

    if -2.24999999999999998e39 < z < 1.9e15

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    4. Simplified93.3%

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    5. Step-by-step derivation
      1. frac-2neg93.3%

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

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

        \[\leadsto x + \color{blue}{t} \cdot \frac{1}{-\frac{a - t}{y}} \]
      4. distribute-neg-frac93.2%

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

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

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

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

      \[\leadsto x + \color{blue}{t \cdot \frac{1}{\frac{\left(-a\right) + t}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/93.8%

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

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

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

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

        \[\leadsto x + t \cdot \frac{y}{\color{blue}{t - a}} \]
    8. Simplified93.9%

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

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

Alternative 5: 87.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.8e40 or 4.90000000000000002e38 < z

    1. Initial program 97.3%

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

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

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

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

    if -4.8e40 < z < 4.90000000000000002e38

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 6: 75.2% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{+151}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+173}:\\ \;\;\;\;x + t \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.5e+151)
   (+ x (/ (* y z) a))
   (if (<= z 1.4e+173) (+ x (* t (/ y (- t a)))) (+ x (* z (/ y a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.5e+151) {
		tmp = x + ((y * z) / a);
	} else if (z <= 1.4e+173) {
		tmp = x + (t * (y / (t - a)));
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-5.5d+151)) then
        tmp = x + ((y * z) / a)
    else if (z <= 1.4d+173) then
        tmp = x + (t * (y / (t - a)))
    else
        tmp = x + (z * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.5e+151) {
		tmp = x + ((y * z) / a);
	} else if (z <= 1.4e+173) {
		tmp = x + (t * (y / (t - a)));
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.5e+151:
		tmp = x + ((y * z) / a)
	elif z <= 1.4e+173:
		tmp = x + (t * (y / (t - a)))
	else:
		tmp = x + (z * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.5e+151)
		tmp = Float64(x + Float64(Float64(y * z) / a));
	elseif (z <= 1.4e+173)
		tmp = Float64(x + Float64(t * Float64(y / Float64(t - a))));
	else
		tmp = Float64(x + Float64(z * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.5e+151)
		tmp = x + ((y * z) / a);
	elseif (z <= 1.4e+173)
		tmp = x + (t * (y / (t - a)));
	else
		tmp = x + (z * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.5e+151], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+173], N[(x + N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 93.6%

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

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

    if -5.4999999999999994e151 < z < 1.39999999999999991e173

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    4. Simplified85.2%

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    5. Step-by-step derivation
      1. frac-2neg85.2%

        \[\leadsto x + \color{blue}{\frac{-\left(-t\right)}{-\frac{a - t}{y}}} \]
      2. div-inv85.0%

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

        \[\leadsto x + \color{blue}{t} \cdot \frac{1}{-\frac{a - t}{y}} \]
      4. distribute-neg-frac85.0%

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

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

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

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

      \[\leadsto x + \color{blue}{t \cdot \frac{1}{\frac{\left(-a\right) + t}{y}}} \]
    7. Step-by-step derivation
      1. associate-/r/85.5%

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

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

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

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

        \[\leadsto x + t \cdot \frac{y}{\color{blue}{t - a}} \]
    8. Simplified85.5%

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

    if 1.39999999999999991e173 < z

    1. Initial program 96.6%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    4. Simplified77.6%

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

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot z} \]
    6. Applied egg-rr81.0%

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

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

Alternative 7: 76.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+31} \lor \neg \left(t \leq 1.95 \cdot 10^{+101}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.40000000000000008e31 or 1.95e101 < t

    1. Initial program 99.9%

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

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

    if -1.40000000000000008e31 < t < 1.95e101

    1. Initial program 98.0%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    4. Simplified77.6%

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

        \[\leadsto x + \color{blue}{\frac{y}{a} \cdot z} \]
    6. Applied egg-rr76.6%

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

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

Alternative 8: 70.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \lor \neg \left(a \leq 1.15 \cdot 10^{+91}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.02 or 1.14999999999999996e91 < a

    1. Initial program 99.9%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
    4. Simplified82.8%

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

    if -1.02 < a < 1.14999999999999996e91

    1. Initial program 97.8%

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

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

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

Alternative 9: 64.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.4 \cdot 10^{-104} \lor \neg \left(t \leq 1.7 \cdot 10^{-101}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.39999999999999994e-104 or 1.69999999999999995e-101 < t

    1. Initial program 99.4%

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

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

    if -8.39999999999999994e-104 < t < 1.69999999999999995e-101

    1. Initial program 97.5%

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
    4. Simplified76.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.4 \cdot 10^{-104} \lor \neg \left(t \leq 1.7 \cdot 10^{-101}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 10: 51.5% 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}{a - t} \]
  2. Taylor expanded in z around 0 69.1%

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

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

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

      \[\leadsto x + \color{blue}{\frac{-t}{\frac{a - t}{y}}} \]
  4. Simplified76.4%

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification52.9%

    \[\leadsto x \]

Developer target: 99.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\ \;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
   (if (< y -8.508084860551241e-17)
     t_1
     (if (< y 2.894426862792089e-49)
       (+ x (* (* y (- z t)) (/ 1.0 (- a t))))
       t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - t) / (a - t)));
	double tmp;
	if (y < -8.508084860551241e-17) {
		tmp = t_1;
	} else if (y < 2.894426862792089e-49) {
		tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (y * ((z - t) / (a - t)))
    if (y < (-8.508084860551241d-17)) then
        tmp = t_1
    else if (y < 2.894426862792089d-49) then
        tmp = x + ((y * (z - t)) * (1.0d0 / (a - t)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * ((z - t) / (a - t)));
	double tmp;
	if (y < -8.508084860551241e-17) {
		tmp = t_1;
	} else if (y < 2.894426862792089e-49) {
		tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * ((z - t) / (a - t)))
	tmp = 0
	if y < -8.508084860551241e-17:
		tmp = t_1
	elif y < 2.894426862792089e-49:
		tmp = x + ((y * (z - t)) * (1.0 / (a - t)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t))))
	tmp = 0.0
	if (y < -8.508084860551241e-17)
		tmp = t_1;
	elseif (y < 2.894426862792089e-49)
		tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * ((z - t) / (a - t)));
	tmp = 0.0;
	if (y < -8.508084860551241e-17)
		tmp = t_1;
	elseif (y < 2.894426862792089e-49)
		tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
	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] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\

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


\end{array}
\end{array}

Reproduce

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

  :herbie-target
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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