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

Percentage Accurate: 85.5% → 98.2%
Time: 9.0s
Alternatives: 10
Speedup: 1.0×

Specification

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

\\
x + \frac{\left(y - z\right) \cdot t}{a - z}
\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: 85.5% accurate, 1.0× speedup?

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

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

Alternative 1: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 82.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.70000000000000019e-32 or 2.9e49 < a

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.70000000000000019e-32 < a < 2.9e49

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

Alternative 3: 85.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -58 or 2.4e-150 < y

    1. Initial program 88.5%

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

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

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

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

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

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

    if -58 < y < 2.4e-150

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + z \cdot \frac{t}{\color{blue}{\left(-\left(-z\right)\right)} - a} \]
      14. remove-double-neg90.5%

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

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

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

Alternative 4: 79.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.00000000000000003e-53 or 4.2000000000000002e-150 < y

    1. Initial program 89.2%

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

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

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

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

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

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

    if -1.00000000000000003e-53 < y < 4.2000000000000002e-150

    1. Initial program 89.5%

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

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

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

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

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

Alternative 5: 75.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{-11} \lor \neg \left(z \leq 2.9 \cdot 10^{-87}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.9999999999999999e-11 or 2.8999999999999999e-87 < z

    1. Initial program 83.0%

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

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

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

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

    if -8.9999999999999999e-11 < z < 2.8999999999999999e-87

    1. Initial program 97.3%

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

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

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

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

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

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

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

Alternative 6: 62.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 3.7 \cdot 10^{+171}:\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.8500000000000001e228 or 3.69999999999999998e171 < a

    1. Initial program 80.3%

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

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

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

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

    if -2.8500000000000001e228 < a < 3.69999999999999998e171

    1. Initial program 91.4%

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

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

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

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

Alternative 7: 60.3% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.6 \cdot 10^{+154}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


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

    1. Initial program 81.5%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y - z}{z}} \]
    7. Simplified64.6%

      \[\leadsto \color{blue}{x - t \cdot \frac{y - z}{z}} \]
    8. Step-by-step derivation
      1. clear-num64.4%

        \[\leadsto x - t \cdot \color{blue}{\frac{1}{\frac{z}{y - z}}} \]
      2. un-div-inv64.5%

        \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    9. Applied egg-rr64.5%

      \[\leadsto x - \color{blue}{\frac{t}{\frac{z}{y - z}}} \]
    10. Step-by-step derivation
      1. associate-/r/64.6%

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

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

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

    if -2.59999999999999989e154 < y

    1. Initial program 90.2%

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

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

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

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

Alternative 8: 52.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-106}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.1 \cdot 10^{-267}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -6.4999999999999997e-106 or 2.1000000000000001e-267 < x

    1. Initial program 89.6%

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

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

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

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

    if -6.4999999999999997e-106 < x < 2.1000000000000001e-267

    1. Initial program 88.0%

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

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

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

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

      \[\leadsto \color{blue}{x \cdot \left(1 + \frac{t}{x}\right)} \]
    7. Taylor expanded in x around 0 36.8%

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

Alternative 9: 59.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+157}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\

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


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

    1. Initial program 81.5%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y - z}{z}} \]
    7. Simplified64.6%

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

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

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

      \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    11. Taylor expanded in x around 0 49.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{z}} \]
    12. Step-by-step derivation
      1. mul-1-neg49.7%

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

        \[\leadsto -\color{blue}{t \cdot \frac{y}{z}} \]
      3. distribute-rgt-neg-out55.4%

        \[\leadsto \color{blue}{t \cdot \left(-\frac{y}{z}\right)} \]
      4. distribute-frac-neg55.4%

        \[\leadsto t \cdot \color{blue}{\frac{-y}{z}} \]
    13. Simplified55.4%

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

    if -3.0000000000000001e157 < y

    1. Initial program 90.2%

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

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

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

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

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

Alternative 10: 18.2% accurate, 11.0× speedup?

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

\\
t
\end{array}
Derivation
  1. Initial program 89.3%

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

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

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

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

    \[\leadsto \color{blue}{x \cdot \left(1 + \frac{t}{x}\right)} \]
  7. Taylor expanded in x around 0 18.3%

    \[\leadsto \color{blue}{t} \]
  8. Add Preprocessing

Developer Target 1: 99.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - z}{a - z} \cdot t\\ \mathbf{if}\;t < -1.0682974490174067 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t < 3.9110949887586375 \cdot 10^{-141}:\\ \;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ (- y z) (- a z)) t))))
   (if (< t -1.0682974490174067e-39)
     t_1
     (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) / (a - z)) * t);
	double tmp;
	if (t < -1.0682974490174067e-39) {
		tmp = t_1;
	} else if (t < 3.9110949887586375e-141) {
		tmp = x + (((y - z) * t) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + (((y - z) / (a - z)) * t)
    if (t < (-1.0682974490174067d-39)) then
        tmp = t_1
    else if (t < 3.9110949887586375d-141) then
        tmp = x + (((y - z) * t) / (a - z))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - z) / (a - z)) * t);
	double tmp;
	if (t < -1.0682974490174067e-39) {
		tmp = t_1;
	} else if (t < 3.9110949887586375e-141) {
		tmp = x + (((y - z) * t) / (a - z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - z) / (a - z)) * t)
	tmp = 0
	if t < -1.0682974490174067e-39:
		tmp = t_1
	elif t < 3.9110949887586375e-141:
		tmp = x + (((y - z) * t) / (a - z))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - z) / Float64(a - z)) * t))
	tmp = 0.0
	if (t < -1.0682974490174067e-39)
		tmp = t_1;
	elseif (t < 3.9110949887586375e-141)
		tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / Float64(a - z)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - z) / (a - z)) * t);
	tmp = 0.0;
	if (t < -1.0682974490174067e-39)
		tmp = t_1;
	elseif (t < 3.9110949887586375e-141)
		tmp = x + (((y - z) * t) / (a - z));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.0682974490174067e-39], t$95$1, If[Less[t, 3.9110949887586375e-141], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< t -10682974490174067/10000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 312887599100691/80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t)))))

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