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

Percentage Accurate: 85.1% → 98.1%
Time: 8.5s
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.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \frac{y - z}{a - z} \cdot 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(Float64(y - z) / 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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

Alternative 2: 76.4% accurate, 0.4× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.4000000000000001e-80 or 8.9999999999999992e31 < z

    1. Initial program 78.9%

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

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

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

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

    if -3.4000000000000001e-80 < z < 3.40000000000000015e-75

    1. Initial program 97.3%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
    7. Applied egg-rr89.9%

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      3. un-div-inv90.3%

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

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

    if 3.40000000000000015e-75 < z < 1.90000000000000004e-32

    1. Initial program 99.7%

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      2. clear-num99.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.90000000000000004e-32 < z < 8.9999999999999992e31

    1. Initial program 99.8%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-80}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-75}:\\ \;\;\;\;x + \frac{y}{\frac{a}{t}}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{-32}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+31}:\\ \;\;\;\;x + t \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4e22 or 2.6000000000000002e69 < z

    1. Initial program 73.9%

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

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

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

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

    if -4.4e22 < z < 2.6000000000000002e69

    1. Initial program 97.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 82.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+117} \lor \neg \left(z \leq 2.05 \cdot 10^{+150}\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 -9.2e+117) (not (<= z 2.05e+150)))
   (+ x t)
   (+ x (/ (* y t) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -9.2e+117) || !(z <= 2.05e+150)) {
		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 <= (-9.2d+117)) .or. (.not. (z <= 2.05d+150))) 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 <= -9.2e+117) || !(z <= 2.05e+150)) {
		tmp = x + t;
	} else {
		tmp = x + ((y * t) / (a - z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -9.2e+117) or not (z <= 2.05e+150):
		tmp = x + t
	else:
		tmp = x + ((y * t) / (a - z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -9.2e+117) || !(z <= 2.05e+150))
		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 <= -9.2e+117) || ~((z <= 2.05e+150)))
		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, -9.2e+117], N[Not[LessEqual[z, 2.05e+150]], $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 -9.2 \cdot 10^{+117} \lor \neg \left(z \leq 2.05 \cdot 10^{+150}\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 < -9.19999999999999951e117 or 2.04999999999999997e150 < z

    1. Initial program 63.7%

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

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

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

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

    if -9.19999999999999951e117 < z < 2.04999999999999997e150

    1. Initial program 97.4%

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

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

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

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

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

Alternative 5: 86.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{-39} \lor \neg \left(z \leq 4.8 \cdot 10^{+33}\right):\\
\;\;\;\;x - t \cdot \left(\frac{y}{z} + -1\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.2999999999999999e-39 or 4.8e33 < z

    1. Initial program 77.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2999999999999999e-39 < z < 4.8e33

    1. Initial program 97.8%

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

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

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

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

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

Alternative 6: 76.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-82} \lor \neg \left(z \leq 3.3 \cdot 10^{+34}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.59999999999999998e-82 or 3.29999999999999988e34 < z

    1. Initial program 78.9%

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

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

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

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

    if -3.59999999999999998e-82 < z < 3.29999999999999988e34

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
    7. Applied egg-rr85.0%

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

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

Alternative 7: 76.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{-79} \lor \neg \left(z \leq 6.8 \cdot 10^{+31}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0999999999999999e-79 or 6.7999999999999996e31 < z

    1. Initial program 78.9%

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

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

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

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

    if -1.0999999999999999e-79 < z < 6.7999999999999996e31

    1. Initial program 97.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{t}{a} \cdot y} \]
    7. Applied egg-rr85.0%

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

        \[\leadsto x + \color{blue}{y \cdot \frac{t}{a}} \]
      2. clear-num85.0%

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{a}{t}}} \]
      3. un-div-inv85.4%

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

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

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

Alternative 8: 63.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{-81} \lor \neg \left(z \leq 4.7 \cdot 10^{-88}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.84999999999999993e-81 or 4.7e-88 < z

    1. Initial program 82.0%

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

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

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

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

    if -1.84999999999999993e-81 < z < 4.7e-88

    1. Initial program 97.2%

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

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

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

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

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

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

Alternative 9: 95.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{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(y - z) * Float64(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[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

      \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
    2. clear-num95.1%

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

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

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

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

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

Alternative 10: 50.8% accurate, 11.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 88.2%

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  7. Final simplification52.1%

    \[\leadsto x \]
  8. Add Preprocessing

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

  :herbie-target
  (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))))