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

Percentage Accurate: 85.7% → 98.1%
Time: 9.2s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

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

Initial Program: 85.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% accurate, 1.0× speedup?

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

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

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

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

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

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

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

Alternative 2: 80.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.1e8 or 8.4999999999999996e-10 < z

    1. Initial program 84.7%

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

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

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

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

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

    if -2.1e8 < z < 8.4999999999999996e-10

    1. Initial program 96.0%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    4. Simplified85.2%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}} + x} \]
    5. Step-by-step derivation
      1. clear-num85.2%

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

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

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

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

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

Alternative 3: 80.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.99999999999999978e-69 or 6.5000000000000003e-10 < z

    1. Initial program 85.7%

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

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

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

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

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

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

    if -5.99999999999999978e-69 < z < 6.5000000000000003e-10

    1. Initial program 97.0%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    4. Simplified90.9%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}} + x} \]
    5. Step-by-step derivation
      1. clear-num90.9%

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

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

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

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

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

Alternative 4: 79.9% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.00000000000000002e-35 or 6.59999999999999999e-122 < a

    1. Initial program 89.7%

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

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

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

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

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

      \[\leadsto \color{blue}{x - \frac{y}{\frac{a}{z - t}}} \]
    5. Step-by-step derivation
      1. clear-num86.6%

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

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

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

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

    if -2.00000000000000002e-35 < a < 6.59999999999999999e-122

    1. Initial program 92.8%

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

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

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

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

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

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

Alternative 5: 78.4% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 89.4%

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

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

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

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

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

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

    if -1.24999999999999992e-12 < a < 6.59999999999999999e-122

    1. Initial program 93.1%

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

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

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

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

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

    if 6.59999999999999999e-122 < a

    1. Initial program 89.3%

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

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

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

        \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}}} + x \]
    4. Simplified82.8%

      \[\leadsto \color{blue}{\frac{t}{\frac{a}{y}} + x} \]
    5. Step-by-step derivation
      1. clear-num82.9%

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

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

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

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

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

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

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

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

Alternative 6: 79.9% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

    if -1.5000000000000001e-36 < a < 6.59999999999999999e-122

    1. Initial program 92.8%

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

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

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

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

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

    if 6.59999999999999999e-122 < a

    1. Initial program 89.3%

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

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

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

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

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

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

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

Alternative 7: 62.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+42} \lor \neg \left(z \leq 105000\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.3999999999999999e42 or 105000 < z

    1. Initial program 83.7%

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

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

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

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

    if -2.3999999999999999e42 < z < 105000

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \color{blue}{\frac{z}{a}} \]
      10. associate-*r/52.8%

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

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

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

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

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

Alternative 8: 75.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.80000000000000046e43 or 1.25e-9 < z

    1. Initial program 84.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified76.1%

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

    if -4.80000000000000046e43 < z < 1.25e-9

    1. Initial program 96.2%

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

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

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

Alternative 9: 76.7% accurate, 1.0× speedup?

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

    1. Initial program 84.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified76.1%

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

    if -1.0599999999999999e42 < z < 5.19999999999999962e-10

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

Alternative 10: 76.9% accurate, 1.0× speedup?

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

    1. Initial program 84.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    4. Simplified76.1%

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

    if -3.50000000000000023e42 < z < 9.50000000000000028e-10

    1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 62.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+41} \lor \neg \left(z \leq 0.0009\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.69999999999999999e41 or 8.9999999999999998e-4 < z

    1. Initial program 83.8%

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

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

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

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

    if -1.69999999999999999e41 < z < 8.9999999999999998e-4

    1. Initial program 96.2%

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

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

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

Alternative 12: 50.9% 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 90.8%

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

    \[\leadsto \color{blue}{x} \]
  3. Final simplification52.9%

    \[\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 2023322 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
  :precision binary64

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

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