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

Percentage Accurate: 97.1% → 99.7%
Time: 8.4s
Alternatives: 14
Speedup: 1.3×

Specification

?
\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 97.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

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

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

Alternative 1: 99.7% accurate, 1.3× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
    3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 76.7% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;t \leq -7.8 \cdot 10^{-130}:\\
\;\;\;\;x - \frac{y}{1 - z} \cdot a\\

\mathbf{elif}\;t \leq 105000000000:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.8000000000000001e64 or 1.05e11 < t

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
      3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8000000000000001e64 < t < -7.8000000000000002e-130

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

      if -7.8000000000000002e-130 < t < 1.05e11

      1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
        10. lower-+.f6477.7

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
      6. Taylor expanded in t around 0

        \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
      7. Step-by-step derivation
        1. Applied rewrites77.7%

          \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
      8. Recombined 3 regimes into one program.
      9. Add Preprocessing

      Alternative 3: 72.4% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{t} \cdot a\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{-59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -8 \cdot 10^{-106}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+33}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (- x (* (/ y t) a))))
         (if (<= t -4.8e-59)
           t_1
           (if (<= t -8e-106)
             (fma (fma (- 1.0 y) z (- y)) a x)
             (if (<= t 5e+33) (fma (/ z (- 1.0 z)) a x) t_1)))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = x - ((y / t) * a);
      	double tmp;
      	if (t <= -4.8e-59) {
      		tmp = t_1;
      	} else if (t <= -8e-106) {
      		tmp = fma(fma((1.0 - y), z, -y), a, x);
      	} else if (t <= 5e+33) {
      		tmp = fma((z / (1.0 - z)), a, x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = Float64(x - Float64(Float64(y / t) * a))
      	tmp = 0.0
      	if (t <= -4.8e-59)
      		tmp = t_1;
      	elseif (t <= -8e-106)
      		tmp = fma(fma(Float64(1.0 - y), z, Float64(-y)), a, x);
      	elseif (t <= 5e+33)
      		tmp = fma(Float64(z / Float64(1.0 - z)), a, x);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e-59], t$95$1, If[LessEqual[t, -8e-106], N[(N[(N[(1.0 - y), $MachinePrecision] * z + (-y)), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 5e+33], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x - \frac{y}{t} \cdot a\\
      \mathbf{if}\;t \leq -4.8 \cdot 10^{-59}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq -8 \cdot 10^{-106}:\\
      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\
      
      \mathbf{elif}\;t \leq 5 \cdot 10^{+33}:\\
      \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -4.8000000000000003e-59 or 4.99999999999999973e33 < t

        1. Initial program 98.3%

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

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

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

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

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

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

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

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

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

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

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

          if -4.8000000000000003e-59 < t < -7.99999999999999953e-106

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
            3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - y}{1 - z}}, a, x\right) \]
          8. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

            \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - y}{1 - z}}, a, x\right) \]
          10. Taylor expanded in z around 0

            \[\leadsto \mathsf{fma}\left(-1 \cdot y + \color{blue}{z \cdot \left(1 - y\right)}, a, x\right) \]
          11. Step-by-step derivation
            1. Applied rewrites92.4%

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

            if -7.99999999999999953e-106 < t < 4.99999999999999973e33

            1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
              10. lower-+.f6477.8

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
            6. Taylor expanded in t around 0

              \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
            7. Step-by-step derivation
              1. Applied rewrites77.1%

                \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
            8. Recombined 3 regimes into one program.
            9. Add Preprocessing

            Alternative 4: 91.6% accurate, 1.0× speedup?

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

              1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
                3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -3.3999999999999999e65 < t < 1.9e11

              1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
                3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - y}{1 - z}}, a, x\right) \]
              8. Step-by-step derivation
                1. lower-/.f64N/A

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

                  \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{z - y}}{1 - z}, a, x\right) \]
                3. lower--.f6498.1

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

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

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

            Alternative 5: 89.0% accurate, 1.0× speedup?

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

              1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -4.0999999999999999e-4 < z < 2.90000000000000019e-15

              1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
                3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{y}{1 + t}}, a, x\right) \]
              8. Step-by-step derivation
                1. associate-*r/N/A

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

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

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

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

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

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

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

            Alternative 6: 87.5% accurate, 1.0× speedup?

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

              1. Initial program 97.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -4.0999999999999999e-4 < z < 2.90000000000000019e-15

                1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
                  3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{y}{1 + t}}, a, x\right) \]
                8. Step-by-step derivation
                  1. associate-*r/N/A

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{-y}{1 + t}}, a, x\right) \]
              7. Recombined 2 regimes into one program.
              8. Final simplification90.5%

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

              Alternative 7: 84.9% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.0075:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+18}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= z -0.0075)
                 (fma (/ z (- 1.0 z)) a x)
                 (if (<= z 7.6e+18) (- x (* (/ y (+ 1.0 t)) a)) (- x a))))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (z <= -0.0075) {
              		tmp = fma((z / (1.0 - z)), a, x);
              	} else if (z <= 7.6e+18) {
              		tmp = x - ((y / (1.0 + t)) * a);
              	} else {
              		tmp = x - a;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (z <= -0.0075)
              		tmp = fma(Float64(z / Float64(1.0 - z)), a, x);
              	elseif (z <= 7.6e+18)
              		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
              	else
              		tmp = Float64(x - a);
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0075], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 7.6e+18], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -0.0075:\\
              \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
              
              \mathbf{elif}\;z \leq 7.6 \cdot 10^{+18}:\\
              \;\;\;\;x - \frac{y}{1 + t} \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;x - a\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < -0.0074999999999999997

                1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                  10. lower-+.f6488.1

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

                  \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                6. Taylor expanded in t around 0

                  \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                7. Step-by-step derivation
                  1. Applied rewrites84.7%

                    \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]

                  if -0.0074999999999999997 < z < 7.6e18

                  1. Initial program 99.2%

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

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

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

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

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

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

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

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

                  if 7.6e18 < z

                  1. Initial program 96.1%

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

                    \[\leadsto \color{blue}{x - a} \]
                  4. Step-by-step derivation
                    1. lower--.f6483.3

                      \[\leadsto \color{blue}{x - a} \]
                  5. Applied rewrites83.3%

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

                Alternative 8: 76.6% accurate, 1.1× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.6 \cdot 10^{+65} \lor \neg \left(t \leq 105000000000\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (or (<= t -3.6e+65) (not (<= t 105000000000.0)))
                   (fma (/ (- z y) t) a x)
                   (fma (/ z (- 1.0 z)) a x)))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if ((t <= -3.6e+65) || !(t <= 105000000000.0)) {
                		tmp = fma(((z - y) / t), a, x);
                	} else {
                		tmp = fma((z / (1.0 - z)), a, x);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if ((t <= -3.6e+65) || !(t <= 105000000000.0))
                		tmp = fma(Float64(Float64(z - y) / t), a, x);
                	else
                		tmp = fma(Float64(z / Float64(1.0 - z)), a, x);
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.6e+65], N[Not[LessEqual[t, 105000000000.0]], $MachinePrecision]], N[(N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision] * a + x), $MachinePrecision], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t \leq -3.6 \cdot 10^{+65} \lor \neg \left(t \leq 105000000000\right):\\
                \;\;\;\;\mathsf{fma}\left(\frac{z - y}{t}, a, x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t < -3.59999999999999978e65 or 1.05e11 < t

                  1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
                    3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -3.59999999999999978e65 < t < 1.05e11

                  1. Initial program 98.1%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                    10. lower-+.f6476.5

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                  6. Taylor expanded in t around 0

                    \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                  7. Step-by-step derivation
                    1. Applied rewrites76.0%

                      \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification81.4%

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

                  Alternative 9: 84.9% accurate, 1.1× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.0075:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+18}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (<= z -0.0075)
                     (fma (/ z (- 1.0 z)) a x)
                     (if (<= z 7.6e+18) (fma (/ y (- -1.0 t)) a x) (- x a))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if (z <= -0.0075) {
                  		tmp = fma((z / (1.0 - z)), a, x);
                  	} else if (z <= 7.6e+18) {
                  		tmp = fma((y / (-1.0 - t)), a, x);
                  	} else {
                  		tmp = x - a;
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if (z <= -0.0075)
                  		tmp = fma(Float64(z / Float64(1.0 - z)), a, x);
                  	elseif (z <= 7.6e+18)
                  		tmp = fma(Float64(y / Float64(-1.0 - t)), a, x);
                  	else
                  		tmp = Float64(x - a);
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0075], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 7.6e+18], N[(N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -0.0075:\\
                  \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
                  
                  \mathbf{elif}\;z \leq 7.6 \cdot 10^{+18}:\\
                  \;\;\;\;\mathsf{fma}\left(\frac{y}{-1 - t}, a, x\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x - a\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if z < -0.0074999999999999997

                    1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                      10. lower-+.f6488.1

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                    6. Taylor expanded in t around 0

                      \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                    7. Step-by-step derivation
                      1. Applied rewrites84.7%

                        \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]

                      if -0.0074999999999999997 < z < 7.6e18

                      1. Initial program 99.2%

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
                        3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{-1 \cdot \frac{y}{1 + t}}, a, x\right) \]
                      8. Step-by-step derivation
                        1. associate-*r/N/A

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

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

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

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

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

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

                      if 7.6e18 < z

                      1. Initial program 96.1%

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

                        \[\leadsto \color{blue}{x - a} \]
                      4. Step-by-step derivation
                        1. lower--.f6483.3

                          \[\leadsto \color{blue}{x - a} \]
                      5. Applied rewrites83.3%

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

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

                    Alternative 10: 75.1% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -0.98 \lor \neg \left(z \leq 8 \cdot 10^{-6}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (if (or (<= z -0.98) (not (<= z 8e-6)))
                       (- x a)
                       (fma (fma (- 1.0 y) z (- y)) a x)))
                    double code(double x, double y, double z, double t, double a) {
                    	double tmp;
                    	if ((z <= -0.98) || !(z <= 8e-6)) {
                    		tmp = x - a;
                    	} else {
                    		tmp = fma(fma((1.0 - y), z, -y), a, x);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a)
                    	tmp = 0.0
                    	if ((z <= -0.98) || !(z <= 8e-6))
                    		tmp = Float64(x - a);
                    	else
                    		tmp = fma(fma(Float64(1.0 - y), z, Float64(-y)), a, x);
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -0.98], N[Not[LessEqual[z, 8e-6]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(N[(N[(1.0 - y), $MachinePrecision] * z + (-y)), $MachinePrecision] * a + x), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;z \leq -0.98 \lor \neg \left(z \leq 8 \cdot 10^{-6}\right):\\
                    \;\;\;\;x - a\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if z < -0.97999999999999998 or 7.99999999999999964e-6 < z

                      1. Initial program 96.9%

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

                        \[\leadsto \color{blue}{x - a} \]
                      4. Step-by-step derivation
                        1. lower--.f6482.2

                          \[\leadsto \color{blue}{x - a} \]
                      5. Applied rewrites82.2%

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

                      if -0.97999999999999998 < z < 7.99999999999999964e-6

                      1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto x - \color{blue}{\frac{y - z}{1 + \left(t - z\right)} \cdot a} \]
                        3. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - y}{1 - z}}, a, x\right) \]
                      8. Step-by-step derivation
                        1. lower-/.f64N/A

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

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

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

                        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{z - y}{1 - z}}, a, x\right) \]
                      10. Taylor expanded in z around 0

                        \[\leadsto \mathsf{fma}\left(-1 \cdot y + \color{blue}{z \cdot \left(1 - y\right)}, a, x\right) \]
                      11. Step-by-step derivation
                        1. Applied rewrites73.3%

                          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(1 - y, \color{blue}{z}, -y\right), a, x\right) \]
                      12. Recombined 2 regimes into one program.
                      13. Final simplification77.5%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -0.98 \lor \neg \left(z \leq 8 \cdot 10^{-6}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(1 - y, z, -y\right), a, x\right)\\ \end{array} \]
                      14. Add Preprocessing

                      Alternative 11: 67.0% accurate, 1.2× speedup?

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

                        1. Initial program 96.9%

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

                          \[\leadsto \color{blue}{x - a} \]
                        4. Step-by-step derivation
                          1. lower--.f6482.9

                            \[\leadsto \color{blue}{x - a} \]
                        5. Applied rewrites82.9%

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

                        if -2.4e14 < z < 7.99999999999999964e-6

                        1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                          10. lower-+.f6466.0

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

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                        6. Taylor expanded in t around 0

                          \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites61.6%

                            \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                          2. Taylor expanded in z around 0

                            \[\leadsto \mathsf{fma}\left(\frac{z}{1}, a, x\right) \]
                          3. Step-by-step derivation
                            1. Applied rewrites61.1%

                              \[\leadsto \mathsf{fma}\left(\frac{z}{1}, a, x\right) \]
                          4. Recombined 2 regimes into one program.
                          5. Final simplification71.3%

                            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.4 \cdot 10^{+14} \lor \neg \left(z \leq 8 \cdot 10^{-6}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1}, a, x\right)\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 12: 65.2% accurate, 1.2× speedup?

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

                            1. Initial program 97.2%

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

                              \[\leadsto \color{blue}{x - a} \]
                            4. Step-by-step derivation
                              1. lower--.f6475.8

                                \[\leadsto \color{blue}{x - a} \]
                            5. Applied rewrites75.8%

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

                            if -3.3999999999999997e-27 < z < 1.65e-48

                            1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{z}{\color{blue}{\left(1 + t\right) - z}}, a, x\right) \]
                              10. lower-+.f6469.0

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

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

                              \[\leadsto \mathsf{fma}\left(\frac{z}{t}, a, x\right) \]
                            7. Step-by-step derivation
                              1. Applied rewrites60.1%

                                \[\leadsto \mathsf{fma}\left(\frac{z}{t}, a, x\right) \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification68.4%

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

                            Alternative 13: 60.7% accurate, 8.8× speedup?

                            \[\begin{array}{l} \\ x - a \end{array} \]
                            (FPCore (x y z t a) :precision binary64 (- x a))
                            double code(double x, double y, double z, double t, double a) {
                            	return x - a;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                code = x - a
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a) {
                            	return x - a;
                            }
                            
                            def code(x, y, z, t, a):
                            	return x - a
                            
                            function code(x, y, z, t, a)
                            	return Float64(x - a)
                            end
                            
                            function tmp = code(x, y, z, t, a)
                            	tmp = x - a;
                            end
                            
                            code[x_, y_, z_, t_, a_] := N[(x - a), $MachinePrecision]
                            
                            \begin{array}{l}
                            
                            \\
                            x - a
                            \end{array}
                            
                            Derivation
                            1. Initial program 98.1%

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

                              \[\leadsto \color{blue}{x - a} \]
                            4. Step-by-step derivation
                              1. lower--.f6461.8

                                \[\leadsto \color{blue}{x - a} \]
                            5. Applied rewrites61.8%

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

                            Alternative 14: 16.9% accurate, 11.7× speedup?

                            \[\begin{array}{l} \\ -a \end{array} \]
                            (FPCore (x y z t a) :precision binary64 (- a))
                            double code(double x, double y, double z, double t, double a) {
                            	return -a;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(x, y, z, t, a)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8), intent (in) :: t
                                real(8), intent (in) :: a
                                code = -a
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a) {
                            	return -a;
                            }
                            
                            def code(x, y, z, t, a):
                            	return -a
                            
                            function code(x, y, z, t, a)
                            	return Float64(-a)
                            end
                            
                            function tmp = code(x, y, z, t, a)
                            	tmp = -a;
                            end
                            
                            code[x_, y_, z_, t_, a_] := (-a)
                            
                            \begin{array}{l}
                            
                            \\
                            -a
                            \end{array}
                            
                            Derivation
                            1. Initial program 98.1%

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

                              \[\leadsto \color{blue}{x - a} \]
                            4. Step-by-step derivation
                              1. lower--.f6461.8

                                \[\leadsto \color{blue}{x - a} \]
                            5. Applied rewrites61.8%

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

                              \[\leadsto -1 \cdot \color{blue}{a} \]
                            7. Step-by-step derivation
                              1. Applied rewrites17.2%

                                \[\leadsto -a \]
                              2. Add Preprocessing

                              Developer Target 1: 99.7% accurate, 1.2× speedup?

                              \[\begin{array}{l} \\ x - \frac{y - z}{\left(t - z\right) + 1} \cdot a \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
                              double code(double x, double y, double z, double t, double a) {
                              	return x - (((y - z) / ((t - z) + 1.0)) * a);
                              }
                              
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(x, y, z, t, a)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8), intent (in) :: t
                                  real(8), intent (in) :: a
                                  code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
                              end function
                              
                              public static double code(double x, double y, double z, double t, double a) {
                              	return x - (((y - z) / ((t - z) + 1.0)) * a);
                              }
                              
                              def code(x, y, z, t, a):
                              	return x - (((y - z) / ((t - z) + 1.0)) * a)
                              
                              function code(x, y, z, t, a)
                              	return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a))
                              end
                              
                              function tmp = code(x, y, z, t, a)
                              	tmp = x - (((y - z) / ((t - z) + 1.0)) * a);
                              end
                              
                              code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
                              
                              \begin{array}{l}
                              
                              \\
                              x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
                              \end{array}
                              

                              Reproduce

                              ?
                              herbie shell --seed 2024363 
                              (FPCore (x y z t a)
                                :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                                :precision binary64
                              
                                :alt
                                (! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
                              
                                (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))