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

Percentage Accurate: 97.1% → 99.7%
Time: 11.6s
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.1% 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.7% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 2: 87.1% accurate, 0.7× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.5999999999999996e25 or 1.6e9 < z

    1. Initial program 94.4%

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

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

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

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

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

    if -4.5999999999999996e25 < z < 1.6e9

    1. Initial program 99.1%

      \[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 0 91.7%

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

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

Alternative 3: 84.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+34} \lor \neg \left(z \leq 15200000000\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 -2.4e+34) (not (<= z 15200000000.0)))
   (- x a)
   (+ x (* a (/ y (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -2.4e+34) || !(z <= 15200000000.0)) {
		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 <= (-2.4d+34)) .or. (.not. (z <= 15200000000.0d0))) 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 <= -2.4e+34) || !(z <= 15200000000.0)) {
		tmp = x - a;
	} else {
		tmp = x + (a * (y / (-1.0 - t)));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -2.4e+34) or not (z <= 15200000000.0):
		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 <= -2.4e+34) || !(z <= 15200000000.0))
		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 <= -2.4e+34) || ~((z <= 15200000000.0)))
		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, -2.4e+34], N[Not[LessEqual[z, 15200000000.0]], $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 -2.4 \cdot 10^{+34} \lor \neg \left(z \leq 15200000000\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 < -2.39999999999999987e34 or 1.52e10 < 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/100.0%

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

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

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

    if -2.39999999999999987e34 < z < 1.52e10

    1. Initial program 99.1%

      \[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 0 91.0%

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

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

Alternative 4: 69.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.32 \cdot 10^{+14} \lor \neg \left(t \leq 5.9 \cdot 10^{+35}\right):\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.32e14 or 5.89999999999999985e35 < t

    1. Initial program 97.5%

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

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

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

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

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

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

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

      \[\leadsto x - \frac{a}{\color{blue}{\frac{1 + t}{y}}} \]
    8. Taylor expanded in t around inf 88.7%

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

    if -1.32e14 < t < 5.89999999999999985e35

    1. Initial program 96.3%

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

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

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

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

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

Alternative 5: 65.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -8500000 \lor \neg \left(z \leq 1.7 \cdot 10^{+28}\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -8.5e6 or 1.7e28 < z

    1. Initial program 94.4%

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

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

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

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

    if -8.5e6 < z < 1.7e28

    1. Initial program 99.1%

      \[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 inf 71.7%

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

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

        \[\leadsto x - \color{blue}{\frac{-1 \cdot \left(a \cdot z\right)}{t}} \]
      2. mul-1-neg61.8%

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

      \[\leadsto x - \color{blue}{\frac{-a \cdot z}{t}} \]
    9. Taylor expanded in a around 0 61.8%

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

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

Alternative 6: 69.1% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 96.9%

      \[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. Step-by-step derivation
      1. *-commutative99.9%

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

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

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

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

      \[\leadsto x - \frac{a}{\color{blue}{\frac{1 + t}{y}}} \]
    8. Taylor expanded in t around inf 90.9%

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

    if -1.02e14 < t < 1.1499999999999999e35

    1. Initial program 96.3%

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

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

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

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

    if 1.1499999999999999e35 < t

    1. Initial program 98.1%

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

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

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

Alternative 7: 65.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{-69} \lor \neg \left(z \leq 1400000000\right):\\
\;\;\;\;x - a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.2e-69 or 1.4e9 < z

    1. Initial program 95.1%

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

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

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

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

    if -2.2e-69 < z < 1.4e9

    1. Initial program 99.0%

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

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

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

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

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

        \[\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 0 62.9%

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

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

Alternative 8: 53.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+242} \lor \neg \left(a \leq 1.6 \cdot 10^{+79}\right):\\
\;\;\;\;-a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -5.0000000000000004e242 or 1.60000000000000001e79 < a

    1. Initial program 99.8%

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

      \[\leadsto x - \color{blue}{a} \]
    6. Taylor expanded in x around 0 40.6%

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

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

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

    if -5.0000000000000004e242 < a < 1.60000000000000001e79

    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.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 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 96.9%

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

      \[\leadsto \color{blue}{x + \left(-\frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\right)} \]
    2. +-commutative96.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/89.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 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 96.9%

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

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

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

    \[\leadsto x - \color{blue}{a} \]
  6. Taylor expanded in x around 0 17.9%

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

      \[\leadsto \color{blue}{-a} \]
  8. Simplified17.9%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{0 + a} \]
  11. Step-by-step derivation
    1. +-lft-identity2.7%

      \[\leadsto \color{blue}{a} \]
  12. Simplified2.7%

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

Developer Target 1: 99.7% 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 2024180 
(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))))