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

Percentage Accurate: 85.3% → 98.3%
Time: 11.8s
Alternatives: 13
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 13 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.3% 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 85.2%

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

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

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

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

Alternative 2: 84.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -2.8 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.3000000000000002e79 or 1.19999999999999996e145 < t

    1. Initial program 68.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

    if -3.3000000000000002e79 < t < -2.7999999999999999e-137 or -1.6000000000000001e-215 < t < 1.19999999999999996e145

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if -2.7999999999999999e-137 < t < -1.6000000000000001e-215

    1. Initial program 95.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+79}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-137}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-215}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+145}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+45}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;t \leq 6.5 \cdot 10^{+145}:\\
\;\;\;\;x + \frac{z}{\frac{-t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.50000000000000023e45 or 6.50000000000000034e145 < t

    1. Initial program 68.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

    if -3.50000000000000023e45 < t < 2.1999999999999999e-81

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.1999999999999999e-81 < t < 6.50000000000000034e145

    1. Initial program 90.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{-z \cdot y}{\left(-a\right) + t}} \]
    10. Step-by-step derivation
      1. distribute-rgt-neg-in80.6%

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

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

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

        \[\leadsto x + \frac{z}{\frac{\color{blue}{t - a}}{-y}} \]
    11. Simplified84.7%

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

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

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

        \[\leadsto x + \frac{z}{\frac{\color{blue}{-t}}{y}} \]
    14. Simplified76.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{+45}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-81}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 6.5 \cdot 10^{+145}:\\ \;\;\;\;x + \frac{z}{\frac{-t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 76.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+46}:\\
\;\;\;\;x + y\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{+145}:\\
\;\;\;\;x - z \cdot \frac{y}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.84999999999999995e46 or 1.35000000000000011e145 < t

    1. Initial program 68.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

    if -1.84999999999999995e46 < t < 4.80000000000000035e-84

    1. Initial program 93.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.80000000000000035e-84 < t < 1.35000000000000011e145

    1. Initial program 90.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y}{\frac{t}{z}}} \]
    10. Simplified76.0%

      \[\leadsto \color{blue}{x - \frac{y}{\frac{t}{z}}} \]
    11. Step-by-step derivation
      1. associate-/r/76.6%

        \[\leadsto x - \color{blue}{\frac{y}{t} \cdot z} \]
    12. Applied egg-rr76.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{+46}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-84}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{+145}:\\ \;\;\;\;x - z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 84.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+79} \lor \neg \left(t \leq 1.6 \cdot 10^{+145}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.79999999999999971e79 or 1.60000000000000004e145 < t

    1. Initial program 68.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

    if -4.79999999999999971e79 < t < 1.60000000000000004e145

    1. Initial program 91.8%

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

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

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

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

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

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

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

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

Alternative 6: 83.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.99999999999999999e-79 or 6.0000000000000005e-44 < z

    1. Initial program 82.4%

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

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

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

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

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

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

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

    if -9.99999999999999999e-79 < z < 6.0000000000000005e-44

    1. Initial program 89.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot \color{blue}{t}}{-\left(a - t\right)} + x \]
      14. sub-neg83.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 85.3% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.5000000000000003e-78 or 8.7999999999999997e112 < z

    1. Initial program 82.6%

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

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

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

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

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

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

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

    if -6.5000000000000003e-78 < z < 8.7999999999999997e112

    1. Initial program 87.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{\frac{a - t}{y}}} \]
    9. Simplified88.0%

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

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

Alternative 8: 85.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{a - t}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-78} \lor \neg \left(z \leq 1.85 \cdot 10^{+114}\right):\\
\;\;\;\;x + z \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;x - t \cdot t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.2000000000000005e-78 or 1.85e114 < z

    1. Initial program 82.6%

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

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

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

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

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

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

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

    if -7.2000000000000005e-78 < z < 1.85e114

    1. Initial program 87.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

        \[\leadsto \color{blue}{-1 \cdot \frac{t \cdot y}{a - t} + x} \]
      2. mul-1-neg79.6%

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

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

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

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

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

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

Alternative 9: 77.1% accurate, 0.6× speedup?

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

    1. Initial program 70.9%

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

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

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

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

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

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

    if -3.49999999999999985e46 < t < 1.89999999999999995e37

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

Alternative 10: 77.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+43} \lor \neg \left(t \leq 1.16 \cdot 10^{+33}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.8000000000000004e43 or 1.16000000000000001e33 < t

    1. Initial program 70.9%

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

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

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

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

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

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

    if -5.8000000000000004e43 < t < 1.16000000000000001e33

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \color{blue}{\frac{-z \cdot y}{\left(-a\right) + t}} \]
    10. Step-by-step derivation
      1. distribute-rgt-neg-in84.0%

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

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

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

        \[\leadsto x + \frac{z}{\frac{\color{blue}{t - a}}{-y}} \]
    11. Simplified87.6%

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

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

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

Alternative 11: 63.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.7 \cdot 10^{+131}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 4 \cdot 10^{+130}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.7e131 or 4.0000000000000002e130 < a

    1. Initial program 80.4%

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

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

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

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

    if -5.7e131 < a < 4.0000000000000002e130

    1. Initial program 87.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5.7 \cdot 10^{+131}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4 \cdot 10^{+130}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 98.2% 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 85.2%

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

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

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

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

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

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

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

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

Alternative 13: 51.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 85.2%

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

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

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

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

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 98.3% 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 2024036 
(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))))