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

Percentage Accurate: 84.7% → 98.3%
Time: 8.1s
Alternatives: 11
Speedup: 1.0×

Specification

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

\\
x + \frac{y \cdot \left(z - t\right)}{z - 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 11 alternatives:

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

Initial Program: 84.7% accurate, 1.0× speedup?

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

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

Alternative 1: 98.3% accurate, 1.0× speedup?

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

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

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

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
  4. Step-by-step derivation
    1. fma-udef99.2%

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

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

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

Alternative 2: 81.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{-79} \lor \neg \left(z \leq 2.5 \cdot 10^{-54}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.40000000000000006e-79 or 2.50000000000000008e-54 < z

    1. Initial program 78.6%

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

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

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

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

    if -1.40000000000000006e-79 < z < 2.50000000000000008e-54

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

Alternative 3: 86.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.4999999999999992e102 or 6.99999999999999952e-60 < t

    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \frac{\color{blue}{t \cdot y}}{z - a} \]
      5. associate-*r/92.1%

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

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

    if -9.4999999999999992e102 < t < 6.99999999999999952e-60

    1. Initial program 84.0%

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

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

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

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

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

Alternative 4: 81.9% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 83.0%

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

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

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

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

    if -1.69999999999999988e-82 < z < 3.2000000000000001e-57

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

    if 3.2000000000000001e-57 < z

    1. Initial program 74.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.7 \cdot 10^{-82}:\\ \;\;\;\;x + \frac{y}{\frac{z - a}{z}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-57}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\ \end{array} \]

Alternative 5: 81.8% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 83.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.9%

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

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

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

    if -4.09999999999999994e-79 < z < 2.19999999999999999e-57

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

    if 2.19999999999999999e-57 < z

    1. Initial program 74.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{-79}:\\ \;\;\;\;x + y \cdot \frac{z - t}{z}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-57}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{else}:\\ \;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\ \end{array} \]

Alternative 6: 77.3% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;z \leq 5.8 \cdot 10^{+36}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2e13 or 5.8e36 < z

    1. Initial program 72.3%

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

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

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

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

    if -1.2e13 < z < 5.8e36

    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

Alternative 7: 96.4% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 8: 98.4% accurate, 1.0× speedup?

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

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

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

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

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

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

Alternative 9: 63.7% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-92}:\\
\;\;\;\;y + x\\

\mathbf{elif}\;z \leq 860:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.99999999999999988e-93 or 860 < z

    1. Initial program 77.3%

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

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

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

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

    if -9.99999999999999988e-93 < z < 860

    1. Initial program 98.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{-92}:\\ \;\;\;\;y + x\\ \mathbf{elif}\;z \leq 860:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]

Alternative 10: 52.4% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{-212}:\\
\;\;\;\;x\\

\mathbf{elif}\;x \leq 5.2 \cdot 10^{-67}:\\
\;\;\;\;y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -7.99999999999999963e-212 or 5.1999999999999998e-67 < x

    1. Initial program 86.8%

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

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

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

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

    if -7.99999999999999963e-212 < x < 5.1999999999999998e-67

    1. Initial program 82.0%

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)} \]
    4. Step-by-step derivation
      1. fma-udef99.8%

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

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

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

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

      \[\leadsto \color{blue}{y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-212}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.2 \cdot 10^{-67}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 11: 50.6% accurate, 11.0× speedup?

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  5. Final simplification52.7%

    \[\leadsto x \]

Developer target: 98.4% accurate, 1.0× speedup?

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

\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}

Reproduce

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

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

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