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

Percentage Accurate: 85.5% → 98.3%
Time: 10.7s
Alternatives: 13
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 13 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.5% 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.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right) \end{array} \]
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- a t)) x))
double code(double x, double y, double z, double t, double a) {
	return fma(y, ((z - t) / (a - t)), x);
}
function code(x, y, z, t, a)
	return fma(y, Float64(Float64(z - t) / Float64(a - t)), x)
end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)
\end{array}
Derivation
  1. Initial program 90.0%

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative90.0%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
  3. Simplified97.8%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
  4. Add Preprocessing
  5. Add Preprocessing

Alternative 2: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.1 \cdot 10^{+79} \lor \neg \left(t \leq 2 \cdot 10^{+119}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.0999999999999999e79 or 1.99999999999999989e119 < t

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified83.0%

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

    if -3.0999999999999999e79 < t < 1.99999999999999989e119

    1. Initial program 94.8%

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

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

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

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

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

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

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

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

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

Alternative 3: 84.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+80} \lor \neg \left(t \leq 1.35 \cdot 10^{+118}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.60000000000000008e80 or 1.35e118 < t

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified83.0%

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

    if -8.60000000000000008e80 < t < 1.35e118

    1. Initial program 94.8%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.7%

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

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

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

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

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

Alternative 4: 84.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.50000000000000005e73 or 2.30000000000000016e118 < t

    1. Initial program 78.2%

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

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified83.0%

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

    if -1.50000000000000005e73 < t < 2.30000000000000016e118

    1. Initial program 94.8%

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

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

      \[\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. associate-/l*88.5%

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

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

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

Alternative 5: 88.6% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.7000000000000002e-13

    1. Initial program 86.1%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. *-commutative86.1%

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

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

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

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

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

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

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

    if -4.7000000000000002e-13 < z < 4.7999999999999997e-13

    1. Initial program 93.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative93.3%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified99.4%

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

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

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

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

        \[\leadsto \frac{\color{blue}{-t \cdot y}}{a - t} + x \]
      4. distribute-lft-neg-out86.6%

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

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

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

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

        \[\leadsto \color{blue}{y} \cdot \frac{-t}{a - t} + x \]
      9. distribute-neg-frac92.7%

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

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

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

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

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

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

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

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

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

    if 4.7999999999999997e-13 < z

    1. Initial program 87.3%

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

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

      \[\leadsto \color{blue}{x + y \cdot \frac{z - t}{a - t}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num96.0%

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

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

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

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

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

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

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

Alternative 6: 76.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{+31} \lor \neg \left(t \leq 5.3 \cdot 10^{-17}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9999999999999999e31 or 5.2999999999999998e-17 < t

    1. Initial program 84.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative84.4%

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

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

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

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

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

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

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

    if -1.9999999999999999e31 < t < 5.2999999999999998e-17

    1. Initial program 94.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified96.2%

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

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

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

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

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

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

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

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

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

Alternative 7: 76.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+38} \lor \neg \left(t \leq 4.4 \cdot 10^{-17}\right):\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.65e38 or 4.4e-17 < t

    1. Initial program 84.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative84.4%

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

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

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

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

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

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

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

    if -1.65e38 < t < 4.4e-17

    1. Initial program 94.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified96.2%

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

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

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

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

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

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

Alternative 8: 76.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.5999999999999999e31 or 7.49999999999999984e-17 < t

    1. Initial program 84.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative84.4%

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

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

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

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

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

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

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

    if -4.5999999999999999e31 < t < 7.49999999999999984e-17

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 61.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{+115}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

\mathbf{elif}\;y \leq 7.5 \cdot 10^{+131}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.90000000000000005e115

    1. Initial program 80.7%

      \[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. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot \left(\frac{z}{t} - 1\right)} \]
      2. sub-neg53.3%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
    12. Simplified53.3%

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

    if -2.90000000000000005e115 < y < 7.4999999999999995e131

    1. Initial program 97.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative97.3%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified97.3%

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

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

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

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

    if 7.4999999999999995e131 < y

    1. Initial program 59.2%

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

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

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

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

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

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

Alternative 10: 60.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.18 \cdot 10^{+114}:\\
\;\;\;\;y \cdot \left(1 - \frac{z}{t}\right)\\

\mathbf{elif}\;y \leq 4.4 \cdot 10^{+130}:\\
\;\;\;\;y + x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.18000000000000005e114

    1. Initial program 80.7%

      \[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. Step-by-step derivation
      1. clear-num99.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{-y \cdot \left(\frac{z}{t} - 1\right)} \]
      2. sub-neg53.3%

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\left(1 - \frac{z}{t}\right)} \]
    12. Simplified53.3%

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

    if -1.18000000000000005e114 < y < 4.39999999999999987e130

    1. Initial program 97.3%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative97.3%

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified97.3%

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

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

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

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

    if 4.39999999999999987e130 < y

    1. Initial program 59.2%

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

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

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

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

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

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

Alternative 11: 63.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.99999999999999994e-118 or 2.4999999999999999e-17 < t

    1. Initial program 85.4%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Step-by-step derivation
      1. +-commutative85.4%

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

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

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

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

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

        \[\leadsto \color{blue}{y + x} \]
    7. Simplified72.9%

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

    if -3.99999999999999994e-118 < t < 2.4999999999999999e-17

    1. Initial program 95.2%

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
    3. Simplified95.4%

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

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

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

Alternative 12: 98.3% accurate, 1.0× speedup?

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

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

    \[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. Add Preprocessing

Alternative 13: 51.0% 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 90.0%

    \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
  2. Step-by-step derivation
    1. +-commutative90.0%

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a - t}, x\right)} \]
  3. Simplified97.8%

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

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

Developer Target 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}

Reproduce

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

  :alt
  (! :herbie-platform default (+ x (/ y (/ (- a t) (- z t)))))

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