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

Percentage Accurate: 85.3% → 99.2%
Time: 7.8s
Alternatives: 10
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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: 85.3% accurate, 1.0× speedup?

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

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

Alternative 1: 99.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+260}\right):\\ \;\;\;\;\mathsf{fma}\left(a + t, \frac{y}{a + t} \cdot \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- a t))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+260)))
     (fma (+ a t) (* (/ y (+ a t)) (/ (- z t) (- a t))) x)
     (+ x t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (a - t);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+260)) {
		tmp = fma((a + t), ((y / (a + t)) * ((z - t) / (a - t))), x);
	} else {
		tmp = x + t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(a - t))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+260))
		tmp = fma(Float64(a + t), Float64(Float64(y / Float64(a + t)) * Float64(Float64(z - t) / Float64(a - t))), x);
	else
		tmp = Float64(x + t_1);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+260]], $MachinePrecision]], N[(N[(a + t), $MachinePrecision] * N[(N[(y / N[(a + t), $MachinePrecision]), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+260}\right):\\
\;\;\;\;\mathsf{fma}\left(a + t, \frac{y}{a + t} \cdot \frac{z - t}{a - t}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -inf.0 or 2.00000000000000013e260 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t))

    1. Initial program 30.2%

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

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} + x \]
      4. lift--.f64N/A

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{a - t}} + x \]
      5. flip--N/A

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{\frac{a \cdot a - t \cdot t}{a + t}}} + x \]
      6. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t} \cdot \left(a + t\right)} + x \]
      7. *-commutativeN/A

        \[\leadsto \color{blue}{\left(a + t\right) \cdot \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}} + x \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right)} \]
      9. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a + t}, \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{\color{blue}{y \cdot \left(z - t\right)}}{a \cdot a - t \cdot t}, x\right) \]
      11. difference-of-squaresN/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{\left(a + t\right) \cdot \color{blue}{\left(a - t\right)}}, x\right) \]
      13. times-fracN/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t} \cdot \frac{z - t}{a - t}}, x\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t} \cdot \frac{z - t}{a - t}}, x\right) \]
      15. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t}} \cdot \frac{z - t}{a - t}, x\right) \]
      16. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y}{\color{blue}{a + t}} \cdot \frac{z - t}{a - t}, x\right) \]
      17. lower-/.f6499.8

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y}{a + t} \cdot \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    4. Applied rewrites99.8%

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 2.00000000000000013e260

    1. Initial program 99.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

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

Alternative 2: 99.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+260}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{-1}{t - a} \cdot y, z - t, x\right)\\ \mathbf{else}:\\ \;\;\;\;x + t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- a t))))
   (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+260)))
     (fma (* (/ -1.0 (- t a)) y) (- z t) x)
     (+ x t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (a - t);
	double tmp;
	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+260)) {
		tmp = fma(((-1.0 / (t - a)) * y), (z - t), x);
	} else {
		tmp = x + t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(a - t))
	tmp = 0.0
	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+260))
		tmp = fma(Float64(Float64(-1.0 / Float64(t - a)) * y), Float64(z - t), x);
	else
		tmp = Float64(x + t_1);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+260]], $MachinePrecision]], N[(N[(N[(-1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+260}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-1}{t - a} \cdot y, z - t, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -inf.0 or 2.00000000000000013e260 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t))

    1. Initial program 30.2%

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

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. clear-numN/A

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

        \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\frac{a - t}{y \cdot \left(z - t\right)}\right)}} \]
      4. metadata-evalN/A

        \[\leadsto x + \frac{\color{blue}{-1}}{\mathsf{neg}\left(\frac{a - t}{y \cdot \left(z - t\right)}\right)} \]
      5. lower-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{-1}{\mathsf{neg}\left(\frac{a - t}{y \cdot \left(z - t\right)}\right)}} \]
      6. distribute-neg-fracN/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(a - t\right)\right)}{y \cdot \left(z - t\right)}}} \]
      7. lower-/.f64N/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(a - t\right)\right)}{y \cdot \left(z - t\right)}}} \]
      8. neg-sub0N/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{0 - \left(a - t\right)}}{y \cdot \left(z - t\right)}} \]
      9. lift--.f64N/A

        \[\leadsto x + \frac{-1}{\frac{0 - \color{blue}{\left(a - t\right)}}{y \cdot \left(z - t\right)}} \]
      10. sub-negN/A

        \[\leadsto x + \frac{-1}{\frac{0 - \color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}}{y \cdot \left(z - t\right)}} \]
      11. +-commutativeN/A

        \[\leadsto x + \frac{-1}{\frac{0 - \color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}}{y \cdot \left(z - t\right)}} \]
      12. associate--r+N/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{\left(0 - \left(\mathsf{neg}\left(t\right)\right)\right) - a}}{y \cdot \left(z - t\right)}} \]
      13. neg-sub0N/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right)} - a}{y \cdot \left(z - t\right)}} \]
      14. remove-double-negN/A

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

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{t - a}}{y \cdot \left(z - t\right)}} \]
      16. lift-*.f64N/A

        \[\leadsto x + \frac{-1}{\frac{t - a}{\color{blue}{y \cdot \left(z - t\right)}}} \]
      17. *-commutativeN/A

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

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

      \[\leadsto x + \color{blue}{\frac{-1}{\frac{t - a}{\left(z - t\right) \cdot y}}} \]
    5. Step-by-step derivation
      1. lift-+.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{-1}{\frac{t - a}{\left(z - t\right) \cdot y}}} + x \]
      4. lift-/.f64N/A

        \[\leadsto \frac{-1}{\color{blue}{\frac{t - a}{\left(z - t\right) \cdot y}}} + x \]
      5. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{-1}{t - a} \cdot \left(\left(z - t\right) \cdot y\right)} + x \]
      6. lift-*.f64N/A

        \[\leadsto \frac{-1}{t - a} \cdot \color{blue}{\left(\left(z - t\right) \cdot y\right)} + x \]
      7. *-commutativeN/A

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

        \[\leadsto \color{blue}{\left(\frac{-1}{t - a} \cdot y\right) \cdot \left(z - t\right)} + x \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{-1}{t - a} \cdot y, z - t, x\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{t - a} \cdot y}, z - t, x\right) \]
      11. lower-/.f6499.7

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-1}{t - a}} \cdot y, z - t, x\right) \]
    6. Applied rewrites99.7%

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

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 2.00000000000000013e260

    1. Initial program 99.8%

      \[x + \frac{y \cdot \left(z - t\right)}{a - t} \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification99.8%

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

Alternative 3: 94.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+270}:\\ \;\;\;\;x + t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a - t} \cdot \left(z - t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (* y (- z t)) (- a t))))
   (if (<= t_1 (- INFINITY))
     (fma (- 1.0 (/ z t)) y x)
     (if (<= t_1 5e+270) (+ x t_1) (* (/ y (- a t)) (- z t))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y * (z - t)) / (a - t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = fma((1.0 - (z / t)), y, x);
	} else if (t_1 <= 5e+270) {
		tmp = x + t_1;
	} else {
		tmp = (y / (a - t)) * (z - t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y * Float64(z - t)) / Float64(a - t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = fma(Float64(1.0 - Float64(z / t)), y, x);
	elseif (t_1 <= 5e+270)
		tmp = Float64(x + t_1);
	else
		tmp = Float64(Float64(y / Float64(a - t)) * Float64(z - t));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], If[LessEqual[t$95$1, 5e+270], N[(x + t$95$1), $MachinePrecision], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+270}:\\
\;\;\;\;x + t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < -inf.0

    1. Initial program 29.7%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t} + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{t}\right)\right)} + x \]
      3. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{y \cdot \frac{z - t}{t}}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{z - t}{t} \cdot y}\right)\right) + x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{t}\right)\right) \cdot y} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{z - t}{t}\right), y, x\right)} \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{0 - \frac{z - t}{t}}, y, x\right) \]
      8. div-subN/A

        \[\leadsto \mathsf{fma}\left(0 - \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)}, y, x\right) \]
      9. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(0 - \left(\frac{z}{t} - \color{blue}{1}\right), y, x\right) \]
      10. associate-+l-N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(0 - \frac{z}{t}\right) + 1}, y, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)} + 1, y, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{z}{t}} + 1, y, x\right) \]
      13. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 + -1 \cdot \frac{z}{t}}, y, x\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}, y, x\right) \]
      15. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      16. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      17. lower-/.f6483.9

        \[\leadsto \mathsf{fma}\left(1 - \color{blue}{\frac{z}{t}}, y, x\right) \]
    5. Applied rewrites83.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)} \]

    if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t)) < 4.99999999999999976e270

    1. Initial program 99.8%

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

    if 4.99999999999999976e270 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 a t))

    1. Initial program 28.4%

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
      2. div-subN/A

        \[\leadsto y \cdot \color{blue}{\left(\frac{z}{a - t} - \frac{t}{a - t}\right)} \]
      3. distribute-lft-out--N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t} - y \cdot \frac{t}{a - t}} \]
      4. associate-/l*N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} - y \cdot \frac{t}{a - t} \]
      5. associate-/l*N/A

        \[\leadsto \frac{y \cdot z}{a - t} - \color{blue}{\frac{y \cdot t}{a - t}} \]
      6. *-commutativeN/A

        \[\leadsto \frac{y \cdot z}{a - t} - \frac{\color{blue}{t \cdot y}}{a - t} \]
      7. associate-/l*N/A

        \[\leadsto \frac{y \cdot z}{a - t} - \color{blue}{t \cdot \frac{y}{a - t}} \]
      8. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot z} - t \cdot \frac{y}{a - t} \]
      9. *-commutativeN/A

        \[\leadsto \frac{y}{a - t} \cdot z - \color{blue}{\frac{y}{a - t} \cdot t} \]
      10. distribute-lft-out--N/A

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot \left(z - t\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y}{a - t}} \cdot \left(z - t\right) \]
      13. lower--.f64N/A

        \[\leadsto \frac{y}{\color{blue}{a - t}} \cdot \left(z - t\right) \]
      14. lower--.f6496.9

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{y \cdot \left(z - t\right)}{a - t} \leq -\infty:\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{elif}\;\frac{y \cdot \left(z - t\right)}{a - t} \leq 5 \cdot 10^{+270}:\\ \;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a - t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a - t} \cdot \left(z - t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 82.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-84} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -7.2e-84) (not (<= t 9.2e-27)))
   (fma (- 1.0 (/ z t)) y x)
   (fma y (/ (- z t) a) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -7.2e-84) || !(t <= 9.2e-27)) {
		tmp = fma((1.0 - (z / t)), y, x);
	} else {
		tmp = fma(y, ((z - t) / a), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -7.2e-84) || !(t <= 9.2e-27))
		tmp = fma(Float64(1.0 - Float64(z / t)), y, x);
	else
		tmp = fma(y, Float64(Float64(z - t) / a), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.2e-84], N[Not[LessEqual[t, 9.2e-27]], $MachinePrecision]], N[(N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{-84} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.20000000000000007e-84 or 9.1999999999999998e-27 < t

    1. Initial program 77.6%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t} + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{t}\right)\right)} + x \]
      3. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{y \cdot \frac{z - t}{t}}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{z - t}{t} \cdot y}\right)\right) + x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{t}\right)\right) \cdot y} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{z - t}{t}\right), y, x\right)} \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{0 - \frac{z - t}{t}}, y, x\right) \]
      8. div-subN/A

        \[\leadsto \mathsf{fma}\left(0 - \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)}, y, x\right) \]
      9. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(0 - \left(\frac{z}{t} - \color{blue}{1}\right), y, x\right) \]
      10. associate-+l-N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(0 - \frac{z}{t}\right) + 1}, y, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)} + 1, y, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{z}{t}} + 1, y, x\right) \]
      13. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 + -1 \cdot \frac{z}{t}}, y, x\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}, y, x\right) \]
      15. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      16. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      17. lower-/.f6487.8

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)} \]

    if -7.20000000000000007e-84 < t < 9.1999999999999998e-27

    1. Initial program 93.4%

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

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} + x \]
      4. lift--.f64N/A

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{a - t}} + x \]
      5. flip--N/A

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{\frac{a \cdot a - t \cdot t}{a + t}}} + x \]
      6. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t} \cdot \left(a + t\right)} + x \]
      7. *-commutativeN/A

        \[\leadsto \color{blue}{\left(a + t\right) \cdot \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}} + x \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right)} \]
      9. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a + t}, \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{\color{blue}{y \cdot \left(z - t\right)}}{a \cdot a - t \cdot t}, x\right) \]
      11. difference-of-squaresN/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{\left(a + t\right) \cdot \color{blue}{\left(a - t\right)}}, x\right) \]
      13. times-fracN/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t} \cdot \frac{z - t}{a - t}}, x\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t} \cdot \frac{z - t}{a - t}}, x\right) \]
      15. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t}} \cdot \frac{z - t}{a - t}, x\right) \]
      16. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y}{\color{blue}{a + t}} \cdot \frac{z - t}{a - t}, x\right) \]
      17. lower-/.f6494.9

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y}{a + t} \cdot \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    4. Applied rewrites94.9%

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z - t}{a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
      4. lower-/.f64N/A

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.2 \cdot 10^{-84} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z - t}{a}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 83.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{-83} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -1.9e-83) (not (<= t 9.2e-27)))
   (fma (- 1.0 (/ z t)) y x)
   (fma (- z t) (/ y a) x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -1.9e-83) || !(t <= 9.2e-27)) {
		tmp = fma((1.0 - (z / t)), y, x);
	} else {
		tmp = fma((z - t), (y / a), x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -1.9e-83) || !(t <= 9.2e-27))
		tmp = fma(Float64(1.0 - Float64(z / t)), y, x);
	else
		tmp = fma(Float64(z - t), Float64(y / a), x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.9e-83], N[Not[LessEqual[t, 9.2e-27]], $MachinePrecision]], N[(N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-83} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.89999999999999988e-83 or 9.1999999999999998e-27 < t

    1. Initial program 77.6%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t} + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{t}\right)\right)} + x \]
      3. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{y \cdot \frac{z - t}{t}}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{z - t}{t} \cdot y}\right)\right) + x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{t}\right)\right) \cdot y} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{z - t}{t}\right), y, x\right)} \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{0 - \frac{z - t}{t}}, y, x\right) \]
      8. div-subN/A

        \[\leadsto \mathsf{fma}\left(0 - \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)}, y, x\right) \]
      9. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(0 - \left(\frac{z}{t} - \color{blue}{1}\right), y, x\right) \]
      10. associate-+l-N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(0 - \frac{z}{t}\right) + 1}, y, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)} + 1, y, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{z}{t}} + 1, y, x\right) \]
      13. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 + -1 \cdot \frac{z}{t}}, y, x\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}, y, x\right) \]
      15. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      16. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      17. lower-/.f6487.8

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)} \]

    if -1.89999999999999988e-83 < t < 9.1999999999999998e-27

    1. Initial program 93.4%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

        \[\leadsto \color{blue}{\left(z - t\right) \cdot \frac{y}{a}} + x \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)} \]
      5. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{z - t}, \frac{y}{a}, x\right) \]
      6. lower-/.f6488.8

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification88.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{-83} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{a}, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 82.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-59} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -2.5e-59) (not (<= t 9.2e-27)))
   (fma (- 1.0 (/ z t)) y x)
   (fma (/ z a) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -2.5e-59) || !(t <= 9.2e-27)) {
		tmp = fma((1.0 - (z / t)), y, x);
	} else {
		tmp = fma((z / a), y, x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -2.5e-59) || !(t <= 9.2e-27))
		tmp = fma(Float64(1.0 - Float64(z / t)), y, x);
	else
		tmp = fma(Float64(z / a), y, x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.5e-59], N[Not[LessEqual[t, 9.2e-27]], $MachinePrecision]], N[(N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision] * y + x), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{-59} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\
\;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.5000000000000001e-59 or 9.1999999999999998e-27 < t

    1. Initial program 76.7%

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

      \[\leadsto \color{blue}{x + -1 \cdot \frac{y \cdot \left(z - t\right)}{t}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(z - t\right)}{t} + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{y \cdot \left(z - t\right)}{t}\right)\right)} + x \]
      3. associate-/l*N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{y \cdot \frac{z - t}{t}}\right)\right) + x \]
      4. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\frac{z - t}{t} \cdot y}\right)\right) + x \]
      5. distribute-lft-neg-inN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{z - t}{t}\right)\right) \cdot y} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{z - t}{t}\right), y, x\right)} \]
      7. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{0 - \frac{z - t}{t}}, y, x\right) \]
      8. div-subN/A

        \[\leadsto \mathsf{fma}\left(0 - \color{blue}{\left(\frac{z}{t} - \frac{t}{t}\right)}, y, x\right) \]
      9. *-inversesN/A

        \[\leadsto \mathsf{fma}\left(0 - \left(\frac{z}{t} - \color{blue}{1}\right), y, x\right) \]
      10. associate-+l-N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(0 - \frac{z}{t}\right) + 1}, y, x\right) \]
      11. neg-sub0N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)} + 1, y, x\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{z}{t}} + 1, y, x\right) \]
      13. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 + -1 \cdot \frac{z}{t}}, y, x\right) \]
      14. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(1 + \color{blue}{\left(\mathsf{neg}\left(\frac{z}{t}\right)\right)}, y, x\right) \]
      15. unsub-negN/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      16. lower--.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{1 - \frac{z}{t}}, y, x\right) \]
      17. lower-/.f6488.6

        \[\leadsto \mathsf{fma}\left(1 - \color{blue}{\frac{z}{t}}, y, x\right) \]
    5. Applied rewrites88.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)} \]

    if -2.5000000000000001e-59 < t < 9.1999999999999998e-27

    1. Initial program 93.8%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} + x \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{z}{a} \cdot y} + x \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{a}, y, x\right)} \]
      5. lower-/.f6486.9

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y, x\right) \]
    5. Applied rewrites86.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{a}, y, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification87.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{-59} \lor \neg \left(t \leq 9.2 \cdot 10^{-27}\right):\\ \;\;\;\;\mathsf{fma}\left(1 - \frac{z}{t}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 73.8% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+187}:\\ \;\;\;\;\frac{z}{a - t} \cdot y\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{y}{t - a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a - t} \cdot z\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.2e+187)
   (* (/ z (- a t)) y)
   (if (<= z 2.9e+72) (fma t (/ y (- t a)) x) (* (/ y (- a t)) z))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.2e+187) {
		tmp = (z / (a - t)) * y;
	} else if (z <= 2.9e+72) {
		tmp = fma(t, (y / (t - a)), x);
	} else {
		tmp = (y / (a - t)) * z;
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.2e+187)
		tmp = Float64(Float64(z / Float64(a - t)) * y);
	elseif (z <= 2.9e+72)
		tmp = fma(t, Float64(y / Float64(t - a)), x);
	else
		tmp = Float64(Float64(y / Float64(a - t)) * z);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.2e+187], N[(N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 2.9e+72], N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq 2.9 \cdot 10^{+72}:\\
\;\;\;\;\mathsf{fma}\left(t, \frac{y}{t - a}, x\right)\\

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


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

    1. Initial program 64.4%

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{z}{a - t} \cdot y} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{z}{a - t} \cdot y} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{z}{a - t}} \cdot y \]
      5. lower--.f6481.4

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

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

    if -2.1999999999999998e187 < z < 2.90000000000000017e72

    1. Initial program 87.1%

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

        \[\leadsto x + \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. clear-numN/A

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

        \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(1\right)}{\mathsf{neg}\left(\frac{a - t}{y \cdot \left(z - t\right)}\right)}} \]
      4. metadata-evalN/A

        \[\leadsto x + \frac{\color{blue}{-1}}{\mathsf{neg}\left(\frac{a - t}{y \cdot \left(z - t\right)}\right)} \]
      5. lower-/.f64N/A

        \[\leadsto x + \color{blue}{\frac{-1}{\mathsf{neg}\left(\frac{a - t}{y \cdot \left(z - t\right)}\right)}} \]
      6. distribute-neg-fracN/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(a - t\right)\right)}{y \cdot \left(z - t\right)}}} \]
      7. lower-/.f64N/A

        \[\leadsto x + \frac{-1}{\color{blue}{\frac{\mathsf{neg}\left(\left(a - t\right)\right)}{y \cdot \left(z - t\right)}}} \]
      8. neg-sub0N/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{0 - \left(a - t\right)}}{y \cdot \left(z - t\right)}} \]
      9. lift--.f64N/A

        \[\leadsto x + \frac{-1}{\frac{0 - \color{blue}{\left(a - t\right)}}{y \cdot \left(z - t\right)}} \]
      10. sub-negN/A

        \[\leadsto x + \frac{-1}{\frac{0 - \color{blue}{\left(a + \left(\mathsf{neg}\left(t\right)\right)\right)}}{y \cdot \left(z - t\right)}} \]
      11. +-commutativeN/A

        \[\leadsto x + \frac{-1}{\frac{0 - \color{blue}{\left(\left(\mathsf{neg}\left(t\right)\right) + a\right)}}{y \cdot \left(z - t\right)}} \]
      12. associate--r+N/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{\left(0 - \left(\mathsf{neg}\left(t\right)\right)\right) - a}}{y \cdot \left(z - t\right)}} \]
      13. neg-sub0N/A

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(t\right)\right)\right)\right)} - a}{y \cdot \left(z - t\right)}} \]
      14. remove-double-negN/A

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

        \[\leadsto x + \frac{-1}{\frac{\color{blue}{t - a}}{y \cdot \left(z - t\right)}} \]
      16. lift-*.f64N/A

        \[\leadsto x + \frac{-1}{\frac{t - a}{\color{blue}{y \cdot \left(z - t\right)}}} \]
      17. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{y}{t - a}} + x \]
      3. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(t, \frac{y}{t - a}, x\right)} \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(t, \color{blue}{\frac{y}{t - a}}, x\right) \]
      5. lower--.f6486.9

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

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

    if 2.90000000000000017e72 < z

    1. Initial program 79.9%

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

        \[\leadsto \color{blue}{x + \frac{y \cdot \left(z - t\right)}{a - t}} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t} + x} \]
      3. lift-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a - t}} + x \]
      4. lift--.f64N/A

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{a - t}} + x \]
      5. flip--N/A

        \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{\frac{a \cdot a - t \cdot t}{a + t}}} + x \]
      6. associate-/r/N/A

        \[\leadsto \color{blue}{\frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t} \cdot \left(a + t\right)} + x \]
      7. *-commutativeN/A

        \[\leadsto \color{blue}{\left(a + t\right) \cdot \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}} + x \]
      8. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right)} \]
      9. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{a + t}, \frac{y \cdot \left(z - t\right)}{a \cdot a - t \cdot t}, x\right) \]
      10. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{\color{blue}{y \cdot \left(z - t\right)}}{a \cdot a - t \cdot t}, x\right) \]
      11. difference-of-squaresN/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{\color{blue}{\left(a + t\right) \cdot \left(a - t\right)}}, x\right) \]
      12. lift--.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y \cdot \left(z - t\right)}{\left(a + t\right) \cdot \color{blue}{\left(a - t\right)}}, x\right) \]
      13. times-fracN/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t} \cdot \frac{z - t}{a - t}}, x\right) \]
      14. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t} \cdot \frac{z - t}{a - t}}, x\right) \]
      15. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \color{blue}{\frac{y}{a + t}} \cdot \frac{z - t}{a - t}, x\right) \]
      16. lower-+.f64N/A

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y}{\color{blue}{a + t}} \cdot \frac{z - t}{a - t}, x\right) \]
      17. lower-/.f6493.5

        \[\leadsto \mathsf{fma}\left(a + t, \frac{y}{a + t} \cdot \color{blue}{\frac{z - t}{a - t}}, x\right) \]
    4. Applied rewrites93.5%

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
    6. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot z} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{y}{a - t} \cdot z} \]
      3. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y}{a - t}} \cdot z \]
      4. lower--.f6465.2

        \[\leadsto \frac{y}{\color{blue}{a - t}} \cdot z \]
    7. Applied rewrites65.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.2 \cdot 10^{+187}:\\ \;\;\;\;\frac{z}{a - t} \cdot y\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+72}:\\ \;\;\;\;\mathsf{fma}\left(t, \frac{y}{t - a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a - t} \cdot z\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 76.8% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -100000000000 \lor \neg \left(t \leq 9.5 \cdot 10^{+66}\right):\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= t -100000000000.0) (not (<= t 9.5e+66)))
   (+ y x)
   (fma (/ z a) y x)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((t <= -100000000000.0) || !(t <= 9.5e+66)) {
		tmp = y + x;
	} else {
		tmp = fma((z / a), y, x);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((t <= -100000000000.0) || !(t <= 9.5e+66))
		tmp = Float64(y + x);
	else
		tmp = fma(Float64(z / a), y, x);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -100000000000.0], N[Not[LessEqual[t, 9.5e+66]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(N[(z / a), $MachinePrecision] * y + x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -100000000000 \lor \neg \left(t \leq 9.5 \cdot 10^{+66}\right):\\
\;\;\;\;y + x\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{a}, y, x\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1e11 or 9.50000000000000051e66 < t

    1. Initial program 73.4%

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{y + x} \]
      2. lower-+.f6476.8

        \[\leadsto \color{blue}{y + x} \]
    5. Applied rewrites76.8%

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

    if -1e11 < t < 9.50000000000000051e66

    1. Initial program 93.5%

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{a}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a}} + x \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{z}{a} \cdot y} + x \]
      4. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{a}, y, x\right)} \]
      5. lower-/.f6480.6

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z}{a}}, y, x\right) \]
    5. Applied rewrites80.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{a}, y, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification78.8%

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

Alternative 9: 60.0% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.04999999999999993e188

    1. Initial program 64.4%

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a - t}} \]
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{a - t}} \]
      2. *-commutativeN/A

        \[\leadsto \color{blue}{\frac{z}{a - t} \cdot y} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{z}{a - t} \cdot y} \]
      4. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{z}{a - t}} \cdot y \]
      5. lower--.f6481.4

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

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

      \[\leadsto \frac{z}{a} \cdot y \]
    7. Step-by-step derivation
      1. Applied rewrites49.7%

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

      if -1.04999999999999993e188 < z

      1. Initial program 85.5%

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

        \[\leadsto \color{blue}{x + y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{y + x} \]
        2. lower-+.f6465.6

          \[\leadsto \color{blue}{y + x} \]
      5. Applied rewrites65.6%

        \[\leadsto \color{blue}{y + x} \]
    8. Recombined 2 regimes into one program.
    9. Final simplification64.3%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+188}:\\ \;\;\;\;\frac{z}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;y + x\\ \end{array} \]
    10. Add Preprocessing

    Alternative 10: 60.0% accurate, 6.5× speedup?

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

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

      \[\leadsto \color{blue}{x + y} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{y + x} \]
      2. lower-+.f6461.8

        \[\leadsto \color{blue}{y + x} \]
    5. Applied rewrites61.8%

      \[\leadsto \color{blue}{y + x} \]
    6. Final simplification61.8%

      \[\leadsto y + x \]
    7. Add Preprocessing

    Developer Target 1: 98.2% accurate, 0.8× speedup?

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

    Reproduce

    ?
    herbie shell --seed 2024299 
    (FPCore (x y z t a)
      :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, B"
      :precision binary64
    
      :alt
      (! :herbie-platform default (+ x (/ y (/ (- a t) (- z t)))))
    
      (+ x (/ (* y (- z t)) (- a t))))