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

Percentage Accurate: 85.1% → 98.3%
Time: 10.6s
Alternatives: 16
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 16 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.1% 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 88.2%

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

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

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

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

Alternative 2: 60.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -1.55 \cdot 10^{+24}:\\
\;\;\;\;x\\

\mathbf{elif}\;z \leq -8.2 \cdot 10^{-10} \lor \neg \left(z \leq 3.5 \cdot 10^{+85}\right) \land z \leq 4 \cdot 10^{+176}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -9.400000000000001e132 or -1.55000000000000005e24 < z < -8.1999999999999996e-10 or 3.50000000000000005e85 < z < 4e176

    1. Initial program 78.3%

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    6. Applied egg-rr79.2%

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

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

    if -9.400000000000001e132 < z < -1.55000000000000005e24

    1. Initial program 96.4%

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

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

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

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

    if -8.1999999999999996e-10 < z < 3.50000000000000005e85 or 4e176 < z

    1. Initial program 90.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.4 \cdot 10^{+132}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;z \leq -1.55 \cdot 10^{+24}:\\ \;\;\;\;x\\ \mathbf{elif}\;z \leq -8.2 \cdot 10^{-10} \lor \neg \left(z \leq 3.5 \cdot 10^{+85}\right) \land z \leq 4 \cdot 10^{+176}:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 72.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;y \leq -5.5 \cdot 10^{-132}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\

\mathbf{elif}\;y \leq -5.8 \cdot 10^{-202}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 61000000000000:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.0500000000000001e161 or 6.1e13 < y

    1. Initial program 73.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    6. Applied egg-rr83.3%

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

    if -2.0500000000000001e161 < y < -5.4999999999999999e-132

    1. Initial program 86.3%

      \[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}{a - t} \cdot \left(z - t\right)} \]
    3. Simplified98.0%

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

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

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

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

    if -5.4999999999999999e-132 < y < -5.79999999999999976e-202

    1. Initial program 99.9%

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

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

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

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

    if -5.79999999999999976e-202 < y < 6.1e13

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+161}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \mathbf{elif}\;y \leq -5.5 \cdot 10^{-132}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{elif}\;y \leq -5.8 \cdot 10^{-202}:\\ \;\;\;\;x\\ \mathbf{elif}\;y \leq 61000000000000:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 4: 74.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -335000:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\

\mathbf{elif}\;t \leq -7.1 \cdot 10^{-43}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.1000000000000002e76 or -335000 < t < -7.10000000000000025e-43 or 6.8000000000000005e-35 < t

    1. Initial program 80.5%

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

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

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

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

    if -5.1000000000000002e76 < t < -335000

    1. Initial program 84.9%

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

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

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

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

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

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

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

    if -7.10000000000000025e-43 < t < 6.8000000000000005e-35

    1. Initial program 95.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -335000:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq -7.1 \cdot 10^{-43}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-35}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 5: 74.5% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t \leq -740:\\
\;\;\;\;y \cdot \frac{z}{a - t}\\

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-43}:\\
\;\;\;\;x + y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.1000000000000002e76 or -740 < t < -8.50000000000000056e-43 or 6.8000000000000005e-35 < t

    1. Initial program 80.5%

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

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

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

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

    if -5.1000000000000002e76 < t < -740

    1. Initial program 84.9%

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

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

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

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

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

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

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

    if -8.50000000000000056e-43 < t < 6.8000000000000005e-35

    1. Initial program 95.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.1 \cdot 10^{+76}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -740:\\ \;\;\;\;y \cdot \frac{z}{a - t}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-43}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{-35}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 6: 76.5% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1000000000000001e135 or 1.01999999999999997e-34 < t

    1. Initial program 76.8%

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

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

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

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

    if -2.1000000000000001e135 < t < -8.79999999999999989e-43

    1. Initial program 89.5%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.9%

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{z - t}{\frac{t}{y}}} \]
    8. Simplified80.1%

      \[\leadsto \color{blue}{x - \frac{z - t}{\frac{t}{y}}} \]
    9. Taylor expanded in z around inf 61.7%

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

    if -8.79999999999999989e-43 < t < 1.01999999999999997e-34

    1. Initial program 95.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{+135}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -8.8 \cdot 10^{-43}:\\ \;\;\;\;x - \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 1.02 \cdot 10^{-34}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 7: 74.9% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t \leq -6.1 \cdot 10^{-43}:\\
\;\;\;\;y - z \cdot \frac{y}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.00000000000000005e54 or 9.4e-35 < t

    1. Initial program 78.6%

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

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

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

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

    if -5.00000000000000005e54 < t < -6.10000000000000037e-43

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{z - t}{\frac{t}{y}}} \]
      3. div-sub64.9%

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

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

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

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

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

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

        \[\leadsto -\left(\frac{y \cdot z}{t} - \frac{y}{\color{blue}{1}}\right) \]
      10. /-rgt-identity58.7%

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

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

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

        \[\leadsto \color{blue}{\left(-\left(-y\right)\right) + \left(-\frac{y \cdot z}{t}\right)} \]
      14. remove-double-neg58.7%

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

        \[\leadsto \color{blue}{y - \frac{y \cdot z}{t}} \]
      16. *-commutative58.7%

        \[\leadsto y - \frac{\color{blue}{z \cdot y}}{t} \]
      17. associate-*r/64.9%

        \[\leadsto y - \color{blue}{z \cdot \frac{y}{t}} \]
    9. Simplified64.9%

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

    if -6.10000000000000037e-43 < t < 9.4e-35

    1. Initial program 95.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+54}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -6.1 \cdot 10^{-43}:\\ \;\;\;\;y - z \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 9.4 \cdot 10^{-35}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 83.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.6499999999999999e-111 or 1.4799999999999999e-111 < x

    1. Initial program 89.4%

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

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

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

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

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

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

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

    if -2.6499999999999999e-111 < x < 1.4799999999999999e-111

    1. Initial program 85.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -2.65 \cdot 10^{-111} \lor \neg \left(x \leq 1.48 \cdot 10^{-111}\right):\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]

Alternative 9: 84.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.9 \cdot 10^{-43} \lor \neg \left(t \leq 3.15 \cdot 10^{-30}\right):\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.89999999999999976e-43 or 3.14999999999999991e-30 < t

    1. Initial program 80.8%

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

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

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

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

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

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

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

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

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

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

    if -5.89999999999999976e-43 < t < 3.14999999999999991e-30

    1. Initial program 95.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.9 \cdot 10^{-43} \lor \neg \left(t \leq 3.15 \cdot 10^{-30}\right):\\ \;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\ \end{array} \]

Alternative 10: 87.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{a - t}\\ \mathbf{if}\;z \leq -8.5 \cdot 10^{-11} \lor \neg \left(z \leq 1.8 \cdot 10^{-22}\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 -8.5e-11) (not (<= z 1.8e-22)))
     (+ 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 <= -8.5e-11) || !(z <= 1.8e-22)) {
		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 <= (-8.5d-11)) .or. (.not. (z <= 1.8d-22))) 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 <= -8.5e-11) || !(z <= 1.8e-22)) {
		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 <= -8.5e-11) or not (z <= 1.8e-22):
		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 <= -8.5e-11) || !(z <= 1.8e-22))
		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 <= -8.5e-11) || ~((z <= 1.8e-22)))
		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, -8.5e-11], N[Not[LessEqual[z, 1.8e-22]], $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 -8.5 \cdot 10^{-11} \lor \neg \left(z \leq 1.8 \cdot 10^{-22}\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 < -8.50000000000000037e-11 or 1.7999999999999999e-22 < z

    1. Initial program 83.9%

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

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

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

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

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

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

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

    if -8.50000000000000037e-11 < z < 1.7999999999999999e-22

    1. Initial program 93.4%

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

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

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

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

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

        \[\leadsto x + \frac{\color{blue}{-y \cdot t}}{a - t} \]
      3. distribute-rgt-neg-out86.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{-11} \lor \neg \left(z \leq 1.8 \cdot 10^{-22}\right):\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x - t \cdot \frac{y}{a - t}\\ \end{array} \]

Alternative 11: 96.1% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 12: 59.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+132}:\\
\;\;\;\;y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -6.1999999999999995e132

    1. Initial program 82.5%

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

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

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

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

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

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

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

    if -6.1999999999999995e132 < z

    1. Initial program 89.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+132}:\\ \;\;\;\;y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 13: 59.9% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.8 \cdot 10^{+133}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.80000000000000032e133

    1. Initial program 82.5%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{a}} \cdot y \]
    8. Step-by-step derivation
      1. *-commutative58.4%

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} \]
      2. clear-num58.5%

        \[\leadsto y \cdot \color{blue}{\frac{1}{\frac{a}{z}}} \]
      3. un-div-inv58.5%

        \[\leadsto \color{blue}{\frac{y}{\frac{a}{z}}} \]
    9. Applied egg-rr58.5%

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

    if -9.80000000000000032e133 < z

    1. Initial program 89.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.8 \cdot 10^{+133}:\\ \;\;\;\;\frac{y}{\frac{a}{z}}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 14: 52.8% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+164}:\\
\;\;\;\;y\\

\mathbf{elif}\;y \leq 10^{+214}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.94999999999999993e164 or 9.9999999999999995e213 < y

    1. Initial program 70.8%

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

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

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

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

        \[\leadsto \color{blue}{\frac{z - t}{a - t} \cdot y} \]
    6. Applied egg-rr84.0%

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

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

    if -1.94999999999999993e164 < y < 9.9999999999999995e213

    1. Initial program 92.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.95 \cdot 10^{+164}:\\ \;\;\;\;y\\ \mathbf{elif}\;y \leq 10^{+214}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]

Alternative 15: 60.2% accurate, 3.7× speedup?

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

\\
x + y
\end{array}
Derivation
  1. Initial program 88.2%

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

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

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

    \[\leadsto \color{blue}{y + x} \]
  5. Final simplification58.2%

    \[\leadsto x + y \]

Alternative 16: 50.0% accurate, 11.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 88.2%

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification49.4%

    \[\leadsto x \]

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 2023230 
(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))))