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

Percentage Accurate: 85.9% → 98.1%
Time: 8.9s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 85.9% accurate, 1.0× speedup?

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

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

Alternative 1: 98.1% 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 85.4%

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

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

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

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

Alternative 2: 87.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{z}{\frac{a - t}{y}}\\
t_2 := x - y \cdot \left(\frac{z}{t} + -1\right)\\
\mathbf{if}\;t \leq -9.2 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 9 \cdot 10^{-97}:\\
\;\;\;\;x + y \cdot \frac{t}{t - a}\\

\mathbf{elif}\;t \leq 10^{+24}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.1999999999999998e32 or 9.9999999999999998e23 < t

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.1999999999999998e32 < t < 3.1999999999999998e-128 or 9.0000000000000002e-97 < t < 9.9999999999999998e23

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

    if 3.1999999999999998e-128 < t < 9.0000000000000002e-97

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+32}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-128}:\\ \;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\ \mathbf{elif}\;t \leq 9 \cdot 10^{-97}:\\ \;\;\;\;x + y \cdot \frac{t}{t - a}\\ \mathbf{elif}\;t \leq 10^{+24}:\\ \;\;\;\;x + \frac{z}{\frac{a - t}{y}}\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot \left(\frac{z}{t} + -1\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 84.2% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6e128 or 9.9999999999999998e23 < t

    1. Initial program 71.9%

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

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

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

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

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

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

    if -2.6e128 < t < 9.9999999999999998e23

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

Alternative 4: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{+128} \lor \neg \left(t \leq 7.8 \cdot 10^{+23}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.39999999999999971e128 or 7.8000000000000001e23 < t

    1. Initial program 71.9%

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

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

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

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

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

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

    if -6.39999999999999971e128 < t < 7.8000000000000001e23

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 88.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.6e31 or 5.89999999999999987e23 < t

    1. Initial program 74.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.6e31 < t < 5.89999999999999987e23

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 84.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

    if -3.04999999999999998e34 < t < 9.9999999999999998e23

    1. Initial program 93.4%

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999998e23 < t

    1. Initial program 85.9%

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

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

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

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

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

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

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

Alternative 7: 76.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.48 \lor \neg \left(t \leq 4.8 \cdot 10^{+23}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.47999999999999998 or 4.8e23 < t

    1. Initial program 73.8%

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

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

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

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

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

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

    if -0.47999999999999998 < t < 4.8e23

    1. Initial program 95.1%

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

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

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

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

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

Alternative 8: 77.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -650000 \lor \neg \left(t \leq 6.6 \cdot 10^{+23}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.5e5 or 6.60000000000000059e23 < t

    1. Initial program 74.2%

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

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

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

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

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

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

    if -6.5e5 < t < 6.60000000000000059e23

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

Alternative 9: 77.1% accurate, 0.6× speedup?

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

    1. Initial program 74.2%

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

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

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

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

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

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

    if -62000 < t < 5.89999999999999987e23

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -230 \lor \neg \left(t \leq 6.6 \cdot 10^{+23}\right):\\
\;\;\;\;x + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -230 or 6.60000000000000059e23 < t

    1. Initial program 74.2%

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

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

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

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

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

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

    if -230 < t < 6.60000000000000059e23

    1. Initial program 94.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 61.8% accurate, 1.4× speedup?

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

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

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


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

    1. Initial program 86.7%

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

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

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

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

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

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

    if 9.4999999999999997e56 < a

    1. Initial program 79.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 9.5 \cdot 10^{+56}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 51.6% 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 85.4%

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification49.5%

    \[\leadsto x \]
  7. Add Preprocessing

Developer target: 98.3% accurate, 1.0× speedup?

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

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

Reproduce

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

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

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