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

Percentage Accurate: 85.8% → 98.4%
Time: 8.9s
Alternatives: 12
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 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.8% 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.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 79.6%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative79.6%

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

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

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

    if -5.0000000000000004e90 < z

    1. Initial program 91.6%

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

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

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

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

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

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

Alternative 2: 83.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{+46} \lor \neg \left(t \leq 3.4 \cdot 10^{+84}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.80000000000000018e46 or 3.3999999999999998e84 < t

    1. Initial program 79.9%

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

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

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

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

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

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

    if -2.80000000000000018e46 < t < 3.3999999999999998e84

    1. Initial program 96.2%

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

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

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

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

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

Alternative 3: 83.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.20000000000000034e56 or 2.89999999999999989e84 < t

    1. Initial program 80.7%

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

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

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

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

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

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

    if -4.20000000000000034e56 < t < 2.89999999999999989e84

    1. Initial program 95.5%

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

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

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

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

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

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

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

Alternative 4: 86.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-22}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.7000000000000002e-22

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

    if -2.7000000000000002e-22 < t < 7e16

    1. Initial program 96.3%

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

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

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

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

    if 7e16 < t

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 84.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.1499999999999999e50

    1. Initial program 80.6%

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

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

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

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

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

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

    if -2.1499999999999999e50 < t < 7.00000000000000042e30

    1. Initial program 96.6%

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

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

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

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

    if 7.00000000000000042e30 < t

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-57} \lor \neg \left(t \leq 2.5 \cdot 10^{+38}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8999999999999999e-57 or 2.49999999999999985e38 < t

    1. Initial program 83.5%

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

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

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

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

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

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

    if -1.8999999999999999e-57 < t < 2.49999999999999985e38

    1. Initial program 95.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}{y \cdot \frac{z - t}{a - t}} \]
    3. Simplified94.1%

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

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

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

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

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

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

Alternative 7: 76.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{-57} \lor \neg \left(t \leq 8.2 \cdot 10^{+36}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.0500000000000001e-57 or 8.20000000000000026e36 < t

    1. Initial program 83.5%

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

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

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

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

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

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

    if -2.0500000000000001e-57 < t < 8.20000000000000026e36

    1. Initial program 95.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}{y \cdot \frac{z - t}{a - t}} \]
    3. Simplified94.1%

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

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

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

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

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

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

Alternative 8: 60.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-76}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 2.95 \cdot 10^{-255}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -9.49999999999999984e-76

    1. Initial program 91.9%

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

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

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

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

    if -9.49999999999999984e-76 < x < 2.95e-255

    1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.95e-255 < x

    1. Initial program 90.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-76}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 2.95 \cdot 10^{-255}:\\ \;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 98.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 79.6%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative79.6%

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

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

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

    if -5.0000000000000002e91 < z

    1. Initial program 91.6%

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

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

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

Alternative 10: 63.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.90000000000000009e-42 or 1.49999999999999992e33 < t

    1. Initial program 82.7%

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

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

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

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

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

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

    if -1.90000000000000009e-42 < t < 1.49999999999999992e33

    1. Initial program 96.2%

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

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

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

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

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

Alternative 11: 98.2% accurate, 1.0× speedup?

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

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

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

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

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

Alternative 12: 50.8% 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 89.6%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Add Preprocessing

Developer target: 98.3% accurate, 1.0× speedup?

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

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

Reproduce

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

  :alt
  (+ x (/ y (/ (- a t) (- z t))))

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