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

Percentage Accurate: 85.7% → 98.3%
Time: 9.0s
Alternatives: 11
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 11 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.7% 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.3% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 80.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + t \cdot \frac{z}{z - a}\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+68}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-66}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-92}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* t (/ z (- z a))))))
   (if (<= z -3.5e+68)
     t_1
     (if (<= z -2.5e-66)
       (- x (* t (/ y z)))
       (if (<= z 1.65e-92) (+ x (/ t (/ a y))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (t * (z / (z - a)));
	double tmp;
	if (z <= -3.5e+68) {
		tmp = t_1;
	} else if (z <= -2.5e-66) {
		tmp = x - (t * (y / z));
	} else if (z <= 1.65e-92) {
		tmp = x + (t / (a / y));
	} 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 + (t * (z / (z - a)))
    if (z <= (-3.5d+68)) then
        tmp = t_1
    else if (z <= (-2.5d-66)) then
        tmp = x - (t * (y / z))
    else if (z <= 1.65d-92) then
        tmp = x + (t / (a / y))
    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 + (t * (z / (z - a)));
	double tmp;
	if (z <= -3.5e+68) {
		tmp = t_1;
	} else if (z <= -2.5e-66) {
		tmp = x - (t * (y / z));
	} else if (z <= 1.65e-92) {
		tmp = x + (t / (a / y));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (t * (z / (z - a)))
	tmp = 0
	if z <= -3.5e+68:
		tmp = t_1
	elif z <= -2.5e-66:
		tmp = x - (t * (y / z))
	elif z <= 1.65e-92:
		tmp = x + (t / (a / y))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(t * Float64(z / Float64(z - a))))
	tmp = 0.0
	if (z <= -3.5e+68)
		tmp = t_1;
	elseif (z <= -2.5e-66)
		tmp = Float64(x - Float64(t * Float64(y / z)));
	elseif (z <= 1.65e-92)
		tmp = Float64(x + Float64(t / Float64(a / y)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (t * (z / (z - a)));
	tmp = 0.0;
	if (z <= -3.5e+68)
		tmp = t_1;
	elseif (z <= -2.5e-66)
		tmp = x - (t * (y / z));
	elseif (z <= 1.65e-92)
		tmp = x + (t / (a / y));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e+68], t$95$1, If[LessEqual[z, -2.5e-66], N[(x - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-92], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x + t \cdot \frac{z}{z - a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+68}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.49999999999999977e68 or 1.64999999999999999e-92 < z

    1. Initial program 79.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999977e68 < z < -2.49999999999999981e-66

    1. Initial program 95.9%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{z}} \]
    8. Simplified76.5%

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

    if -2.49999999999999981e-66 < z < 1.64999999999999999e-92

    1. Initial program 95.3%

      \[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 z around 0 83.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+68}:\\ \;\;\;\;x + t \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq -2.5 \cdot 10^{-66}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-92}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{z}{z - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05000000000000004e91 or 1.52e22 < z

    1. Initial program 73.3%

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

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

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

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

    if -1.05000000000000004e91 < z < -1.01999999999999997e-68

    1. Initial program 96.9%

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

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

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

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

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

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

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

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

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

    if -1.01999999999999997e-68 < z < 1.52e22

    1. Initial program 95.5%

      \[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 z around 0 81.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+91}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -1.02 \cdot 10^{-68}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+22}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + t\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 87.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.29999999999999985e-39 or 4.2e-85 < y

    1. Initial program 87.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}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    3. Simplified96.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.29999999999999985e-39 < y < 4.2e-85

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{z}{z - a}} \]
    10. Simplified94.0%

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

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

Alternative 5: 87.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8e-40 or 4.8000000000000001e-85 < y

    1. Initial program 87.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}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
    3. Simplified96.1%

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

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

    if -1.8e-40 < y < 4.8000000000000001e-85

    1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{t \cdot \frac{z}{z - a}} \]
    10. Simplified94.0%

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

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

Alternative 6: 76.2% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 74.1%

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

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

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

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

    if -1.3999999999999999e76 < z < 1.7e22

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

Alternative 7: 76.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+78} \lor \neg \left(z \leq 1.96 \cdot 10^{+21}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8000000000000001e78 or 1.96e21 < z

    1. Initial program 74.1%

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

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

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

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

    if -2.8000000000000001e78 < z < 1.96e21

    1. Initial program 95.7%

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

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

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

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

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

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

Alternative 8: 76.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+78} \lor \neg \left(z \leq 2 \cdot 10^{+21}\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.2e+78) (not (<= z 2e+21))) (+ x t) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -3.2e+78) || !(z <= 2e+21)) {
		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.2d+78)) .or. (.not. (z <= 2d+21))) 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.2e+78) || !(z <= 2e+21)) {
		tmp = x + t;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -3.2e+78) or not (z <= 2e+21):
		tmp = x + t
	else:
		tmp = x + (y * (t / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -3.2e+78) || !(z <= 2e+21))
		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.2e+78) || ~((z <= 2e+21)))
		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.2e+78], N[Not[LessEqual[z, 2e+21]], $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.2 \cdot 10^{+78} \lor \neg \left(z \leq 2 \cdot 10^{+21}\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.19999999999999994e78 or 2e21 < z

    1. Initial program 74.1%

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

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

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

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

    if -3.19999999999999994e78 < z < 2e21

    1. Initial program 95.7%

      \[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 y around inf 91.4%

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

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

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

Alternative 9: 63.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.74999999999999995e-216 or 4.39999999999999987e-35 < z

    1. Initial program 82.2%

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

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

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

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

    if -2.74999999999999995e-216 < z < 4.39999999999999987e-35

    1. Initial program 96.6%

      \[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 x around inf 58.7%

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

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

Alternative 10: 98.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 51.6% 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 87.1%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

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

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

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