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

Percentage Accurate: 85.3% → 97.9%
Time: 10.9s
Alternatives: 15
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 15 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.3% 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: 97.9% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 74.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;z \leq -5.4 \cdot 10^{-75}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 4.4 \cdot 10^{+117} \lor \neg \left(z \leq 2.05 \cdot 10^{+156}\right):\\
\;\;\;\;x + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.85000000000000015e87 or 5.9000000000000004e-62 < z < 4.40000000000000028e117 or 2.0500000000000001e156 < z

    1. Initial program 73.5%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 82.0%

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

    if -3.85000000000000015e87 < z < -5.3999999999999996e-75 or 4.40000000000000028e117 < z < 2.0500000000000001e156

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{z \cdot \frac{t}{a}} \]
    10. Applied egg-rr75.2%

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

    if -5.3999999999999996e-75 < z < 5.9000000000000004e-62

    1. Initial program 95.4%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      4. div-inv97.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.85 \cdot 10^{+87}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;z \leq -5.4 \cdot 10^{-75}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 5.9 \cdot 10^{-62}:\\ \;\;\;\;x + \frac{t}{\frac{a}{y}}\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{+117} \lor \neg \left(z \leq 2.05 \cdot 10^{+156}\right):\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \frac{t}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 61.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -2.3 \cdot 10^{-72}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;z \leq -1.35 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 10^{-251}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 8 \cdot 10^{-63}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.29999999999999995e-72 or 8.00000000000000053e-63 < z

    1. Initial program 76.1%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 74.2%

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

    if -2.29999999999999995e-72 < z < -1.35000000000000001e-293 or 1.00000000000000002e-251 < z < 8.00000000000000053e-63

    1. Initial program 95.9%

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

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

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

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

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

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

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

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

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

    if -1.35000000000000001e-293 < z < 1.00000000000000002e-251

    1. Initial program 94.0%

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

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

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

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

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

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

Alternative 4: 91.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.26 \cdot 10^{+98}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a - z}\\

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


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

    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999998e64 < z < 1.25999999999999999e98

    1. Initial program 93.0%

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

    if 1.25999999999999999e98 < z

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - z}{z}}} \]
    9. Applied egg-rr91.1%

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

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

Alternative 5: 60.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 6 \cdot 10^{-251}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 1.72 \cdot 10^{-63}:\\
\;\;\;\;y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.0999999999999999e-50 or 1.71999999999999989e-63 < z

    1. Initial program 75.7%

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

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

    if -1.0999999999999999e-50 < z < 5.9999999999999997e-251

    1. Initial program 96.8%

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

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

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

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

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

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

    if 5.9999999999999997e-251 < z < 1.71999999999999989e-63

    1. Initial program 92.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
    7. Applied egg-rr74.5%

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

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

Alternative 6: 60.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 5.5 \cdot 10^{-251}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq 4.1 \cdot 10^{-64}:\\
\;\;\;\;t \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.2999999999999999e-55 or 4.1e-64 < z

    1. Initial program 75.7%

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

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

    if -1.2999999999999999e-55 < z < 5.5e-251

    1. Initial program 96.8%

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

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

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

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

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

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

    if 5.5e-251 < z < 4.1e-64

    1. Initial program 92.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{t}{a - z}} \]
    7. Applied egg-rr74.5%

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

      \[\leadsto y \cdot \color{blue}{\frac{t}{a}} \]
    9. Taylor expanded in y around 0 47.3%

      \[\leadsto \color{blue}{\frac{t \cdot y}{a}} \]
    10. Step-by-step derivation
      1. associate-*r/54.0%

        \[\leadsto \color{blue}{t \cdot \frac{y}{a}} \]
    11. Simplified54.0%

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

Alternative 7: 87.1% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{-60} \lor \neg \left(y \leq 950000\right):\\ \;\;\;\;x + t \cdot \frac{y}{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.15e-60) (not (<= y 950000.0)))
   (+ x (* t (/ y (- a z))))
   (+ x (* t (/ z (- z a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -1.15e-60) || !(y <= 950000.0)) {
		tmp = x + (t * (y / (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.15d-60)) .or. (.not. (y <= 950000.0d0))) then
        tmp = x + (t * (y / (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.15e-60) || !(y <= 950000.0)) {
		tmp = x + (t * (y / (a - z)));
	} else {
		tmp = x + (t * (z / (z - a)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (y <= -1.15e-60) or not (y <= 950000.0):
		tmp = x + (t * (y / (a - z)))
	else:
		tmp = x + (t * (z / (z - a)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -1.15e-60) || !(y <= 950000.0))
		tmp = Float64(x + Float64(t * Float64(y / 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.15e-60) || ~((y <= 950000.0)))
		tmp = x + (t * (y / (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.15e-60], N[Not[LessEqual[y, 950000.0]], $MachinePrecision]], N[(x + N[(t * N[(y / 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.15 \cdot 10^{-60} \lor \neg \left(y \leq 950000\right):\\
\;\;\;\;x + t \cdot \frac{y}{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.1500000000000001e-60 or 9.5e5 < y

    1. Initial program 80.6%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 79.5%

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

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

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

    if -1.1500000000000001e-60 < y < 9.5e5

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 78.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.10000000000000045e-202 or 2450 < y

    1. Initial program 81.2%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 78.4%

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

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

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

    if -6.10000000000000045e-202 < y < 2450

    1. Initial program 85.3%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 75.8%

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

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

Alternative 9: 76.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4500000 \lor \neg \left(z \leq 1.26 \cdot 10^{-61}\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 -4500000.0) (not (<= z 1.26e-61))) (+ x t) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -4500000.0) || !(z <= 1.26e-61)) {
		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 <= (-4500000.0d0)) .or. (.not. (z <= 1.26d-61))) 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 <= -4500000.0) || !(z <= 1.26e-61)) {
		tmp = x + t;
	} else {
		tmp = x + (t / (a / y));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -4500000.0) or not (z <= 1.26e-61):
		tmp = x + t
	else:
		tmp = x + (t / (a / y))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -4500000.0) || !(z <= 1.26e-61))
		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 <= -4500000.0) || ~((z <= 1.26e-61)))
		tmp = x + t;
	else
		tmp = x + (t / (a / y));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4500000.0], N[Not[LessEqual[z, 1.26e-61]], $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 -4500000 \lor \neg \left(z \leq 1.26 \cdot 10^{-61}\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 < -4.5e6 or 1.2599999999999999e-61 < z

    1. Initial program 73.8%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 75.5%

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

    if -4.5e6 < z < 1.2599999999999999e-61

    1. Initial program 96.1%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      4. div-inv97.7%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 76.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -520000 \lor \neg \left(z \leq 7.1 \cdot 10^{-62}\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 -520000.0) (not (<= z 7.1e-62))) (+ x t) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -520000.0) || !(z <= 7.1e-62)) {
		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 <= (-520000.0d0)) .or. (.not. (z <= 7.1d-62))) 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 <= -520000.0) || !(z <= 7.1e-62)) {
		tmp = x + t;
	} else {
		tmp = x + (y * (t / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -520000.0) or not (z <= 7.1e-62):
		tmp = x + t
	else:
		tmp = x + (y * (t / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -520000.0) || !(z <= 7.1e-62))
		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 <= -520000.0) || ~((z <= 7.1e-62)))
		tmp = x + t;
	else
		tmp = x + (y * (t / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -520000.0], N[Not[LessEqual[z, 7.1e-62]], $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 -520000 \lor \neg \left(z \leq 7.1 \cdot 10^{-62}\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 < -5.2e5 or 7.1000000000000001e-62 < z

    1. Initial program 73.8%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 75.5%

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

    if -5.2e5 < z < 7.1000000000000001e-62

    1. Initial program 96.1%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around 0 73.3%

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

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

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

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

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

Alternative 11: 76.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -24500000 \lor \neg \left(z \leq 1.26 \cdot 10^{-61}\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 -24500000.0) (not (<= z 1.26e-61)))
   (+ x t)
   (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -24500000.0) || !(z <= 1.26e-61)) {
		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 <= (-24500000.0d0)) .or. (.not. (z <= 1.26d-61))) 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 <= -24500000.0) || !(z <= 1.26e-61)) {
		tmp = x + t;
	} else {
		tmp = x + (t * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -24500000.0) or not (z <= 1.26e-61):
		tmp = x + t
	else:
		tmp = x + (t * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -24500000.0) || !(z <= 1.26e-61))
		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 <= -24500000.0) || ~((z <= 1.26e-61)))
		tmp = x + t;
	else
		tmp = x + (t * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -24500000.0], N[Not[LessEqual[z, 1.26e-61]], $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 -24500000 \lor \neg \left(z \leq 1.26 \cdot 10^{-61}\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.45e7 or 1.2599999999999999e-61 < z

    1. Initial program 73.8%

      \[x + \frac{\left(y - z\right) \cdot t}{a - z} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 75.5%

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

    if -2.45e7 < z < 1.2599999999999999e-61

    1. Initial program 96.1%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y - z}{\frac{a - z}{t}}} \]
      4. div-inv97.7%

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

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

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

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

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

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

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

Alternative 12: 63.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.39999999999999997e-56 or 6.4e-173 < z

    1. Initial program 77.5%

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

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

    if -1.39999999999999997e-56 < z < 6.4e-173

    1. Initial program 94.9%

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

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

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

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

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

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

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

Alternative 13: 97.9% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

Alternative 14: 96.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 15: 50.0% 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 82.7%

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

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

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

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

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

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

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

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

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