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

Percentage Accurate: 85.3% → 98.1%
Time: 11.9s
Alternatives: 15
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 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{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: 98.1% 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.8%

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

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

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

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

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

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

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

Alternative 2: 83.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y}{t} \cdot \left(t - z\right)\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-262}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+14}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (/ y t) (- t z)))))
   (if (<= t -1.45e-40)
     t_1
     (if (<= t 4.6e-262)
       (+ x (/ y (/ a (- z t))))
       (if (<= t 2.6e+14) (+ x (/ (* y z) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y / t) * (t - z));
	double tmp;
	if (t <= -1.45e-40) {
		tmp = t_1;
	} else if (t <= 4.6e-262) {
		tmp = x + (y / (a / (z - t)));
	} else if (t <= 2.6e+14) {
		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 / t) * (t - z))
    if (t <= (-1.45d-40)) then
        tmp = t_1
    else if (t <= 4.6d-262) then
        tmp = x + (y / (a / (z - t)))
    else if (t <= 2.6d+14) 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 / t) * (t - z));
	double tmp;
	if (t <= -1.45e-40) {
		tmp = t_1;
	} else if (t <= 4.6e-262) {
		tmp = x + (y / (a / (z - t)));
	} else if (t <= 2.6e+14) {
		tmp = x + ((y * z) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y / t) * (t - z))
	tmp = 0
	if t <= -1.45e-40:
		tmp = t_1
	elif t <= 4.6e-262:
		tmp = x + (y / (a / (z - t)))
	elif t <= 2.6e+14:
		tmp = x + ((y * z) / (a - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y / t) * Float64(t - z)))
	tmp = 0.0
	if (t <= -1.45e-40)
		tmp = t_1;
	elseif (t <= 4.6e-262)
		tmp = Float64(x + Float64(y / Float64(a / Float64(z - t))));
	elseif (t <= 2.6e+14)
		tmp = Float64(x + Float64(Float64(y * 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 / t) * (t - z));
	tmp = 0.0;
	if (t <= -1.45e-40)
		tmp = t_1;
	elseif (t <= 4.6e-262)
		tmp = x + (y / (a / (z - t)));
	elseif (t <= 2.6e+14)
		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[(N[(y / t), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-40], t$95$1, If[LessEqual[t, 4.6e-262], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+14], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.4499999999999999e-40 or 2.6e14 < t

    1. Initial program 76.7%

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    7. Step-by-step derivation
      1. frac-2neg99.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\left(-a\right) + \color{blue}{\sqrt{t} \cdot \sqrt{t}}} \cdot \left(-\left(z - t\right)\right) \]
      14. add-sqr-sqrt93.1%

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\left(-a\right) + t} \cdot \left(\left(-z\right) + \left(-\color{blue}{\sqrt{t} \cdot \sqrt{t}}\right)\right) \]
      21. add-sqr-sqrt61.8%

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

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

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

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

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

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

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

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

    if -1.4499999999999999e-40 < t < 4.6000000000000002e-262

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if 4.6000000000000002e-262 < t < 2.6e14

    1. Initial program 95.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-40}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(t - z\right)\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-262}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{+14}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{t} \cdot \left(t - z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 85.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot \left(\frac{z}{t} + -1\right)\\ \mathbf{if}\;t \leq -1 \cdot 10^{-41}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-262}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+27}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y (+ (/ z t) -1.0)))))
   (if (<= t -1e-41)
     t_1
     (if (<= t 4.8e-262)
       (+ x (/ y (/ a (- z t))))
       (if (<= t 1.6e+27) (+ x (/ (* y z) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * ((z / t) + -1.0));
	double tmp;
	if (t <= -1e-41) {
		tmp = t_1;
	} else if (t <= 4.8e-262) {
		tmp = x + (y / (a / (z - t)));
	} else if (t <= 1.6e+27) {
		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 * ((z / t) + (-1.0d0)))
    if (t <= (-1d-41)) then
        tmp = t_1
    else if (t <= 4.8d-262) then
        tmp = x + (y / (a / (z - t)))
    else if (t <= 1.6d+27) 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 * ((z / t) + -1.0));
	double tmp;
	if (t <= -1e-41) {
		tmp = t_1;
	} else if (t <= 4.8e-262) {
		tmp = x + (y / (a / (z - t)));
	} else if (t <= 1.6e+27) {
		tmp = x + ((y * z) / (a - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (y * ((z / t) + -1.0))
	tmp = 0
	if t <= -1e-41:
		tmp = t_1
	elif t <= 4.8e-262:
		tmp = x + (y / (a / (z - t)))
	elif t <= 1.6e+27:
		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(Float64(z / t) + -1.0)))
	tmp = 0.0
	if (t <= -1e-41)
		tmp = t_1;
	elseif (t <= 4.8e-262)
		tmp = Float64(x + Float64(y / Float64(a / Float64(z - t))));
	elseif (t <= 1.6e+27)
		tmp = Float64(x + Float64(Float64(y * 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 * ((z / t) + -1.0));
	tmp = 0.0;
	if (t <= -1e-41)
		tmp = t_1;
	elseif (t <= 4.8e-262)
		tmp = x + (y / (a / (z - t)));
	elseif (t <= 1.6e+27)
		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[(N[(z / t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e-41], t$95$1, If[LessEqual[t, 4.8e-262], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+27], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.00000000000000001e-41 or 1.60000000000000008e27 < t

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000001e-41 < t < 4.8000000000000001e-262

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if 4.8000000000000001e-262 < t < 1.60000000000000008e27

    1. Initial program 95.2%

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

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

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

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

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

Alternative 4: 84.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.7999999999999997e-41

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.7999999999999997e-41 < t < 4.6000000000000002e-262

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if 4.6000000000000002e-262 < t < 1.20000000000000005e-60

    1. Initial program 96.1%

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

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

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

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

    if 1.20000000000000005e-60 < t

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
      3. *-commutative69.5%

        \[\leadsto x - \frac{\color{blue}{y \cdot t}}{a - t} \]
      4. sub-neg69.5%

        \[\leadsto x - \frac{y \cdot t}{\color{blue}{a + \left(-t\right)}} \]
      5. remove-double-neg69.5%

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

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

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

        \[\leadsto x - y \cdot \frac{t}{\color{blue}{\left(-\left(-a\right)\right) + \left(-t\right)}} \]
      9. remove-double-neg85.1%

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

        \[\leadsto x - y \cdot \frac{t}{\color{blue}{a - t}} \]
    9. Simplified85.1%

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

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

Alternative 5: 84.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -7.49999999999999972e-42

    1. Initial program 77.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - y \cdot \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)} \]
      5. *-inverses86.8%

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

      \[\leadsto \color{blue}{x - y \cdot \left(\frac{z}{t} - 1\right)} \]
    10. Step-by-step derivation
      1. sub-neg86.8%

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

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

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

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

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

    if -7.49999999999999972e-42 < t < 4.8000000000000001e-262

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if 4.8000000000000001e-262 < t < 4.2999999999999997e-62

    1. Initial program 96.1%

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

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

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

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

    if 4.2999999999999997e-62 < t

    1. Initial program 78.6%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x - \frac{t \cdot y}{a - t}} \]
      3. *-commutative69.5%

        \[\leadsto x - \frac{\color{blue}{y \cdot t}}{a - t} \]
      4. sub-neg69.5%

        \[\leadsto x - \frac{y \cdot t}{\color{blue}{a + \left(-t\right)}} \]
      5. remove-double-neg69.5%

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

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

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

        \[\leadsto x - y \cdot \frac{t}{\color{blue}{\left(-\left(-a\right)\right) + \left(-t\right)}} \]
      9. remove-double-neg85.1%

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

        \[\leadsto x - y \cdot \frac{t}{\color{blue}{a - t}} \]
    9. Simplified85.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-42}:\\ \;\;\;\;x + \left(y - y \cdot \frac{z}{t}\right)\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-262}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{-62}:\\ \;\;\;\;x + \frac{y \cdot z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 81.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.4e-51 or 2.6000000000000002e-46 < a

    1. Initial program 82.2%

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

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

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

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

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

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

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

    if -4.4e-51 < a < 2.6000000000000002e-46

    1. Initial program 87.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 83.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{+41} \lor \neg \left(z \leq 1350000\right):\\ \;\;\;\;x + \frac{y \cdot 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 -1.5e+41) (not (<= z 1350000.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 <= -1.5e+41) || !(z <= 1350000.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 <= (-1.5d+41)) .or. (.not. (z <= 1350000.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 <= -1.5e+41) || !(z <= 1350000.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 <= -1.5e+41) or not (z <= 1350000.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 <= -1.5e+41) || !(z <= 1350000.0))
		tmp = Float64(x + Float64(Float64(y * 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 <= -1.5e+41) || ~((z <= 1350000.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, -1.5e+41], N[Not[LessEqual[z, 1350000.0]], $MachinePrecision]], N[(x + N[(N[(y * z), $MachinePrecision] / N[(a - t), $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 -1.5 \cdot 10^{+41} \lor \neg \left(z \leq 1350000\right):\\
\;\;\;\;x + \frac{y \cdot 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 < -1.4999999999999999e41 or 1.35e6 < z

    1. Initial program 83.5%

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

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

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

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

    if -1.4999999999999999e41 < z < 1.35e6

    1. Initial program 86.0%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{a - t}} \]
    7. Simplified86.2%

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

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

Alternative 8: 79.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.000165:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.65e-4

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

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

    if -1.65e-4 < a < 2.59999999999999995e-49

    1. Initial program 88.3%

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    7. Step-by-step derivation
      1. frac-2neg98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\left(-a\right) + t} \cdot \left(\left(-z\right) + \left(-\color{blue}{\sqrt{t} \cdot \sqrt{t}}\right)\right) \]
      21. add-sqr-sqrt70.8%

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

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

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

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

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

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

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

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

    if 2.59999999999999995e-49 < a

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

Alternative 9: 63.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.2 \cdot 10^{+58} \lor \neg \left(y \leq 2.25 \cdot 10^{+106}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.2e58 or 2.2499999999999998e106 < y

    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(y \cdot \left(\frac{z}{t} - 1\right)\right)} \]
    11. Step-by-step derivation
      1. sub-neg50.7%

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

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

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

        \[\leadsto \color{blue}{-\left(y \cdot \left(\frac{z}{t} + -1\right)\right) \cdot 1} \]
      5. *-rgt-identity50.7%

        \[\leadsto -\color{blue}{y \cdot \left(\frac{z}{t} + -1\right)} \]
      6. distribute-rgt-neg-in50.7%

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

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

        \[\leadsto y \cdot \left(0 - \color{blue}{\left(-1 + \frac{z}{t}\right)}\right) \]
      9. associate--r+50.7%

        \[\leadsto y \cdot \color{blue}{\left(\left(0 - -1\right) - \frac{z}{t}\right)} \]
      10. metadata-eval50.7%

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

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

    if -8.2e58 < y < 2.2499999999999998e106

    1. Initial program 93.8%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified74.0%

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

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

Alternative 10: 75.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-21} \lor \neg \left(t \leq 34000000000000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.3500000000000001e-21 or 3.4e13 < t

    1. Initial program 75.4%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified78.9%

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

    if -1.3500000000000001e-21 < t < 3.4e13

    1. Initial program 93.5%

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

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

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

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

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

Alternative 11: 76.4% accurate, 0.6× speedup?

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

    1. Initial program 75.6%

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

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

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

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

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

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

    if -2.6000000000000001e-11 < t < 1.60000000000000008e27

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

Alternative 12: 76.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-11} \lor \neg \left(t \leq 6.2 \cdot 10^{+37}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.6000000000000005e-11 or 6.2000000000000004e37 < t

    1. Initial program 75.6%

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

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

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

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

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

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

    if -6.6000000000000005e-11 < t < 6.2000000000000004e37

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 63.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-162} \lor \neg \left(t \leq 3.6 \cdot 10^{-68}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2e-162 or 3.60000000000000007e-68 < t

    1. Initial program 80.2%

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified71.1%

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

    if -4.2e-162 < t < 3.60000000000000007e-68

    1. Initial program 93.5%

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

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

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

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

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

Alternative 14: 97.9% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 15: 51.4% 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.8%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification48.6%

    \[\leadsto x \]
  7. Add Preprocessing

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

  :herbie-target
  (+ x (/ y (/ (- a t) (- z t))))

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