Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 97.3% → 99.6%
Time: 12.1s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 97.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.6% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 88.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -38000000000 \lor \neg \left(z \leq 25000\right):\\
\;\;\;\;x + a \cdot \left(-1 + \frac{y + \left(-1 - t\right)}{z}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.8e10 or 25000 < z

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \left(1 + \frac{-1 \cdot y - \color{blue}{-1 \cdot \left(1 + t\right)}}{z}\right) \cdot a \]
      7. distribute-lft-out--80.3%

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

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

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

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

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

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

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

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

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

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

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

    if -3.8e10 < z < 25000

    1. Initial program 99.0%

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

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

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

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

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

Alternative 3: 72.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+75}:\\
\;\;\;\;x - a\\

\mathbf{elif}\;z \leq -3.9 \cdot 10^{+28}:\\
\;\;\;\;x + \frac{z}{\frac{t}{a}}\\

\mathbf{elif}\;z \leq 8 \cdot 10^{-29}:\\
\;\;\;\;x - y \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.04999999999999999e75 or 7.99999999999999955e-29 < z

    1. Initial program 95.0%

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

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

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

      \[\leadsto x - \color{blue}{a} \]

    if -1.04999999999999999e75 < z < -3.8999999999999999e28

    1. Initial program 99.8%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 74.6%

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

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

        \[\leadsto x - \frac{\color{blue}{-z}}{\frac{t}{a}} \]
    6. Simplified74.8%

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

    if -3.8999999999999999e28 < z < 7.99999999999999955e-29

    1. Initial program 99.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+75}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{+28}:\\ \;\;\;\;x + \frac{z}{\frac{t}{a}}\\ \mathbf{elif}\;z \leq 8 \cdot 10^{-29}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 87.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -530000000 \lor \neg \left(z \leq 2.55 \cdot 10^{-5}\right):\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.3e8 or 2.54999999999999998e-5 < z

    1. Initial program 95.5%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 77.7%

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

        \[\leadsto x - \frac{y - z}{\color{blue}{\frac{-1 \cdot z}{a}}} \]
      2. neg-mul-177.7%

        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-z}}{a}} \]
    5. Simplified77.7%

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

    if -5.3e8 < z < 2.54999999999999998e-5

    1. Initial program 99.0%

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

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

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

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

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

Alternative 5: 84.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.55 \cdot 10^{+76} \lor \neg \left(z \leq 1.2 \cdot 10^{+64}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.5500000000000001e76 or 1.2e64 < z

    1. Initial program 94.3%

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

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

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

      \[\leadsto x - \color{blue}{a} \]

    if -2.5500000000000001e76 < z < 1.2e64

    1. Initial program 99.2%

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

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

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

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

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

Alternative 6: 70.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{+148} \lor \neg \left(t \leq 7.8 \cdot 10^{+163}\right):\\
\;\;\;\;x + \frac{z}{\frac{t}{a}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.90000000000000002e148 or 7.80000000000000047e163 < t

    1. Initial program 97.0%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf 94.1%

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

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

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

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

    if -3.90000000000000002e148 < t < 7.80000000000000047e163

    1. Initial program 97.2%

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

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

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

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

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

        \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 - z}} \]
    8. Simplified68.8%

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

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

Alternative 7: 72.8% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+17} \lor \neg \left(z \leq 8 \cdot 10^{-29}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05e17 or 7.99999999999999955e-29 < z

    1. Initial program 95.6%

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

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

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

      \[\leadsto x - \color{blue}{a} \]

    if -1.05e17 < z < 7.99999999999999955e-29

    1. Initial program 99.0%

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

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

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

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

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

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

Alternative 8: 58.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+222}:\\
\;\;\;\;a \cdot \frac{z}{t}\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+186}:\\
\;\;\;\;x - a\\

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


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

    1. Initial program 99.9%

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

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

        \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
      3. associate-/r/96.2%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
      9. distribute-neg-frac299.8%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
      10. distribute-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
      12. distribute-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
      13. remove-double-neg99.8%

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

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
      15. sub-neg99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
      16. metadata-eval99.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{a \cdot \left(y - z\right)}{t}} \]
    7. Step-by-step derivation
      1. mul-1-neg44.9%

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

        \[\leadsto -\color{blue}{a \cdot \frac{y - z}{t}} \]
      3. distribute-rgt-neg-in56.6%

        \[\leadsto \color{blue}{a \cdot \left(-\frac{y - z}{t}\right)} \]
    8. Simplified56.6%

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

      \[\leadsto \color{blue}{\frac{a \cdot z}{t}} \]
    10. Step-by-step derivation
      1. associate-/l*45.1%

        \[\leadsto \color{blue}{a \cdot \frac{z}{t}} \]
    11. Simplified45.1%

      \[\leadsto \color{blue}{a \cdot \frac{z}{t}} \]

    if -5.4999999999999999e222 < t < 4.60000000000000027e186

    1. Initial program 97.0%

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

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

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

      \[\leadsto x - \color{blue}{a} \]

    if 4.60000000000000027e186 < t

    1. Initial program 95.2%

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

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

        \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
      3. associate-/r/95.2%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{-a}{\left(t - z\right) + 1}, x\right)} \]
      8. distribute-frac-neg95.2%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
      9. distribute-neg-frac295.2%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
      10. distribute-neg-in95.2%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg95.2%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
      12. distribute-neg-in95.2%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
      13. remove-double-neg95.2%

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

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
      15. sub-neg95.2%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
      16. metadata-eval95.2%

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 62.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+210}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+188}:\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.1999999999999997e210 or 4.60000000000000023e188 < t

    1. Initial program 98.0%

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

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

        \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
      3. associate-/r/96.0%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{-a}{\left(t - z\right) + 1}, x\right)} \]
      8. distribute-frac-neg97.9%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
      9. distribute-neg-frac297.9%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
      10. distribute-neg-in97.9%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg97.9%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
      12. distribute-neg-in97.9%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
      13. remove-double-neg97.9%

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

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
      15. sub-neg97.9%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
      16. metadata-eval97.9%

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

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

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

    if -4.1999999999999997e210 < t < 4.60000000000000023e188

    1. Initial program 97.0%

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

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

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

      \[\leadsto x - \color{blue}{a} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 54.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+142} \lor \neg \left(a \leq 4.8 \cdot 10^{+121}\right):\\
\;\;\;\;-a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.99999999999999975e142 or 4.8e121 < a

    1. Initial program 99.8%

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

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

        \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
      3. associate-/r/96.1%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
      9. distribute-neg-frac299.8%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
      10. distribute-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
      12. distribute-neg-in99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
      13. remove-double-neg99.8%

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

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
      15. sub-neg99.8%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
      16. metadata-eval99.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot a} \]
    7. Step-by-step derivation
      1. neg-mul-132.6%

        \[\leadsto \color{blue}{-a} \]
    8. Simplified32.6%

      \[\leadsto \color{blue}{-a} \]

    if -2.99999999999999975e142 < a < 4.8e121

    1. Initial program 96.0%

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

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

        \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
      3. associate-/r/99.9%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(y - z, \frac{-a}{\left(t - z\right) + 1}, x\right)} \]
      8. distribute-frac-neg97.0%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
      9. distribute-neg-frac297.0%

        \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
      10. distribute-neg-in97.0%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg97.0%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
      12. distribute-neg-in97.0%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
      13. remove-double-neg97.0%

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

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
      15. sub-neg97.0%

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
      16. metadata-eval97.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3 \cdot 10^{+142} \lor \neg \left(a \leq 4.8 \cdot 10^{+121}\right):\\ \;\;\;\;-a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 53.6% accurate, 13.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 97.2%

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

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

      \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
    3. associate-/r/98.8%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
    9. distribute-neg-frac297.8%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
    10. distribute-neg-in97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
    11. sub-neg97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
    12. distribute-neg-in97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
    13. remove-double-neg97.8%

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

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
    15. sub-neg97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
    16. metadata-eval97.8%

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

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

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

Alternative 12: 3.2% accurate, 13.0× speedup?

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

\\
a
\end{array}
Derivation
  1. Initial program 97.2%

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

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

      \[\leadsto \color{blue}{\left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right) + x} \]
    3. associate-/r/98.8%

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{-\frac{a}{\left(t - z\right) + 1}}, x\right) \]
    9. distribute-neg-frac297.8%

      \[\leadsto \mathsf{fma}\left(y - z, \color{blue}{\frac{a}{-\left(\left(t - z\right) + 1\right)}}, x\right) \]
    10. distribute-neg-in97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
    11. sub-neg97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(-\color{blue}{\left(t + \left(-z\right)\right)}\right) + \left(-1\right)}, x\right) \]
    12. distribute-neg-in97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(\left(-t\right) + \left(-\left(-z\right)\right)\right)} + \left(-1\right)}, x\right) \]
    13. remove-double-neg97.8%

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

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z + \left(-t\right)\right)} + \left(-1\right)}, x\right) \]
    15. sub-neg97.8%

      \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(z - t\right)} + \left(-1\right)}, x\right) \]
    16. metadata-eval97.8%

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

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

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

    \[\leadsto \color{blue}{-1 \cdot a} \]
  7. Step-by-step derivation
    1. neg-mul-118.0%

      \[\leadsto \color{blue}{-a} \]
  8. Simplified18.0%

    \[\leadsto \color{blue}{-a} \]
  9. Step-by-step derivation
    1. neg-sub018.0%

      \[\leadsto \color{blue}{0 - a} \]
    2. sub-neg18.0%

      \[\leadsto \color{blue}{0 + \left(-a\right)} \]
    3. add-sqr-sqrt7.4%

      \[\leadsto 0 + \color{blue}{\sqrt{-a} \cdot \sqrt{-a}} \]
    4. sqrt-unprod6.9%

      \[\leadsto 0 + \color{blue}{\sqrt{\left(-a\right) \cdot \left(-a\right)}} \]
    5. sqr-neg6.9%

      \[\leadsto 0 + \sqrt{\color{blue}{a \cdot a}} \]
    6. sqrt-unprod1.7%

      \[\leadsto 0 + \color{blue}{\sqrt{a} \cdot \sqrt{a}} \]
    7. add-sqr-sqrt3.4%

      \[\leadsto 0 + \color{blue}{a} \]
  10. Applied egg-rr3.4%

    \[\leadsto \color{blue}{0 + a} \]
  11. Taylor expanded in a around 0 3.4%

    \[\leadsto \color{blue}{a} \]
  12. Add Preprocessing

Developer Target 1: 99.6% accurate, 1.0× speedup?

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

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

Reproduce

?
herbie shell --seed 2024172 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

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

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