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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a - t} + x} \]
  7. 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}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-15}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 1350\right):\\ \;\;\;\;y + x\\ \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)
     (+ y x)
     (if (<= t -1.75e+42)
       t_2
       (if (<= t -9e-15)
         t_1
         (if (<= t -4.7e-68)
           t_2
           (if (or (<= t -7.5e-83) (not (<= t 1350.0))) (+ y x) 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 = y + x;
	} else if (t <= -1.75e+42) {
		tmp = t_2;
	} else if (t <= -9e-15) {
		tmp = t_1;
	} else if (t <= -4.7e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 1350.0)) {
		tmp = y + x;
	} 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 = y + x
    else if (t <= (-1.75d+42)) then
        tmp = t_2
    else if (t <= (-9d-15)) then
        tmp = t_1
    else if (t <= (-4.7d-68)) then
        tmp = t_2
    else if ((t <= (-7.5d-83)) .or. (.not. (t <= 1350.0d0))) then
        tmp = y + x
    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 = y + x;
	} else if (t <= -1.75e+42) {
		tmp = t_2;
	} else if (t <= -9e-15) {
		tmp = t_1;
	} else if (t <= -4.7e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 1350.0)) {
		tmp = y + x;
	} 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 = y + x
	elif t <= -1.75e+42:
		tmp = t_2
	elif t <= -9e-15:
		tmp = t_1
	elif t <= -4.7e-68:
		tmp = t_2
	elif (t <= -7.5e-83) or not (t <= 1350.0):
		tmp = y + x
	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(y + x);
	elseif (t <= -1.75e+42)
		tmp = t_2;
	elseif (t <= -9e-15)
		tmp = t_1;
	elseif (t <= -4.7e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || !(t <= 1350.0))
		tmp = Float64(y + x);
	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 = y + x;
	elseif (t <= -1.75e+42)
		tmp = t_2;
	elseif (t <= -9e-15)
		tmp = t_1;
	elseif (t <= -4.7e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || ~((t <= 1350.0)))
		tmp = y + x;
	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[(y + x), $MachinePrecision], If[LessEqual[t, -1.75e+42], t$95$2, If[LessEqual[t, -9e-15], t$95$1, If[LessEqual[t, -4.7e-68], t$95$2, If[Or[LessEqual[t, -7.5e-83], N[Not[LessEqual[t, 1350.0]], $MachinePrecision]], N[(y + x), $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}:\\
\;\;\;\;y + x\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.4999999999999997e186 or -4.69999999999999988e-68 < t < -7.4999999999999997e-83 or 1350 < 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 < -1.75000000000000012e42 or -8.9999999999999995e-15 < t < -4.69999999999999988e-68

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.75000000000000012e42 < t < -8.9999999999999995e-15 or -7.4999999999999997e-83 < t < 1350

    1. Initial program 95.6%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    4. 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}} \]
    5. 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}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{+42}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-15}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -4.7 \cdot 10^{-68}:\\ \;\;\;\;x - y \cdot \frac{z}{t}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 1350\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 76.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + z \cdot \frac{y}{a}\\ t_2 := x - \frac{z \cdot y}{t}\\ \mathbf{if}\;t \leq -7.1 \cdot 10^{+149}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{+42}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -1.12 \cdot 10^{-14}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-68}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 45\right):\\ \;\;\;\;y + x\\ \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 (/ (* z y) t))))
   (if (<= t -7.1e+149)
     (+ y x)
     (if (<= t -2.05e+42)
       t_2
       (if (<= t -1.12e-14)
         t_1
         (if (<= t -5e-68)
           t_2
           (if (or (<= t -7.5e-83) (not (<= t 45.0))) (+ y x) 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 - ((z * y) / t);
	double tmp;
	if (t <= -7.1e+149) {
		tmp = y + x;
	} else if (t <= -2.05e+42) {
		tmp = t_2;
	} else if (t <= -1.12e-14) {
		tmp = t_1;
	} else if (t <= -5e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 45.0)) {
		tmp = y + x;
	} 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 - ((z * y) / t)
    if (t <= (-7.1d+149)) then
        tmp = y + x
    else if (t <= (-2.05d+42)) then
        tmp = t_2
    else if (t <= (-1.12d-14)) then
        tmp = t_1
    else if (t <= (-5d-68)) then
        tmp = t_2
    else if ((t <= (-7.5d-83)) .or. (.not. (t <= 45.0d0))) then
        tmp = y + x
    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 - ((z * y) / t);
	double tmp;
	if (t <= -7.1e+149) {
		tmp = y + x;
	} else if (t <= -2.05e+42) {
		tmp = t_2;
	} else if (t <= -1.12e-14) {
		tmp = t_1;
	} else if (t <= -5e-68) {
		tmp = t_2;
	} else if ((t <= -7.5e-83) || !(t <= 45.0)) {
		tmp = y + x;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (z * (y / a))
	t_2 = x - ((z * y) / t)
	tmp = 0
	if t <= -7.1e+149:
		tmp = y + x
	elif t <= -2.05e+42:
		tmp = t_2
	elif t <= -1.12e-14:
		tmp = t_1
	elif t <= -5e-68:
		tmp = t_2
	elif (t <= -7.5e-83) or not (t <= 45.0):
		tmp = y + x
	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(Float64(z * y) / t))
	tmp = 0.0
	if (t <= -7.1e+149)
		tmp = Float64(y + x);
	elseif (t <= -2.05e+42)
		tmp = t_2;
	elseif (t <= -1.12e-14)
		tmp = t_1;
	elseif (t <= -5e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || !(t <= 45.0))
		tmp = Float64(y + x);
	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 - ((z * y) / t);
	tmp = 0.0;
	if (t <= -7.1e+149)
		tmp = y + x;
	elseif (t <= -2.05e+42)
		tmp = t_2;
	elseif (t <= -1.12e-14)
		tmp = t_1;
	elseif (t <= -5e-68)
		tmp = t_2;
	elseif ((t <= -7.5e-83) || ~((t <= 45.0)))
		tmp = y + x;
	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[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.1e+149], N[(y + x), $MachinePrecision], If[LessEqual[t, -2.05e+42], t$95$2, If[LessEqual[t, -1.12e-14], t$95$1, If[LessEqual[t, -5e-68], t$95$2, If[Or[LessEqual[t, -7.5e-83], N[Not[LessEqual[t, 45.0]], $MachinePrecision]], N[(y + x), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.12 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -7.1000000000000001e149 or -4.99999999999999971e-68 < t < -7.4999999999999997e-83 or 45 < 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.0%

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

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

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

    if -7.1000000000000001e149 < t < -2.05e42 or -1.12000000000000006e-14 < t < -4.99999999999999971e-68

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.05e42 < t < -1.12000000000000006e-14 or -7.4999999999999997e-83 < t < 45

    1. Initial program 95.6%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    4. 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}} \]
    5. 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 -7.1 \cdot 10^{+149}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;t \leq -2.05 \cdot 10^{+42}:\\ \;\;\;\;x - \frac{z \cdot y}{t}\\ \mathbf{elif}\;t \leq -1.12 \cdot 10^{-14}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{elif}\;t \leq -5 \cdot 10^{-68}:\\ \;\;\;\;x - \frac{z \cdot y}{t}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{-83} \lor \neg \left(t \leq 45\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 85.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.70000000000000011e-48 or 2.3e5 < z

    1. Initial program 96.1%

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

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

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

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

    if -2.70000000000000011e-48 < z < 2.3e5

    1. Initial program 99.9%

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{t}{a - t} \cdot y} \]
      2. div-inv90.5%

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

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

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

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

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

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

Alternative 5: 84.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.4999999999999999e186 or 4.19999999999999993e129 < 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 -8.4999999999999999e186 < t < 4.19999999999999993e129

    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 -8.5 \cdot 10^{+186} \lor \neg \left(t \leq 4.2 \cdot 10^{+129}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \frac{z}{a - t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.022 \lor \neg \left(t \leq 1.45\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.021999999999999999 or 1.44999999999999996 < 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.021999999999999999 < t < 1.44999999999999996

    1. Initial program 95.8%

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

      \[\leadsto x + \color{blue}{\frac{y \cdot z}{a}} \]
    4. 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}} \]
    5. 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.022 \lor \neg \left(t \leq 1.45\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 76.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.046 \lor \neg \left(t \leq 1.4\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.045999999999999999 or 1.3999999999999999 < 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.045999999999999999 < t < 1.3999999999999999

    1. Initial program 95.8%

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

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

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

Alternative 8: 62.6% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{-89} \lor \neg \left(t \leq 2.6 \cdot 10^{+110}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.2999999999999999e-89 or 2.6e110 < 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.2999999999999999e-89 < t < 2.6e110

    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.3 \cdot 10^{-89} \lor \neg \left(t \leq 2.6 \cdot 10^{+110}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 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. Add Preprocessing

Alternative 10: 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. 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)))))