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

Percentage Accurate: 97.0% → 97.3%
Time: 9.4s
Alternatives: 10
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 10 alternatives:

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

Initial Program: 97.0% 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: 97.3% accurate, 0.1× speedup?

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

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

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

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

      \[\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/84.5%

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

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

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

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

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

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

      \[\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.5%

      \[\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.5%

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

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

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

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

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

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

Alternative 2: 70.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - a \cdot \frac{y}{t}\\ \mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-269}:\\ \;\;\;\;x - y \cdot a\\ \mathbf{elif}\;t \leq 6000:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* a (/ y t)))))
   (if (<= t -8.6e-13)
     t_1
     (if (<= t 8.6e-269) (- x (* y a)) (if (<= t 6000.0) (- x a) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (a * (y / t));
	double tmp;
	if (t <= -8.6e-13) {
		tmp = t_1;
	} else if (t <= 8.6e-269) {
		tmp = x - (y * a);
	} else if (t <= 6000.0) {
		tmp = x - a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x - (a * (y / t))
    if (t <= (-8.6d-13)) then
        tmp = t_1
    else if (t <= 8.6d-269) then
        tmp = x - (y * a)
    else if (t <= 6000.0d0) then
        tmp = x - a
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (a * (y / t));
	double tmp;
	if (t <= -8.6e-13) {
		tmp = t_1;
	} else if (t <= 8.6e-269) {
		tmp = x - (y * a);
	} else if (t <= 6000.0) {
		tmp = x - a;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (a * (y / t))
	tmp = 0
	if t <= -8.6e-13:
		tmp = t_1
	elif t <= 8.6e-269:
		tmp = x - (y * a)
	elif t <= 6000.0:
		tmp = x - a
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(a * Float64(y / t)))
	tmp = 0.0
	if (t <= -8.6e-13)
		tmp = t_1;
	elseif (t <= 8.6e-269)
		tmp = Float64(x - Float64(y * a));
	elseif (t <= 6000.0)
		tmp = Float64(x - a);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (a * (y / t));
	tmp = 0.0;
	if (t <= -8.6e-13)
		tmp = t_1;
	elseif (t <= 8.6e-269)
		tmp = x - (y * a);
	elseif (t <= 6000.0)
		tmp = x - a;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.6e-13], t$95$1, If[LessEqual[t, 8.6e-269], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6000.0], N[(x - a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{-269}:\\
\;\;\;\;x - y \cdot a\\

\mathbf{elif}\;t \leq 6000:\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.5999999999999997e-13 or 6e3 < t

    1. Initial program 97.2%

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

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

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

      \[\leadsto x - \color{blue}{a \cdot \frac{y - z}{t}} \]
    6. Taylor expanded in y around inf 73.0%

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

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

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

    if -8.5999999999999997e-13 < t < 8.59999999999999977e-269

    1. Initial program 98.4%

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

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

        \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 + t}} \]
    5. Simplified69.0%

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

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

    if 8.59999999999999977e-269 < t < 6e3

    1. Initial program 95.7%

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

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

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

Alternative 3: 87.4% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.15e12 or 7.5e5 < z

    1. Initial program 94.5%

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

      \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-1 \cdot z}}{a}} \]
    4. Step-by-step derivation
      1. neg-mul-184.6%

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

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

      \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(a \cdot y\right) + a \cdot z}{z}} \]
    7. Step-by-step derivation
      1. neg-mul-162.4%

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

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

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

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

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

        \[\leadsto x - \frac{a}{z} \cdot \color{blue}{\left(z - y\right)} \]
    8. Simplified84.2%

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

    if -2.15e12 < z < 7.5e5

    1. Initial program 99.8%

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

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

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

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

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

Alternative 4: 84.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+86} \lor \neg \left(z \leq 6.1 \cdot 10^{+78}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.4999999999999997e86 or 6.10000000000000011e78 < z

    1. Initial program 94.5%

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

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

    if -7.4999999999999997e86 < z < 6.10000000000000011e78

    1. Initial program 98.7%

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

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

        \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 + t}} \]
    5. Simplified87.0%

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

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

Alternative 5: 87.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -44000000000:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\

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

\mathbf{else}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{a}{z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.4e10

    1. Initial program 93.5%

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

      \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-1 \cdot z}}{a}} \]
    4. Step-by-step derivation
      1. neg-mul-184.6%

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

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

    if -4.4e10 < z < 1.2e6

    1. Initial program 99.8%

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

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

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

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

    if 1.2e6 < z

    1. Initial program 95.4%

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

      \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-1 \cdot z}}{a}} \]
    4. Step-by-step derivation
      1. neg-mul-184.7%

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

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

      \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(a \cdot y\right) + a \cdot z}{z}} \]
    7. Step-by-step derivation
      1. neg-mul-162.4%

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{a}{z} \cdot \left(z - y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.6%

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

Alternative 6: 72.2% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{-25} \lor \neg \left(z \leq 4.5 \cdot 10^{-49}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.00000000000000031e-25 or 4.5000000000000002e-49 < z

    1. Initial program 95.0%

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

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

    if -8.00000000000000031e-25 < z < 4.5000000000000002e-49

    1. Initial program 99.9%

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

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

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

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

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

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

Alternative 7: 97.0% accurate, 1.0× speedup?

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

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

    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
  2. Add Preprocessing
  3. Final simplification97.3%

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

Alternative 8: 59.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+239}:\\
\;\;\;\;a \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.80000000000000002e239

    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/99.7%

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\color{blue}{\left(-\left(t - z\right)\right) + \left(-1\right)}}, x\right) \]
      11. sub-neg99.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-in99.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-neg99.9%

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

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

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

        \[\leadsto \mathsf{fma}\left(y - z, \frac{a}{\left(z - t\right) + \color{blue}{-1}}, x\right) \]
    3. Simplified99.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 y around inf 59.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot \frac{y}{z}} \]
    10. Simplified53.3%

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

    if -2.80000000000000002e239 < y

    1. Initial program 97.0%

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

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

Alternative 9: 59.6% accurate, 4.3× speedup?

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

\\
x - a
\end{array}
Derivation
  1. Initial program 97.3%

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

    \[\leadsto x - \color{blue}{a} \]
  4. Add Preprocessing

Alternative 10: 53.2% 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.3%

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

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

      \[\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/84.5%

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

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

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

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

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

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

      \[\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.5%

      \[\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.5%

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

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

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

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

    \[\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 54.5%

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

Developer target: 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 2024096 
(FPCore (x y z t a)
  :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
  :precision binary64

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

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