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

Percentage Accurate: 98.1% → 98.1%
Time: 8.7s
Alternatives: 11
Speedup: 1.0×

Specification

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

\\
x + y \cdot \frac{z - t}{z - a}
\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 11 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: 98.1% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Final simplification98.1%

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

Alternative 2: 76.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+33}:\\
\;\;\;\;x + y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.19999999999999994e33 or 6.2000000000000002e75 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 77.6%

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

    if -2.19999999999999994e33 < z < 2.3000000000000002e-78

    1. Initial program 95.7%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 80.5%

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

    if 2.3000000000000002e-78 < z < 6.2000000000000002e75

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 80.5%

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

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

        \[\leadsto x + \frac{\color{blue}{-t \cdot y}}{z} \]
      2. distribute-lft-neg-out78.7%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+33}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{-78}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 6.2 \cdot 10^{+75}:\\ \;\;\;\;x - y \cdot \frac{t}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 3: 76.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+29}:\\
\;\;\;\;x + y\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.0500000000000001e29 or 5.5000000000000001e75 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 77.6%

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

    if -1.0500000000000001e29 < z < 4e-78

    1. Initial program 95.7%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 80.5%

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

    if 4e-78 < z < 5.5000000000000001e75

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 80.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+29}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-78}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+75}:\\ \;\;\;\;x - t \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 4: 80.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.175 \lor \neg \left(z \leq 8 \cdot 10^{-156}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.17499999999999999 or 8.00000000000000032e-156 < z

    1. Initial program 99.4%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 83.9%

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

    if -0.17499999999999999 < z < 8.00000000000000032e-156

    1. Initial program 95.6%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 82.9%

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

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

Alternative 5: 82.1% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -3.55e61 or 8.00000000000000008e55 < a

    1. Initial program 98.1%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around inf 81.7%

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

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

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

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

    if -3.55e61 < a < 8.00000000000000008e55

    1. Initial program 98.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 68.1%

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

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

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

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

Alternative 6: 86.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.47 \lor \neg \left(z \leq 7.6 \cdot 10^{+74}\right):\\
\;\;\;\;x + y \cdot \frac{z}{z - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -0.46999999999999997 or 7.5999999999999997e74 < z

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 87.1%

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

    if -0.46999999999999997 < z < 7.5999999999999997e74

    1. Initial program 96.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around inf 87.6%

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

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

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

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

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

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

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

Alternative 7: 81.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in t around 0 83.3%

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

    if -0.13 < z < 3.7999999999999999e-78

    1. Initial program 95.3%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 82.3%

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

    if 3.7999999999999999e-78 < z

    1. Initial program 100.0%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 86.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.13:\\ \;\;\;\;x + y \cdot \frac{z}{z - a}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-78}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \end{array} \]

Alternative 8: 76.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+35} \lor \neg \left(z \leq 9 \cdot 10^{+74}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0499999999999999e35 or 8.9999999999999999e74 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 77.6%

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

    if -1.0499999999999999e35 < z < 8.9999999999999999e74

    1. Initial program 96.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Step-by-step derivation
      1. associate-*r/94.5%

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

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

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

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

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

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

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

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

Alternative 9: 76.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.2 \cdot 10^{+33} \lor \neg \left(z \leq 3.9 \cdot 10^{+76}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.20000000000000042e33 or 3.89999999999999989e76 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 77.6%

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

    if -9.20000000000000042e33 < z < 3.89999999999999989e76

    1. Initial program 96.5%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around 0 77.0%

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

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

Alternative 10: 62.3% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{-104} \lor \neg \left(z \leq 1.02 \cdot 10^{+15}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.4999999999999998e-104 or 1.02e15 < z

    1. Initial program 99.9%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in z around inf 71.8%

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

    if -5.4999999999999998e-104 < z < 1.02e15

    1. Initial program 95.2%

      \[x + y \cdot \frac{z - t}{z - a} \]
    2. Taylor expanded in a around 0 45.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.5 \cdot 10^{-104} \lor \neg \left(z \leq 1.02 \cdot 10^{+15}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 50.1% 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 98.1%

    \[x + y \cdot \frac{z - t}{z - a} \]
  2. Taylor expanded in a around 0 55.3%

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

      \[\leadsto x + \color{blue}{\frac{y}{\frac{z}{z - t}}} \]
  4. Simplified67.0%

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

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

    \[\leadsto x \]

Developer target: 98.2% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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