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

Percentage Accurate: 85.0% → 95.8%
Time: 8.4s
Alternatives: 13
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 13 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.0% 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: 95.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

Alternative 2: 62.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -1.1 \cdot 10^{-230} \lor \neg \left(a \leq 2.05 \cdot 10^{-246}\right):\\
\;\;\;\;x + t\\

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


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

    1. Initial program 71.4%

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

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

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

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

    if -9.50000000000000041e117 < a < -1.0999999999999999e-230 or 2.04999999999999993e-246 < a

    1. Initial program 86.3%

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

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

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

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

    if -1.0999999999999999e-230 < a < 2.04999999999999993e-246

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 76.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+22}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;z \leq 9 \cdot 10^{+129}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -7.5000000000000002e22 or 9.0000000000000003e129 < z

    1. Initial program 71.0%

      \[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 z around inf 84.5%

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

    if -7.5000000000000002e22 < z < 9.1999999999999999e-37

    1. Initial program 92.3%

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

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

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

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

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

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

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

    if 9.1999999999999999e-37 < z < 9.0000000000000003e129

    1. Initial program 89.3%

      \[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 a around 0 78.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-z}} \]
    10. Simplified71.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.5 \cdot 10^{+22}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-37}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+129}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+22}:\\
\;\;\;\;x + t\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.4e22 or 5.8000000000000004e127 < z

    1. Initial program 71.0%

      \[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 z around inf 84.5%

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

    if -6.4e22 < z < 4.9999999999999997e-37

    1. Initial program 92.3%

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

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

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

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

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

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

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

    if 4.9999999999999997e-37 < z < 5.8000000000000004e127

    1. Initial program 89.3%

      \[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 a around 0 78.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{t}{-z}} \]
    10. Simplified71.4%

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

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

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

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

        \[\leadsto \color{blue}{x - t \cdot \frac{y}{z}} \]
      4. *-commutative71.4%

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

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

      \[\leadsto \color{blue}{x - \frac{y}{\frac{z}{t}}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 75.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+22}:\\
\;\;\;\;x + t\\

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

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+88}:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.49999999999999979e22 or 2.3999999999999999e88 < z

    1. Initial program 70.6%

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

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

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

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

    if -6.49999999999999979e22 < z < 4.6000000000000002e38

    1. Initial program 92.2%

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

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

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

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

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

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

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

    if 4.6000000000000002e38 < z < 2.3999999999999999e88

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{t \cdot \left(1 - \frac{y}{z}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 6: 85.4% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.09999999999999981e55 or 1.7e33 < y

    1. Initial program 81.8%

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

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

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

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

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

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

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

    if -4.09999999999999981e55 < y < 1.7e33

    1. Initial program 84.5%

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot z}{a - z}} \]
      3. *-commutative78.4%

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

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

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

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

Alternative 7: 83.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.14 \lor \neg \left(z \leq 8.5 \cdot 10^{-37}\right):\\
\;\;\;\;x - t \cdot \frac{y - z}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.14000000000000001 or 8.5000000000000007e-37 < z

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

    if -0.14000000000000001 < z < 8.5000000000000007e-37

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

Alternative 8: 82.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+22} \lor \neg \left(z \leq 4 \cdot 10^{+112}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.7e22 or 3.9999999999999997e112 < z

    1. Initial program 69.2%

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

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

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

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

    if -1.7e22 < z < 3.9999999999999997e112

    1. Initial program 93.5%

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

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

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

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

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

Alternative 9: 65.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+168} \lor \neg \left(y \leq 9.6 \cdot 10^{+93}\right):\\
\;\;\;\;y \cdot \frac{t}{a - z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.70000000000000001e168 or 9.60000000000000042e93 < y

    1. Initial program 80.2%

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot y}{a - z}} \]
    7. Step-by-step derivation
      1. *-commutative51.5%

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

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

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

    if -1.70000000000000001e168 < y < 9.60000000000000042e93

    1. Initial program 84.5%

      \[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 z around inf 74.4%

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

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

Alternative 10: 63.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+22} \lor \neg \left(z \leq 1.5 \cdot 10^{-104}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.4e22 or 1.5000000000000001e-104 < z

    1. Initial program 76.4%

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

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

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

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

    if -6.4e22 < z < 1.5000000000000001e-104

    1. Initial program 92.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+22} \lor \neg \left(z \leq 1.5 \cdot 10^{-104}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.55 \cdot 10^{+120}:\\
\;\;\;\;t\\

\mathbf{elif}\;t \leq 1.7 \cdot 10^{+237}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.55000000000000014e120 or 1.7000000000000002e237 < t

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.55000000000000014e120 < t < 1.7000000000000002e237

    1. Initial program 91.9%

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

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

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

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

Alternative 12: 95.7% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t}{a - z}} \]
  4. Add Preprocessing
  5. Final simplification97.2%

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

Alternative 13: 19.0% 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 83.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  :alt
  (if (< t -1.0682974490174067e-39) (+ x (* (/ (- y z) (- a z)) t)) (if (< t 3.9110949887586375e-141) (+ x (/ (* (- y z) t) (- a z))) (+ x (* (/ (- y z) (- a z)) t))))

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