Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B

Percentage Accurate: 85.2% → 97.9%
Time: 9.2s
Alternatives: 12
Speedup: 1.0×

Specification

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

\\
x + \frac{y \cdot \left(z - t\right)}{a - t}
\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 12 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 85.2% accurate, 1.0× speedup?

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

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

Alternative 1: 97.9% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x + \frac{y \cdot \left(z - t\right)}{a - t} \leq -4 \cdot 10^{+117}:\\ \;\;\;\;x + \left(z - t\right) \cdot \left(y \cdot \frac{-1}{t - a}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= (+ x (/ (* y (- z t)) (- a t))) -4e+117)
   (+ x (* (- z t) (* y (/ -1.0 (- t a)))))
   (fma y (/ (- z t) (- a t)) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x + ((y * (z - t)) / (a - t))) <= -4e+117) {
		tmp = x + ((z - t) * (y * (-1.0 / (t - a))));
	} else {
		tmp = fma(y, ((z - t) / (a - t)), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(a - t))) <= -4e+117)
		tmp = Float64(x + Float64(Float64(z - t) * Float64(y * Float64(-1.0 / Float64(t - a)))));
	else
		tmp = fma(y, Float64(Float64(z - t) / Float64(a - t)), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -4e+117], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y * N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t))) < -4.0000000000000002e117

    1. Initial program 71.7%

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

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

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

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

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

    if -4.0000000000000002e117 < (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)))

    1. Initial program 89.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{y \cdot \left(z - t\right)}{a - t} \leq -4 \cdot 10^{+117}:\\ \;\;\;\;x + \left(z - t\right) \cdot \left(y \cdot \frac{-1}{t - a}\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 76.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ t_2 := x - y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -1.26 \cdot 10^{+187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.35 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -6.7 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 24\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y a)))) (t_2 (- x (* y (/ z t)))))
   (if (<= t -1.26e+187)
     (+ x y)
     (if (<= t -2.35e+42)
       t_2
       (if (<= t -1.05e-14)
         t_1
         (if (<= t -6.7e-68)
           t_2
           (if (or (<= t -7.5e-83) (not (<= t 24.0))) (+ x y) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / a));
	double t_2 = x - (y * (z / t));
	double tmp;
	if (t <= -1.26e+187) {
		tmp = x + y;
	} else if (t <= -2.35e+42) {
		tmp = t_2;
	} else if (t <= -1.05e-14) {
		tmp = t_1;
	} else if (t <= -6.7e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 24.0)) {
		tmp = x + 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) :: t_2
    real(8) :: tmp
    t_1 = x + (z * (y / a))
    t_2 = x - (y * (z / t))
    if (t <= (-1.26d+187)) then
        tmp = x + y
    else if (t <= (-2.35d+42)) then
        tmp = t_2
    else if (t <= (-1.05d-14)) then
        tmp = t_1
    else if (t <= (-6.7d-68)) then
        tmp = t_2
    else if ((t <= (-7.5d-83)) .or. (.not. (t <= 24.0d0))) then
        tmp = x + 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 + (z * (y / a));
	double t_2 = x - (y * (z / t));
	double tmp;
	if (t <= -1.26e+187) {
		tmp = x + y;
	} else if (t <= -2.35e+42) {
		tmp = t_2;
	} else if (t <= -1.05e-14) {
		tmp = t_1;
	} else if (t <= -6.7e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 24.0)) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / a))
	t_2 = x - (y * (z / t))
	tmp = 0
	if t <= -1.26e+187:
		tmp = x + y
	elif t <= -2.35e+42:
		tmp = t_2
	elif t <= -1.05e-14:
		tmp = t_1
	elif t <= -6.7e-68:
		tmp = t_2
	elif (t <= -7.5e-83) or not (t <= 24.0):
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / a)))
	t_2 = Float64(x - Float64(y * Float64(z / t)))
	tmp = 0.0
	if (t <= -1.26e+187)
		tmp = Float64(x + y);
	elseif (t <= -2.35e+42)
		tmp = t_2;
	elseif (t <= -1.05e-14)
		tmp = t_1;
	elseif (t <= -6.7e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || !(t <= 24.0))
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / a));
	t_2 = x - (y * (z / t));
	tmp = 0.0;
	if (t <= -1.26e+187)
		tmp = x + y;
	elseif (t <= -2.35e+42)
		tmp = t_2;
	elseif (t <= -1.05e-14)
		tmp = t_1;
	elseif (t <= -6.7e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || ~((t <= 24.0)))
		tmp = x + y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.26e+187], N[(x + y), $MachinePrecision], If[LessEqual[t, -2.35e+42], t$95$2, If[LessEqual[t, -1.05e-14], t$95$1, If[LessEqual[t, -6.7e-68], t$95$2, If[Or[LessEqual[t, -7.5e-83], N[Not[LessEqual[t, 24.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.35 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -1.05 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -6.7 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 24\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.26e187 or -6.6999999999999996e-68 < t < -7.4999999999999997e-83 or 24 < t

    1. Initial program 66.1%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative79.4%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified79.4%

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

    if -1.26e187 < t < -2.34999999999999993e42 or -1.0499999999999999e-14 < t < -6.6999999999999996e-68

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\sqrt{x}, \sqrt{x}, \left(-y\right) \cdot \frac{z}{t}\right)} \]
      3. distribute-lft-neg-out30.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, \color{blue}{-y \cdot \frac{z}{t}}\right) \]
      4. add-sqr-sqrt14.6%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, -\color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{z}{t}\right) \]
      5. sqrt-unprod21.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, -\color{blue}{\sqrt{y \cdot y}} \cdot \frac{z}{t}\right) \]
      6. sqr-neg21.7%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, -\sqrt{\color{blue}{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{z}{t}\right) \]
      7. sqrt-unprod9.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, -\color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot \frac{z}{t}\right) \]
      8. add-sqr-sqrt15.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, -\color{blue}{\left(-y\right)} \cdot \frac{z}{t}\right) \]
      9. *-commutative15.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, -\color{blue}{\frac{z}{t} \cdot \left(-y\right)}\right) \]
      10. *-commutative15.0%

        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \sqrt{x}, -\color{blue}{\left(-y\right) \cdot \frac{z}{t}}\right) \]
      11. fma-neg15.0%

        \[\leadsto \color{blue}{\sqrt{x} \cdot \sqrt{x} - \left(-y\right) \cdot \frac{z}{t}} \]
      12. add-sqr-sqrt46.2%

        \[\leadsto \color{blue}{x} - \left(-y\right) \cdot \frac{z}{t} \]
      13. add-sqr-sqrt21.0%

        \[\leadsto x - \color{blue}{\left(\sqrt{-y} \cdot \sqrt{-y}\right)} \cdot \frac{z}{t} \]
      14. sqrt-unprod52.2%

        \[\leadsto x - \color{blue}{\sqrt{\left(-y\right) \cdot \left(-y\right)}} \cdot \frac{z}{t} \]
      15. sqr-neg52.2%

        \[\leadsto x - \sqrt{\color{blue}{y \cdot y}} \cdot \frac{z}{t} \]
      16. sqrt-unprod40.1%

        \[\leadsto x - \color{blue}{\left(\sqrt{y} \cdot \sqrt{y}\right)} \cdot \frac{z}{t} \]
      17. add-sqr-sqrt79.9%

        \[\leadsto x - \color{blue}{y} \cdot \frac{z}{t} \]
    8. Applied egg-rr79.9%

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

    if -2.34999999999999993e42 < t < -1.0499999999999999e-14 or -7.4999999999999997e-83 < t < 24

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.26 \cdot 10^{+187}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.35 \cdot 10^{+42}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -1.05 \cdot 10^{-14}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -6.7 \cdot 10^{-68}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 24\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 86.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{if}\;t \leq -0.225:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-40}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+75}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* y (- 1.0 (/ z t))))))
   (if (<= t -0.225)
     t_1
     (if (<= t -9e-15)
       (+ x (/ y (/ a (- z t))))
       (if (<= t -7.5e-83)
         t_1
         (if (<= t 5e-40)
           (+ x (/ (* y z) (- a t)))
           (if (<= t 9.5e+75) (+ x (* y (/ z (- a t)))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (y * (1.0 - (z / t)));
	double tmp;
	if (t <= -0.225) {
		tmp = t_1;
	} else if (t <= -9e-15) {
		tmp = x + (y / (a / (z - t)));
	} else if (t <= -7.5e-83) {
		tmp = t_1;
	} else if (t <= 5e-40) {
		tmp = x + ((y * z) / (a - t));
	} else if (t <= 9.5e+75) {
		tmp = x + (y * (z / (a - 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 + (y * (1.0d0 - (z / t)))
    if (t <= (-0.225d0)) then
        tmp = t_1
    else if (t <= (-9d-15)) then
        tmp = x + (y / (a / (z - t)))
    else if (t <= (-7.5d-83)) then
        tmp = t_1
    else if (t <= 5d-40) then
        tmp = x + ((y * z) / (a - t))
    else if (t <= 9.5d+75) then
        tmp = x + (y * (z / (a - 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 + (y * (1.0 - (z / t)));
	double tmp;
	if (t <= -0.225) {
		tmp = t_1;
	} else if (t <= -9e-15) {
		tmp = x + (y / (a / (z - t)));
	} else if (t <= -7.5e-83) {
		tmp = t_1;
	} else if (t <= 5e-40) {
		tmp = x + ((y * z) / (a - t));
	} else if (t <= 9.5e+75) {
		tmp = x + (y * (z / (a - t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (y * (1.0 - (z / t)))
	tmp = 0
	if t <= -0.225:
		tmp = t_1
	elif t <= -9e-15:
		tmp = x + (y / (a / (z - t)))
	elif t <= -7.5e-83:
		tmp = t_1
	elif t <= 5e-40:
		tmp = x + ((y * z) / (a - t))
	elif t <= 9.5e+75:
		tmp = x + (y * (z / (a - t)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(z / t))))
	tmp = 0.0
	if (t <= -0.225)
		tmp = t_1;
	elseif (t <= -9e-15)
		tmp = Float64(x + Float64(y / Float64(a / Float64(z - t))));
	elseif (t <= -7.5e-83)
		tmp = t_1;
	elseif (t <= 5e-40)
		tmp = Float64(x + Float64(Float64(y * z) / Float64(a - t)));
	elseif (t <= 9.5e+75)
		tmp = Float64(x + Float64(y * Float64(z / Float64(a - t))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (y * (1.0 - (z / t)));
	tmp = 0.0;
	if (t <= -0.225)
		tmp = t_1;
	elseif (t <= -9e-15)
		tmp = x + (y / (a / (z - t)));
	elseif (t <= -7.5e-83)
		tmp = t_1;
	elseif (t <= 5e-40)
		tmp = x + ((y * z) / (a - t));
	elseif (t <= 9.5e+75)
		tmp = x + (y * (z / (a - t)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -0.225], t$95$1, If[LessEqual[t, -9e-15], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.5e-83], t$95$1, If[LessEqual[t, 5e-40], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+75], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-83}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -0.225000000000000006 or -8.9999999999999995e-15 < t < -7.4999999999999997e-83 or 9.50000000000000061e75 < t

    1. Initial program 73.4%

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

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

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

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

        \[\leadsto x - \color{blue}{y \cdot \frac{z - t}{t}} \]
      4. div-sub91.1%

        \[\leadsto x - y \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)} \]
      5. sub-neg91.1%

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

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

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

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

    if -0.225000000000000006 < t < -8.9999999999999995e-15

    1. Initial program 68.7%

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

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

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

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

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

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

    if -7.4999999999999997e-83 < t < 4.99999999999999965e-40

    1. Initial program 95.8%

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

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

    if 4.99999999999999965e-40 < t < 9.50000000000000061e75

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.225:\\ \;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-15}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-40}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+75}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 98.1% accurate, 0.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t))) < -4.9999999999999997e38

    1. Initial program 78.0%

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

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

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

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

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

    if -4.9999999999999997e38 < (+.f64 x (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)))

    1. Initial program 87.8%

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

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

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

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

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

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

Alternative 5: 85.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.70000000000000011e-48 or 2.3e5 < z

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

    if -2.70000000000000011e-48 < z < 2.3e5

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

Alternative 6: 84.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{+188} \lor \neg \left(t \leq 2.15 \cdot 10^{+126}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.95e188 or 2.1500000000000001e126 < t

    1. Initial program 58.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative83.6%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.6%

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

    if -1.95e188 < t < 2.1500000000000001e126

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

Alternative 7: 69.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.01 \cdot 10^{-25}:\\
\;\;\;\;x - \frac{y \cdot z}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -1.01000000000000001e-25

    1. Initial program 87.7%

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

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

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

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

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

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

    if -1.01000000000000001e-25 < x < 1.85e-156

    1. Initial program 78.7%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \frac{z - t}{1}} \]
      3. /-rgt-identity77.5%

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

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

    if 1.85e-156 < x

    1. Initial program 88.5%

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    5. Simplified74.8%

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

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

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

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

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

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

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

Alternative 8: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.044 \lor \neg \left(t \leq 490\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.043999999999999997 or 490 < t

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative73.7%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified73.7%

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

    if -0.043999999999999997 < t < 490

    1. Initial program 94.7%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.021 \lor \neg \left(t \leq 0.205\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.0210000000000000013 or 0.204999999999999988 < t

    1. Initial program 72.0%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative73.7%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified73.7%

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

    if -0.0210000000000000013 < t < 0.204999999999999988

    1. Initial program 94.7%

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

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

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

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

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

Alternative 10: 62.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{-91} \lor \neg \left(t \leq 2.6 \cdot 10^{+110}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.9999999999999997e-91 or 2.6e110 < t

    1. Initial program 71.8%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified73.5%

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

    if -6.9999999999999997e-91 < t < 2.6e110

    1. Initial program 95.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7 \cdot 10^{-91} \lor \neg \left(t \leq 2.6 \cdot 10^{+110}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 98.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 12: 50.2% 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 84.6%

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

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

Developer target: 98.0% accurate, 1.0× speedup?

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

\\
x + \frac{y}{\frac{a - t}{z - t}}
\end{array}

Reproduce

?
herbie shell --seed 2024096 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

  :alt
  (+ x (/ y (/ (- a t) (- z t))))

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