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

Percentage Accurate: 84.8% → 98.5%
Time: 6.9s
Alternatives: 10
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 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: 84.8% accurate, 1.0× speedup?

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

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

Alternative 1: 98.5% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 84.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+89} \lor \neg \left(t \leq 1.3 \cdot 10^{+85}\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.8e+89) (not (<= t 1.3e+85)))
   (+ x y)
   (+ x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.8e+89) || !(t <= 1.3e+85)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / (a - t)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((t <= (-2.8d+89)) .or. (.not. (t <= 1.3d+85))) then
        tmp = x + y
    else
        tmp = x + (z * (y / (a - t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.8e+89) || !(t <= 1.3e+85)) {
		tmp = x + y;
	} else {
		tmp = x + (z * (y / (a - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (t <= -2.8e+89) or not (t <= 1.3e+85):
		tmp = x + y
	else:
		tmp = x + (z * (y / (a - t)))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.8e+89) || !(t <= 1.3e+85))
		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.8e+89) || ~((t <= 1.3e+85)))
		tmp = x + y;
	else
		tmp = x + (z * (y / (a - t)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.8e+89], N[Not[LessEqual[t, 1.3e+85]], $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.8 \cdot 10^{+89} \lor \neg \left(t \leq 1.3 \cdot 10^{+85}\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.7999999999999998e89 or 1.30000000000000005e85 < t

    1. Initial program 72.4%

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

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

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

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

    if -2.7999999999999998e89 < t < 1.30000000000000005e85

    1. Initial program 93.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+89} \lor \neg \left(t \leq 1.3 \cdot 10^{+85}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \end{array} \]

Alternative 3: 86.4% accurate, 0.8× speedup?

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

    1. Initial program 84.2%

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

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

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

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

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

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

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

    if -7.30000000000000002e-9 < z < 6.1999999999999998e61

    1. Initial program 88.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}{\frac{y}{\frac{a - t}{z - t}}} \]
    3. Simplified99.9%

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

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

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

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

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

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

        \[\leadsto x + \frac{y}{\frac{\color{blue}{\left(-a\right)} + t}{t}} \]
    6. Simplified88.9%

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t - a}{t}}} \]
      2. associate-/r/86.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.3 \cdot 10^{-9} \lor \neg \left(z \leq 6.2 \cdot 10^{+61}\right):\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{t - a}\\ \end{array} \]

Alternative 4: 87.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.19999999999999969e-11 or 0.69999999999999996 < z

    1. Initial program 85.2%

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

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

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

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

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

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

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

    if -7.19999999999999969e-11 < z < 0.69999999999999996

    1. Initial program 88.4%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{-11} \lor \neg \left(z \leq 0.7\right):\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y}{\frac{t - a}{t}}\\ \end{array} \]

Alternative 5: 87.0% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 74.9%

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

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

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

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

        \[\leadsto x + \frac{y}{\color{blue}{-\frac{t}{z - t}}} \]
      2. distribute-neg-frac88.6%

        \[\leadsto x + \frac{y}{\color{blue}{\frac{-t}{z - t}}} \]
    6. Simplified88.6%

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

    if -10.199999999999999 < t < 5.50000000000000025e30

    1. Initial program 93.7%

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

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

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

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

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

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

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

    if 5.50000000000000025e30 < t

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t - a}{t}}} \]
      2. associate-/r/88.2%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -10.2:\\ \;\;\;\;x + \frac{y}{\frac{-t}{z - t}}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+30}:\\ \;\;\;\;x + z \cdot \frac{y}{a - t}\\ \mathbf{else}:\\ \;\;\;\;x + t \cdot \frac{y}{t - a}\\ \end{array} \]

Alternative 6: 77.3% accurate, 1.0× speedup?

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

    1. Initial program 79.1%

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

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

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

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

    if -0.20000000000000001 < t < 2.0999999999999998e22

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
      2. associate-/r/82.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -0.2 \lor \neg \left(t \leq 2.1 \cdot 10^{+22}\right):\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{z}{\frac{a}{y}}\\ \end{array} \]

Alternative 7: 77.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq 3300000:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.5 or 3.3e6 < t

    1. Initial program 79.1%

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

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

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

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

    if -5.5 < t < 3.3e6

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{1}{\frac{\frac{a - t}{z}}{y}}} \]
      4. associate-/r*88.8%

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

      \[\leadsto x + \color{blue}{\frac{1}{\frac{a - t}{z \cdot y}}} \]
    9. Taylor expanded in a around inf 78.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 3300000:\\ \;\;\;\;x + y \cdot \frac{z}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 8: 77.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8:\\
\;\;\;\;x + y\\

\mathbf{elif}\;t \leq 4300000000000:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.80000000000000004 or 4.3e12 < t

    1. Initial program 79.1%

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

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

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

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

    if -1.80000000000000004 < t < 4.3e12

    1. Initial program 93.6%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{a}{z}}} \]
      2. associate-/r/82.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.8:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t \leq 4300000000000:\\ \;\;\;\;x + z \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]

Alternative 9: 96.0% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 10: 60.5% accurate, 3.7× speedup?

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

\\
x + y
\end{array}
Derivation
  1. Initial program 86.6%

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

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

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

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

    \[\leadsto x + y \]

Developer target: 98.5% 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 2023257 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
  :precision binary64

  :herbie-target
  (+ x (/ y (/ (- a t) (- z t))))

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