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

Percentage Accurate: 97.9% → 95.8%
Time: 10.9s
Alternatives: 12
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 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: 97.9% 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: 95.8% accurate, 1.0× speedup?

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

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

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

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

    \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a - t}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-commutative84.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}} \]
  6. Applied egg-rr98.3%

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

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

Alternative 2: 76.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ t_2 := x - y \cdot \frac{z}{t}\\ \mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 0.85\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* z (/ y a)))) (t_2 (- x (* y (/ z t)))))
   (if (<= t -6.5e+186)
     (+ x y)
     (if (<= t -2.4e+42)
       t_2
       (if (<= t -8.5e-15)
         t_1
         (if (<= t -9.8e-68)
           t_2
           (if (or (<= t -7.5e-83) (not (<= t 0.85))) (+ x y) t_1)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (z * (y / a));
	double t_2 = x - (y * (z / t));
	double tmp;
	if (t <= -6.5e+186) {
		tmp = x + y;
	} else if (t <= -2.4e+42) {
		tmp = t_2;
	} else if (t <= -8.5e-15) {
		tmp = t_1;
	} else if (t <= -9.8e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 0.85)) {
		tmp = x + y;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = x + (z * (y / a))
    t_2 = x - (y * (z / t))
    if (t <= (-6.5d+186)) then
        tmp = x + y
    else if (t <= (-2.4d+42)) then
        tmp = t_2
    else if (t <= (-8.5d-15)) then
        tmp = t_1
    else if (t <= (-9.8d-68)) then
        tmp = t_2
    else if ((t <= (-7.5d-83)) .or. (.not. (t <= 0.85d0))) then
        tmp = x + y
    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 + (z * (y / a));
	double t_2 = x - (y * (z / t));
	double tmp;
	if (t <= -6.5e+186) {
		tmp = x + y;
	} else if (t <= -2.4e+42) {
		tmp = t_2;
	} else if (t <= -8.5e-15) {
		tmp = t_1;
	} else if (t <= -9.8e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 0.85)) {
		tmp = x + y;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / a))
	t_2 = x - (y * (z / t))
	tmp = 0
	if t <= -6.5e+186:
		tmp = x + y
	elif t <= -2.4e+42:
		tmp = t_2
	elif t <= -8.5e-15:
		tmp = t_1
	elif t <= -9.8e-68:
		tmp = t_2
	elif (t <= -7.5e-83) or not (t <= 0.85):
		tmp = x + y
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(z * Float64(y / a)))
	t_2 = Float64(x - Float64(y * Float64(z / t)))
	tmp = 0.0
	if (t <= -6.5e+186)
		tmp = Float64(x + y);
	elseif (t <= -2.4e+42)
		tmp = t_2;
	elseif (t <= -8.5e-15)
		tmp = t_1;
	elseif (t <= -9.8e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || !(t <= 0.85))
		tmp = Float64(x + y);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (z * (y / a));
	t_2 = x - (y * (z / t));
	tmp = 0.0;
	if (t <= -6.5e+186)
		tmp = x + y;
	elseif (t <= -2.4e+42)
		tmp = t_2;
	elseif (t <= -8.5e-15)
		tmp = t_1;
	elseif (t <= -9.8e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || ~((t <= 0.85)))
		tmp = x + y;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+186], N[(x + y), $MachinePrecision], If[LessEqual[t, -2.4e+42], t$95$2, If[LessEqual[t, -8.5e-15], t$95$1, If[LessEqual[t, -9.8e-68], t$95$2, If[Or[LessEqual[t, -7.5e-83], N[Not[LessEqual[t, 0.85]], $MachinePrecision]], N[(x + y), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.4 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -8.5 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -9.8 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 0.85\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e186 or -9.79999999999999954e-68 < t < -7.4999999999999997e-83 or 0.849999999999999978 < t

    1. Initial program 100.0%

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

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

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

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

    if -6.4999999999999997e186 < t < -2.3999999999999999e42 or -8.50000000000000007e-15 < t < -9.79999999999999954e-68

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -2.3999999999999999e42 < t < -8.50000000000000007e-15 or -7.4999999999999997e-83 < t < 0.849999999999999978

    1. Initial program 95.6%

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative94.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{+42}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -8.5 \cdot 10^{-15}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -9.8 \cdot 10^{-68}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 0.85\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 75.4% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;t \leq -3.8 \cdot 10^{-21} \lor \neg \left(t \leq -7.5 \cdot 10^{-83}\right) \land t \leq 2150:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.4999999999999997e186 or -3.7999999999999998e-21 < t < -7.4999999999999997e-83 or 2150 < t

    1. Initial program 99.9%

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

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

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

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

    if -6.4999999999999997e186 < t < -2.2e20

    1. Initial program 99.9%

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

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

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

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

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

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

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

    if -2.2e20 < t < -0.0550000000000000003

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{t \cdot \frac{y}{a - t}} \]
    9. Simplified76.0%

      \[\leadsto \color{blue}{x - t \cdot \frac{y}{a - t}} \]
    10. Taylor expanded in x around 0 76.4%

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

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(t \cdot y\right)}{a - t}} \]
      2. *-commutative76.4%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(y \cdot t\right)}}{a - t} \]
      3. neg-mul-176.4%

        \[\leadsto \frac{\color{blue}{-y \cdot t}}{a - t} \]
      4. distribute-rgt-neg-in76.4%

        \[\leadsto \frac{\color{blue}{y \cdot \left(-t\right)}}{a - t} \]
    12. Simplified76.4%

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

    if -0.0550000000000000003 < t < -3.7999999999999998e-21 or -7.4999999999999997e-83 < t < 2150

    1. Initial program 95.4%

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative94.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.5 \cdot 10^{+186}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{+20}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -0.055:\\ \;\;\;\;\frac{t \cdot y}{t - a}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-21} \lor \neg \left(t \leq -7.5 \cdot 10^{-83}\right) \land t \leq 2150:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 84.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.2e187 or 2.3999999999999999e129 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.6%

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

    if -4.2e187 < t < 2.3999999999999999e129

    1. Initial program 96.8%

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

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

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

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

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

Alternative 5: 84.4% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.5000000000000001e187 or 1.39999999999999987e129 < t

    1. Initial program 100.0%

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

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

        \[\leadsto \color{blue}{y + x} \]
    5. Simplified83.6%

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

    if -2.5000000000000001e187 < t < 1.39999999999999987e129

    1. Initial program 96.8%

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

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

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

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

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

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

        \[\leadsto x + z \cdot \color{blue}{\frac{1 \cdot y}{a - t}} \]
      6. *-un-lft-identity88.7%

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

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

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

Alternative 6: 86.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.4999999999999998e111 or 3.30000000000000003e123 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{1 + -1 \cdot \frac{a}{t}} + x} \]
      2. mul-1-neg90.9%

        \[\leadsto \frac{y}{1 + \color{blue}{\left(-\frac{a}{t}\right)}} + x \]
      3. unsub-neg90.9%

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

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

    if -2.4999999999999998e111 < t < 3.30000000000000003e123

    1. Initial program 96.6%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    4. Step-by-step derivation
      1. div-inv86.8%

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

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

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

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

        \[\leadsto x + z \cdot \color{blue}{\frac{1 \cdot y}{a - t}} \]
      6. *-un-lft-identity89.5%

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

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

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

Alternative 7: 87.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.0074 \lor \neg \left(t \leq 1.45 \cdot 10^{+76}\right):\\
\;\;\;\;x + y \cdot \left(1 - \frac{z}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.0074000000000000003 or 1.4500000000000001e76 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

    if -0.0074000000000000003 < t < 1.4500000000000001e76

    1. Initial program 95.9%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    4. Step-by-step derivation
      1. div-inv88.1%

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

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

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

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

        \[\leadsto x + z \cdot \color{blue}{\frac{1 \cdot y}{a - t}} \]
      6. *-un-lft-identity92.5%

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

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

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

Alternative 8: 85.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{y}{t - a}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+109}:\\
\;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\

\mathbf{elif}\;t \leq 3.1 \cdot 10^{+125}:\\
\;\;\;\;x - z \cdot t\_1\\

\mathbf{else}:\\
\;\;\;\;x + t \cdot t\_1\\


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

    1. Initial program 100.0%

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

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

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

      \[\leadsto x + \color{blue}{\frac{y}{\frac{a - t}{z - t}}} \]
    5. Step-by-step derivation
      1. div-sub100.0%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{1 + -1 \cdot \frac{a}{t}} + x} \]
      2. mul-1-neg92.1%

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

        \[\leadsto \frac{y}{\color{blue}{1 - \frac{a}{t}}} + x \]
    9. Simplified92.1%

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

    if -3.2000000000000001e109 < t < 3.1e125

    1. Initial program 96.6%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a - t}} \]
    4. Step-by-step derivation
      1. div-inv86.8%

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

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

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

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

        \[\leadsto x + z \cdot \color{blue}{\frac{1 \cdot y}{a - t}} \]
      6. *-un-lft-identity89.5%

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

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

    if 3.1e125 < t

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+109}:\\ \;\;\;\;x + \frac{y}{1 - \frac{a}{t}}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+125}:\\ \;\;\;\;x - z \cdot \frac{y}{t - a}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{t - a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 76.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -0.0033 \lor \neg \left(t \leq 1850\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 -0.0033) (not (<= t 1850.0))) (+ x y) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.0033) || !(t <= 1850.0)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-0.0033d0)) .or. (.not. (t <= 1850.0d0))) then
        tmp = x + y
    else
        tmp = x + (z * (y / a))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -0.0033) || !(t <= 1850.0)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / a));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -0.0033) or not (t <= 1850.0):
		tmp = x + y
	else:
		tmp = x + (z * (y / a))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -0.0033) || !(t <= 1850.0))
		tmp = Float64(x + y);
	else
		tmp = Float64(x + Float64(z * Float64(y / a)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((t <= -0.0033) || ~((t <= 1850.0)))
		tmp = x + y;
	else
		tmp = x + (z * (y / a));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -0.0033], N[Not[LessEqual[t, 1850.0]], $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 -0.0033 \lor \neg \left(t \leq 1850\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 < -0.0033 or 1850 < t

    1. Initial program 100.0%

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

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

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

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

    if -0.0033 < t < 1850

    1. Initial program 95.8%

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-commutative94.7%

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

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

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

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

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

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

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

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

Alternative 10: 62.6% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.4500000000000001e-84 or 2.0999999999999999e112 < t

    1. Initial program 99.9%

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

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

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

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

    if -1.4500000000000001e-84 < t < 2.0999999999999999e112

    1. Initial program 95.6%

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

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

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

Alternative 11: 97.9% 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 97.6%

    \[x + y \cdot \frac{z - t}{a - t} \]
  2. Add Preprocessing
  3. Final simplification97.6%

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

Alternative 12: 50.2% 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 97.6%

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

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

    \[\leadsto x \]
  5. Add Preprocessing

Developer target: 99.2% 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 2024096 
(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)))))