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

Percentage Accurate: 85.2% → 99.3%
Time: 9.7s
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.2% 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: 99.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+236}:\\
\;\;\;\;t\_1 + x\\

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


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

    1. Initial program 28.3%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.00000000000000011e236

    1. Initial program 99.9%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing

    if 2.00000000000000011e236 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 52.4%

      \[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
  3. Recombined 3 regimes into one program.
  4. Final simplification99.9%

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

Alternative 2: 99.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+296} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+236}\right):\\
\;\;\;\;x + \frac{t}{z - a} \cdot \left(z - y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < -9.99999999999999981e295 or 2.00000000000000011e236 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z))

    1. Initial program 40.1%

      \[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

    if -9.99999999999999981e295 < (/.f64 (*.f64 (-.f64 y z) t) (-.f64 a z)) < 2.00000000000000011e236

    1. Initial program 99.9%

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

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

Alternative 3: 87.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.10000000000000009 or 4.1000000000000002e-13 < y

    1. Initial program 83.8%

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

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

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

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

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

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

    if -2.10000000000000009 < y < 4.1000000000000002e-13

    1. Initial program 86.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - z \cdot \frac{t}{a - z}} \]
      5. associate-*r/80.8%

        \[\leadsto x - \color{blue}{\frac{z \cdot t}{a - z}} \]
      6. *-commutative80.8%

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

        \[\leadsto x - \color{blue}{t \cdot \frac{z}{a - z}} \]
    9. Simplified94.2%

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

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

Alternative 4: 84.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+137} \lor \neg \left(z \leq 2.2 \cdot 10^{+105}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.40000000000000034e137 or 2.20000000000000007e105 < z

    1. Initial program 62.7%

      \[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 96.2%

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

    if -5.40000000000000034e137 < z < 2.20000000000000007e105

    1. Initial program 95.2%

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

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

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

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

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

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

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

Alternative 5: 84.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3:\\
\;\;\;\;x + z \cdot \frac{t}{z - a}\\

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

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


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

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3 < z < 2.20000000000000007e105

    1. Initial program 96.1%

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

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

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

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

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

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

    if 2.20000000000000007e105 < z

    1. Initial program 68.1%

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

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

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

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

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

Alternative 6: 77.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -245000000000 \lor \neg \left(z \leq 1.25 \cdot 10^{+43}\right):\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.45e11 or 1.2500000000000001e43 < z

    1. Initial program 72.3%

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

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

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

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

    if -2.45e11 < z < 1.2500000000000001e43

    1. Initial program 96.5%

      \[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 0 77.8%

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

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

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

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

Alternative 7: 63.6% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 2.1 \cdot 10^{+98}:\\
\;\;\;\;t + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -8.4999999999999999e104 or 2.10000000000000004e98 < a

    1. Initial program 88.8%

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

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

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

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

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

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

    if -8.4999999999999999e104 < a < 2.10000000000000004e98

    1. Initial program 83.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.5 \cdot 10^{+104}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.1 \cdot 10^{+98}:\\ \;\;\;\;t + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 53.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;x \leq 2.9 \cdot 10^{-127}:\\
\;\;\;\;t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.15e-224 or 2.9e-127 < x

    1. Initial program 87.3%

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

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

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

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

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

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

    if -2.15e-224 < x < 2.9e-127

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 95.8% accurate, 1.0× speedup?

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

\\
x + \frac{t}{z - a} \cdot \left(z - y\right)
\end{array}
Derivation
  1. Initial program 85.2%

    \[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. Final simplification95.2%

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

Alternative 10: 19.3% 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 85.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{t} \]
  10. 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 2024141 
(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))))