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

Percentage Accurate: 98.3% → 98.7%
Time: 9.3s
Alternatives: 10
Speedup: 1.0×

Specification

?
\[\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}

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 10 alternatives:

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

Initial Program: 98.3% 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}

Alternative 1: 98.7% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t))) < 1e297

    1. Initial program 98.7%

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

    if 1e297 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 a t)))

    1. Initial program 71.9%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity100.0%

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

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

Alternative 2: 87.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.4999999999999998e-14 or 1.9500000000000001e-70 < z

    1. Initial program 95.5%

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{1} \cdot \frac{y}{a - t}} \]
      4. /-rgt-identity91.8%

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

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

    if -4.4999999999999998e-14 < z < 1.9500000000000001e-70

    1. Initial program 99.0%

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(0 - \left(-t\right)\right) - a}} \]
      7. neg-sub094.9%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-\left(-t\right)\right)} - a} \]
      8. remove-double-neg94.9%

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

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

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

Alternative 3: 87.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.25e-13 or 2.45e-70 < z

    1. Initial program 95.5%

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

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

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

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

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

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

    if -2.25e-13 < z < 2.45e-70

    1. Initial program 99.0%

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(0 - \left(-t\right)\right) - a}} \]
      7. neg-sub094.9%

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{\left(-\left(-t\right)\right)} - a} \]
      8. remove-double-neg94.9%

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

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

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

Alternative 4: 81.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{-120} \lor \neg \left(t \leq 1.45 \cdot 10^{+17}\right):\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.59999999999999973e-120 or 1.45e17 < t

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \frac{t}{\color{blue}{t} - a} \]
    5. Simplified85.0%

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

    if -4.59999999999999973e-120 < t < 1.45e17

    1. Initial program 95.2%

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a}{y}}{z}}} \]
    7. Simplified83.3%

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

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

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

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

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

Alternative 5: 80.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-85} \lor \neg \left(t \leq 6.4 \cdot 10^{-105}\right):\\
\;\;\;\;x + t \cdot \frac{y}{t - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.4000000000000001e-85 or 6.39999999999999962e-105 < t

    1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + t \cdot \frac{y}{\color{blue}{\left(-\left(-t\right)\right)} - a} \]
      10. remove-double-neg80.0%

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

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

    if -2.4000000000000001e-85 < t < 6.39999999999999962e-105

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.6 \cdot 10^{+65} \lor \neg \left(t \leq 7.5 \cdot 10^{+18}\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.6e+65) (not (<= t 7.5e+18))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.6e+65) || !(t <= 7.5e+18)) {
		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.6d+65)) .or. (.not. (t <= 7.5d+18))) 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.6e+65) || !(t <= 7.5e+18)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2.6e+65) or not (t <= 7.5e+18):
		tmp = x + y
	else:
		tmp = x + (z * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.6e+65) || !(t <= 7.5e+18))
		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.6e+65) || ~((t <= 7.5e+18)))
		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.6e+65], N[Not[LessEqual[t, 7.5e+18]], $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.6 \cdot 10^{+65} \lor \neg \left(t \leq 7.5 \cdot 10^{+18}\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.60000000000000003e65 or 7.5e18 < t

    1. Initial program 99.9%

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

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

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

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

    if -2.60000000000000003e65 < t < 7.5e18

    1. Initial program 95.0%

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{a}{y}}{z}}} \]
    7. Simplified81.7%

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

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

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

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

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

Alternative 7: 77.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5000000000000001e64 or 5.5e18 < t

    1. Initial program 99.9%

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

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

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

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

    if -1.5000000000000001e64 < t < 5.5e18

    1. Initial program 95.0%

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{a}} \]
    7. Simplified79.9%

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

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

Alternative 8: 98.4% accurate, 1.0× speedup?

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

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

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-num96.6%

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

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

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

Alternative 9: 62.2% accurate, 1.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.5 \cdot 10^{+57}:\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < 6.4999999999999997e57

    1. Initial program 96.2%

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

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

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

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

    if 6.4999999999999997e57 < a

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + y \cdot \frac{\color{blue}{\left(-\left(-t\right)\right)} - z}{t} \]
      10. remove-double-neg34.0%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 51.1% accurate, 11.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + y \cdot \frac{\color{blue}{\left(-\left(-t\right)\right)} - z}{t} \]
    10. remove-double-neg61.1%

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

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

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

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

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

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

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

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

Developer target: 99.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

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

  :alt
  (if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))

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