Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1

Percentage Accurate: 92.6% → 95.9%
Time: 4.2s
Alternatives: 13
Speedup: 1.2×

Specification

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

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

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 13 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: 92.6% accurate, 1.0× speedup?

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

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

Alternative 1: 95.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+179}:\\
\;\;\;\;\mathsf{fma}\left(z, y, \mathsf{fma}\left(t, a, x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t + b \cdot z, \mathsf{fma}\left(z, y, x\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.9999999999999998e178

    1. Initial program 92.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
      16. distribute-lft-outN/A

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

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

        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
      19. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
      20. lower-*.f6495.9

        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
    3. Applied rewrites95.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + a \cdot \left(t + b \cdot z\right)\right)} \]
    4. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

      if -9.9999999999999998e178 < t

      1. Initial program 92.6%

        \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
      2. Step-by-step derivation
        1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right) + \left(x + y \cdot z\right) \]
        12. distribute-lft-outN/A

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

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

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

          \[\leadsto \mathsf{fma}\left(a, t + \color{blue}{b \cdot z}, x + y \cdot z\right) \]
        16. lower-*.f6494.8

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

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

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

          \[\leadsto \mathsf{fma}\left(a, t + b \cdot z, \color{blue}{y \cdot z} + x\right) \]
        20. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(a, t + b \cdot z, \color{blue}{z \cdot y} + x\right) \]
        21. lower-fma.f6494.8

          \[\leadsto \mathsf{fma}\left(a, t + b \cdot z, \color{blue}{\mathsf{fma}\left(z, y, x\right)}\right) \]
      3. Applied rewrites94.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(a, t + b \cdot z, \mathsf{fma}\left(z, y, x\right)\right)} \]
    6. Recombined 2 regimes into one program.
    7. Add Preprocessing

    Alternative 2: 94.4% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \mathsf{fma}\left(z, y, x + a \cdot \left(t + b \cdot z\right)\right) \end{array} \]
    (FPCore (x y z t a b) :precision binary64 (fma z y (+ x (* a (+ t (* b z))))))
    double code(double x, double y, double z, double t, double a, double b) {
    	return fma(z, y, (x + (a * (t + (b * z)))));
    }
    
    function code(x, y, z, t, a, b)
    	return fma(z, y, Float64(x + Float64(a * Float64(t + Float64(b * z)))))
    end
    
    code[x_, y_, z_, t_, a_, b_] := N[(z * y + N[(x + N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    
    \\
    \mathsf{fma}\left(z, y, x + a \cdot \left(t + b \cdot z\right)\right)
    \end{array}
    
    Derivation
    1. Initial program 92.6%

      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
    2. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
      15. associate-*l*N/A

        \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
      16. distribute-lft-outN/A

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

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

        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
      19. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
      20. lower-*.f6495.9

        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
    3. Applied rewrites95.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + a \cdot \left(t + b \cdot z\right)\right)} \]
    4. Add Preprocessing

    Alternative 3: 87.2% accurate, 1.1× speedup?

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

      1. Initial program 92.6%

        \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
      2. Taylor expanded in y around 0

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

          \[\leadsto \left(x + \color{blue}{a \cdot t}\right) + \left(a \cdot z\right) \cdot b \]
        2. lower-*.f6472.5

          \[\leadsto \left(x + a \cdot \color{blue}{t}\right) + \left(a \cdot z\right) \cdot b \]
      4. Applied rewrites72.5%

        \[\leadsto \color{blue}{\left(x + a \cdot t\right)} + \left(a \cdot z\right) \cdot b \]

      if -2.00000000000000004e95 < b < 1.24999999999999996e117

      1. Initial program 92.6%

        \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
      2. Step-by-step derivation
        1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
        15. associate-*l*N/A

          \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
        16. distribute-lft-outN/A

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

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

          \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
        19. *-commutativeN/A

          \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
        20. lower-*.f6495.9

          \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
      3. Applied rewrites95.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + a \cdot \left(t + b \cdot z\right)\right)} \]
      4. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

        if 1.24999999999999996e117 < b

        1. Initial program 92.6%

          \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
        2. Taylor expanded in y around 0

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

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

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

            \[\leadsto x + \mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right) \]
          4. lower-*.f6474.5

            \[\leadsto x + \mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right) \]
        4. Applied rewrites74.5%

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

            \[\leadsto x + \color{blue}{\mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right)} \]
          2. add-flipN/A

            \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right)\right)\right)} \]
          3. lift-fma.f64N/A

            \[\leadsto x - \left(\mathsf{neg}\left(\left(a \cdot t + a \cdot \left(b \cdot z\right)\right)\right)\right) \]
          4. lift-*.f64N/A

            \[\leadsto x - \left(\mathsf{neg}\left(\left(a \cdot t + a \cdot \left(b \cdot z\right)\right)\right)\right) \]
          5. distribute-lft-outN/A

            \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
          6. lift-+.f64N/A

            \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
          7. lift-*.f64N/A

            \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
          8. add-flipN/A

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

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

            \[\leadsto a \cdot \left(t + b \cdot z\right) + x \]
          11. *-commutativeN/A

            \[\leadsto \left(t + b \cdot z\right) \cdot a + x \]
          12. lower-fma.f6475.2

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

            \[\leadsto \mathsf{fma}\left(t + b \cdot z, a, x\right) \]
          14. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(b \cdot z + t, a, x\right) \]
          15. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(b \cdot z + t, a, x\right) \]
          16. lower-fma.f6475.2

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right) \]
        6. Applied rewrites75.2%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)} \]
      6. Recombined 3 regimes into one program.
      7. Add Preprocessing

      Alternative 4: 86.4% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(z, y, \mathsf{fma}\left(t, a, x\right)\right)\\ \mathbf{if}\;y \leq -4.4 \cdot 10^{+35}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b)
       :precision binary64
       (let* ((t_1 (fma z y (fma t a x))))
         (if (<= y -4.4e+35) t_1 (if (<= y 2.4e-35) (fma (fma b z t) a x) t_1))))
      double code(double x, double y, double z, double t, double a, double b) {
      	double t_1 = fma(z, y, fma(t, a, x));
      	double tmp;
      	if (y <= -4.4e+35) {
      		tmp = t_1;
      	} else if (y <= 2.4e-35) {
      		tmp = fma(fma(b, z, t), a, x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b)
      	t_1 = fma(z, y, fma(t, a, x))
      	tmp = 0.0
      	if (y <= -4.4e+35)
      		tmp = t_1;
      	elseif (y <= 2.4e-35)
      		tmp = fma(fma(b, z, t), a, x);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * y + N[(t * a + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e+35], t$95$1, If[LessEqual[y, 2.4e-35], N[(N[(b * z + t), $MachinePrecision] * a + x), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(z, y, \mathsf{fma}\left(t, a, x\right)\right)\\
      \mathbf{if}\;y \leq -4.4 \cdot 10^{+35}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;y \leq 2.4 \cdot 10^{-35}:\\
      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -4.3999999999999997e35 or 2.4000000000000001e-35 < y

        1. Initial program 92.6%

          \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
        2. Step-by-step derivation
          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
          15. associate-*l*N/A

            \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
          16. distribute-lft-outN/A

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

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

            \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
          19. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
          20. lower-*.f6495.9

            \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
        3. Applied rewrites95.9%

          \[\leadsto \color{blue}{\mathsf{fma}\left(z, y, x + a \cdot \left(t + b \cdot z\right)\right)} \]
        4. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

          if -4.3999999999999997e35 < y < 2.4000000000000001e-35

          1. Initial program 92.6%

            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
          2. Taylor expanded in y around 0

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

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

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

              \[\leadsto x + \mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right) \]
            4. lower-*.f6474.5

              \[\leadsto x + \mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right) \]
          4. Applied rewrites74.5%

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

              \[\leadsto x + \color{blue}{\mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right)} \]
            2. add-flipN/A

              \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right)\right)\right)} \]
            3. lift-fma.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(\left(a \cdot t + a \cdot \left(b \cdot z\right)\right)\right)\right) \]
            4. lift-*.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(\left(a \cdot t + a \cdot \left(b \cdot z\right)\right)\right)\right) \]
            5. distribute-lft-outN/A

              \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
            6. lift-+.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
            7. lift-*.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
            8. add-flipN/A

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

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

              \[\leadsto a \cdot \left(t + b \cdot z\right) + x \]
            11. *-commutativeN/A

              \[\leadsto \left(t + b \cdot z\right) \cdot a + x \]
            12. lower-fma.f6475.2

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

              \[\leadsto \mathsf{fma}\left(t + b \cdot z, a, x\right) \]
            14. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(b \cdot z + t, a, x\right) \]
            15. lift-*.f64N/A

              \[\leadsto \mathsf{fma}\left(b \cdot z + t, a, x\right) \]
            16. lower-fma.f6475.2

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right) \]
          6. Applied rewrites75.2%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)} \]
        6. Recombined 2 regimes into one program.
        7. Add Preprocessing

        Alternative 5: 80.0% accurate, 1.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, b, y\right) \cdot z\\ \mathbf{if}\;z \leq -1.25 \cdot 10^{+106}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.3 \cdot 10^{-16}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+122}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (let* ((t_1 (* (fma a b y) z)))
           (if (<= z -1.25e+106)
             t_1
             (if (<= z 3.3e-16)
               (fma (fma b z t) a x)
               (if (<= z 2.55e+122) (fma y z x) t_1)))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double t_1 = fma(a, b, y) * z;
        	double tmp;
        	if (z <= -1.25e+106) {
        		tmp = t_1;
        	} else if (z <= 3.3e-16) {
        		tmp = fma(fma(b, z, t), a, x);
        	} else if (z <= 2.55e+122) {
        		tmp = fma(y, z, x);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	t_1 = Float64(fma(a, b, y) * z)
        	tmp = 0.0
        	if (z <= -1.25e+106)
        		tmp = t_1;
        	elseif (z <= 3.3e-16)
        		tmp = fma(fma(b, z, t), a, x);
        	elseif (z <= 2.55e+122)
        		tmp = fma(y, z, x);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b + y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.25e+106], t$95$1, If[LessEqual[z, 3.3e-16], N[(N[(b * z + t), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[z, 2.55e+122], N[(y * z + x), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \mathsf{fma}\left(a, b, y\right) \cdot z\\
        \mathbf{if}\;z \leq -1.25 \cdot 10^{+106}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;z \leq 3.3 \cdot 10^{-16}:\\
        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right)\\
        
        \mathbf{elif}\;z \leq 2.55 \cdot 10^{+122}:\\
        \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if z < -1.25e106 or 2.55e122 < z

          1. Initial program 92.6%

            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
          2. Taylor expanded in z around inf

            \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
          3. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto z \cdot \color{blue}{\left(y + a \cdot b\right)} \]
            2. lower-+.f64N/A

              \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
            3. lower-*.f6450.1

              \[\leadsto z \cdot \left(y + a \cdot \color{blue}{b}\right) \]
          4. Applied rewrites50.1%

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

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

              \[\leadsto \left(y + a \cdot b\right) \cdot \color{blue}{z} \]
            3. lower-*.f6450.1

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

              \[\leadsto \left(y + a \cdot b\right) \cdot z \]
            5. +-commutativeN/A

              \[\leadsto \left(a \cdot b + y\right) \cdot z \]
            6. lift-*.f64N/A

              \[\leadsto \left(a \cdot b + y\right) \cdot z \]
            7. lower-fma.f6450.1

              \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot z \]
          6. Applied rewrites50.1%

            \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot \color{blue}{z} \]

          if -1.25e106 < z < 3.29999999999999988e-16

          1. Initial program 92.6%

            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
          2. Taylor expanded in y around 0

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

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

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

              \[\leadsto x + \mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right) \]
            4. lower-*.f6474.5

              \[\leadsto x + \mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right) \]
          4. Applied rewrites74.5%

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

              \[\leadsto x + \color{blue}{\mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right)} \]
            2. add-flipN/A

              \[\leadsto x - \color{blue}{\left(\mathsf{neg}\left(\mathsf{fma}\left(a, t, a \cdot \left(b \cdot z\right)\right)\right)\right)} \]
            3. lift-fma.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(\left(a \cdot t + a \cdot \left(b \cdot z\right)\right)\right)\right) \]
            4. lift-*.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(\left(a \cdot t + a \cdot \left(b \cdot z\right)\right)\right)\right) \]
            5. distribute-lft-outN/A

              \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
            6. lift-+.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
            7. lift-*.f64N/A

              \[\leadsto x - \left(\mathsf{neg}\left(a \cdot \left(t + b \cdot z\right)\right)\right) \]
            8. add-flipN/A

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

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

              \[\leadsto a \cdot \left(t + b \cdot z\right) + x \]
            11. *-commutativeN/A

              \[\leadsto \left(t + b \cdot z\right) \cdot a + x \]
            12. lower-fma.f6475.2

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

              \[\leadsto \mathsf{fma}\left(t + b \cdot z, a, x\right) \]
            14. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(b \cdot z + t, a, x\right) \]
            15. lift-*.f64N/A

              \[\leadsto \mathsf{fma}\left(b \cdot z + t, a, x\right) \]
            16. lower-fma.f6475.2

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), a, x\right) \]
          6. Applied rewrites75.2%

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

          if 3.29999999999999988e-16 < z < 2.55e122

          1. Initial program 92.6%

            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
          2. Step-by-step derivation
            1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
            15. associate-*l*N/A

              \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
            16. distribute-lft-outN/A

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

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

              \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
            19. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
            20. lower-*.f6495.9

              \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
          3. Applied rewrites95.9%

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

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

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

              \[\leadsto \color{blue}{\left(x + a \cdot \left(t + b \cdot z\right)\right)} + z \cdot y \]
            4. sum-to-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), \frac{a}{x}, 1\right), x, \color{blue}{y \cdot z}\right) \]
            17. lower-*.f6484.6

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

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

            \[\leadsto \color{blue}{x + y \cdot z} \]
          7. Step-by-step derivation
            1. lower-+.f64N/A

              \[\leadsto x + \color{blue}{y \cdot z} \]
            2. lower-*.f6452.2

              \[\leadsto x + y \cdot \color{blue}{z} \]
          8. Applied rewrites52.2%

            \[\leadsto \color{blue}{x + y \cdot z} \]
          9. Step-by-step derivation
            1. Applied rewrites52.2%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} \]
          10. Recombined 3 regimes into one program.
          11. Add Preprocessing

          Alternative 6: 72.4% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{-62}:\\ \;\;\;\;z \cdot \left(y + a \cdot b\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+122}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, b, y\right) \cdot z\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (<= z -8e-62)
             (* z (+ y (* a b)))
             (if (<= z 6e-77)
               (+ x (* a t))
               (if (<= z 2.55e+122) (fma y z x) (* (fma a b y) z)))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (z <= -8e-62) {
          		tmp = z * (y + (a * b));
          	} else if (z <= 6e-77) {
          		tmp = x + (a * t);
          	} else if (z <= 2.55e+122) {
          		tmp = fma(y, z, x);
          	} else {
          		tmp = fma(a, b, y) * z;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (z <= -8e-62)
          		tmp = Float64(z * Float64(y + Float64(a * b)));
          	elseif (z <= 6e-77)
          		tmp = Float64(x + Float64(a * t));
          	elseif (z <= 2.55e+122)
          		tmp = fma(y, z, x);
          	else
          		tmp = Float64(fma(a, b, y) * z);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8e-62], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-77], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e+122], N[(y * z + x), $MachinePrecision], N[(N[(a * b + y), $MachinePrecision] * z), $MachinePrecision]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -8 \cdot 10^{-62}:\\
          \;\;\;\;z \cdot \left(y + a \cdot b\right)\\
          
          \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\
          \;\;\;\;x + a \cdot t\\
          
          \mathbf{elif}\;z \leq 2.55 \cdot 10^{+122}:\\
          \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(a, b, y\right) \cdot z\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z < -8.0000000000000003e-62

            1. Initial program 92.6%

              \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
            2. Taylor expanded in z around inf

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto z \cdot \color{blue}{\left(y + a \cdot b\right)} \]
              2. lower-+.f64N/A

                \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
              3. lower-*.f6450.1

                \[\leadsto z \cdot \left(y + a \cdot \color{blue}{b}\right) \]
            4. Applied rewrites50.1%

              \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]

            if -8.0000000000000003e-62 < z < 6.00000000000000033e-77

            1. Initial program 92.6%

              \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
            2. Taylor expanded in a around inf

              \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
              2. lower-+.f64N/A

                \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
              3. lower-*.f6450.8

                \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
            4. Applied rewrites50.8%

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

              \[\leadsto a \cdot t \]
            6. Step-by-step derivation
              1. Applied rewrites28.3%

                \[\leadsto a \cdot t \]
              2. Taylor expanded in z around 0

                \[\leadsto \color{blue}{x + a \cdot t} \]
              3. Step-by-step derivation
                1. lower-+.f64N/A

                  \[\leadsto x + \color{blue}{a \cdot t} \]
                2. lower-*.f6452.9

                  \[\leadsto x + a \cdot \color{blue}{t} \]
              4. Applied rewrites52.9%

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

              if 6.00000000000000033e-77 < z < 2.55e122

              1. Initial program 92.6%

                \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
              2. Step-by-step derivation
                1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
                15. associate-*l*N/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
                16. distribute-lft-outN/A

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

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

                  \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
                19. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                20. lower-*.f6495.9

                  \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
              3. Applied rewrites95.9%

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

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

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

                  \[\leadsto \color{blue}{\left(x + a \cdot \left(t + b \cdot z\right)\right)} + z \cdot y \]
                4. sum-to-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), \frac{a}{x}, 1\right), x, \color{blue}{y \cdot z}\right) \]
                17. lower-*.f6484.6

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

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

                \[\leadsto \color{blue}{x + y \cdot z} \]
              7. Step-by-step derivation
                1. lower-+.f64N/A

                  \[\leadsto x + \color{blue}{y \cdot z} \]
                2. lower-*.f6452.2

                  \[\leadsto x + y \cdot \color{blue}{z} \]
              8. Applied rewrites52.2%

                \[\leadsto \color{blue}{x + y \cdot z} \]
              9. Step-by-step derivation
                1. Applied rewrites52.2%

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

                if 2.55e122 < z

                1. Initial program 92.6%

                  \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                2. Taylor expanded in z around inf

                  \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto z \cdot \color{blue}{\left(y + a \cdot b\right)} \]
                  2. lower-+.f64N/A

                    \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
                  3. lower-*.f6450.1

                    \[\leadsto z \cdot \left(y + a \cdot \color{blue}{b}\right) \]
                4. Applied rewrites50.1%

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

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

                    \[\leadsto \left(y + a \cdot b\right) \cdot \color{blue}{z} \]
                  3. lower-*.f6450.1

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

                    \[\leadsto \left(y + a \cdot b\right) \cdot z \]
                  5. +-commutativeN/A

                    \[\leadsto \left(a \cdot b + y\right) \cdot z \]
                  6. lift-*.f64N/A

                    \[\leadsto \left(a \cdot b + y\right) \cdot z \]
                  7. lower-fma.f6450.1

                    \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot z \]
                6. Applied rewrites50.1%

                  \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot \color{blue}{z} \]
              10. Recombined 4 regimes into one program.
              11. Add Preprocessing

              Alternative 7: 72.4% accurate, 1.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(a, b, y\right) \cdot z\\ \mathbf{if}\;z \leq -8 \cdot 10^{-62}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+122}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b)
               :precision binary64
               (let* ((t_1 (* (fma a b y) z)))
                 (if (<= z -8e-62)
                   t_1
                   (if (<= z 6e-77) (+ x (* a t)) (if (<= z 2.55e+122) (fma y z x) t_1)))))
              double code(double x, double y, double z, double t, double a, double b) {
              	double t_1 = fma(a, b, y) * z;
              	double tmp;
              	if (z <= -8e-62) {
              		tmp = t_1;
              	} else if (z <= 6e-77) {
              		tmp = x + (a * t);
              	} else if (z <= 2.55e+122) {
              		tmp = fma(y, z, x);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              function code(x, y, z, t, a, b)
              	t_1 = Float64(fma(a, b, y) * z)
              	tmp = 0.0
              	if (z <= -8e-62)
              		tmp = t_1;
              	elseif (z <= 6e-77)
              		tmp = Float64(x + Float64(a * t));
              	elseif (z <= 2.55e+122)
              		tmp = fma(y, z, x);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a * b + y), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -8e-62], t$95$1, If[LessEqual[z, 6e-77], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e+122], N[(y * z + x), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := \mathsf{fma}\left(a, b, y\right) \cdot z\\
              \mathbf{if}\;z \leq -8 \cdot 10^{-62}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\
              \;\;\;\;x + a \cdot t\\
              
              \mathbf{elif}\;z \leq 2.55 \cdot 10^{+122}:\\
              \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < -8.0000000000000003e-62 or 2.55e122 < z

                1. Initial program 92.6%

                  \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                2. Taylor expanded in z around inf

                  \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto z \cdot \color{blue}{\left(y + a \cdot b\right)} \]
                  2. lower-+.f64N/A

                    \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
                  3. lower-*.f6450.1

                    \[\leadsto z \cdot \left(y + a \cdot \color{blue}{b}\right) \]
                4. Applied rewrites50.1%

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

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

                    \[\leadsto \left(y + a \cdot b\right) \cdot \color{blue}{z} \]
                  3. lower-*.f6450.1

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

                    \[\leadsto \left(y + a \cdot b\right) \cdot z \]
                  5. +-commutativeN/A

                    \[\leadsto \left(a \cdot b + y\right) \cdot z \]
                  6. lift-*.f64N/A

                    \[\leadsto \left(a \cdot b + y\right) \cdot z \]
                  7. lower-fma.f6450.1

                    \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot z \]
                6. Applied rewrites50.1%

                  \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot \color{blue}{z} \]

                if -8.0000000000000003e-62 < z < 6.00000000000000033e-77

                1. Initial program 92.6%

                  \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                2. Taylor expanded in a around inf

                  \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
                  2. lower-+.f64N/A

                    \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
                  3. lower-*.f6450.8

                    \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
                4. Applied rewrites50.8%

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

                  \[\leadsto a \cdot t \]
                6. Step-by-step derivation
                  1. Applied rewrites28.3%

                    \[\leadsto a \cdot t \]
                  2. Taylor expanded in z around 0

                    \[\leadsto \color{blue}{x + a \cdot t} \]
                  3. Step-by-step derivation
                    1. lower-+.f64N/A

                      \[\leadsto x + \color{blue}{a \cdot t} \]
                    2. lower-*.f6452.9

                      \[\leadsto x + a \cdot \color{blue}{t} \]
                  4. Applied rewrites52.9%

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

                  if 6.00000000000000033e-77 < z < 2.55e122

                  1. Initial program 92.6%

                    \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                  2. Step-by-step derivation
                    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
                    15. associate-*l*N/A

                      \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
                    16. distribute-lft-outN/A

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

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

                      \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
                    19. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                    20. lower-*.f6495.9

                      \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                  3. Applied rewrites95.9%

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

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

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

                      \[\leadsto \color{blue}{\left(x + a \cdot \left(t + b \cdot z\right)\right)} + z \cdot y \]
                    4. sum-to-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), \frac{a}{x}, 1\right), x, \color{blue}{y \cdot z}\right) \]
                    17. lower-*.f6484.6

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

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

                    \[\leadsto \color{blue}{x + y \cdot z} \]
                  7. Step-by-step derivation
                    1. lower-+.f64N/A

                      \[\leadsto x + \color{blue}{y \cdot z} \]
                    2. lower-*.f6452.2

                      \[\leadsto x + y \cdot \color{blue}{z} \]
                  8. Applied rewrites52.2%

                    \[\leadsto \color{blue}{x + y \cdot z} \]
                  9. Step-by-step derivation
                    1. Applied rewrites52.2%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} \]
                  10. Recombined 3 regimes into one program.
                  11. Add Preprocessing

                  Alternative 8: 63.1% accurate, 1.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.3 \cdot 10^{+271}:\\ \;\;\;\;z \cdot \left(a \cdot b\right)\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+105}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t a b)
                   :precision binary64
                   (if (<= z -6.3e+271)
                     (* z (* a b))
                     (if (<= z -8.5e+105)
                       (fma y z x)
                       (if (<= z 6e-77) (+ x (* a t)) (fma y z x)))))
                  double code(double x, double y, double z, double t, double a, double b) {
                  	double tmp;
                  	if (z <= -6.3e+271) {
                  		tmp = z * (a * b);
                  	} else if (z <= -8.5e+105) {
                  		tmp = fma(y, z, x);
                  	} else if (z <= 6e-77) {
                  		tmp = x + (a * t);
                  	} else {
                  		tmp = fma(y, z, x);
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t, a, b)
                  	tmp = 0.0
                  	if (z <= -6.3e+271)
                  		tmp = Float64(z * Float64(a * b));
                  	elseif (z <= -8.5e+105)
                  		tmp = fma(y, z, x);
                  	elseif (z <= 6e-77)
                  		tmp = Float64(x + Float64(a * t));
                  	else
                  		tmp = fma(y, z, x);
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.3e+271], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.5e+105], N[(y * z + x), $MachinePrecision], If[LessEqual[z, 6e-77], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(y * z + x), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \leq -6.3 \cdot 10^{+271}:\\
                  \;\;\;\;z \cdot \left(a \cdot b\right)\\
                  
                  \mathbf{elif}\;z \leq -8.5 \cdot 10^{+105}:\\
                  \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
                  
                  \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\
                  \;\;\;\;x + a \cdot t\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if z < -6.2999999999999999e271

                    1. Initial program 92.6%

                      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                    2. Taylor expanded in z around inf

                      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
                    3. Step-by-step derivation
                      1. lower-*.f64N/A

                        \[\leadsto z \cdot \color{blue}{\left(y + a \cdot b\right)} \]
                      2. lower-+.f64N/A

                        \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
                      3. lower-*.f6450.1

                        \[\leadsto z \cdot \left(y + a \cdot \color{blue}{b}\right) \]
                    4. Applied rewrites50.1%

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

                      \[\leadsto z \cdot \left(a \cdot \color{blue}{b}\right) \]
                    6. Step-by-step derivation
                      1. lower-*.f6426.9

                        \[\leadsto z \cdot \left(a \cdot b\right) \]
                    7. Applied rewrites26.9%

                      \[\leadsto z \cdot \left(a \cdot \color{blue}{b}\right) \]

                    if -6.2999999999999999e271 < z < -8.49999999999999986e105 or 6.00000000000000033e-77 < z

                    1. Initial program 92.6%

                      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                    2. Step-by-step derivation
                      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
                      15. associate-*l*N/A

                        \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
                      16. distribute-lft-outN/A

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

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

                        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
                      19. *-commutativeN/A

                        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                      20. lower-*.f6495.9

                        \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                    3. Applied rewrites95.9%

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

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

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

                        \[\leadsto \color{blue}{\left(x + a \cdot \left(t + b \cdot z\right)\right)} + z \cdot y \]
                      4. sum-to-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), \frac{a}{x}, 1\right), x, \color{blue}{y \cdot z}\right) \]
                      17. lower-*.f6484.6

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

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

                      \[\leadsto \color{blue}{x + y \cdot z} \]
                    7. Step-by-step derivation
                      1. lower-+.f64N/A

                        \[\leadsto x + \color{blue}{y \cdot z} \]
                      2. lower-*.f6452.2

                        \[\leadsto x + y \cdot \color{blue}{z} \]
                    8. Applied rewrites52.2%

                      \[\leadsto \color{blue}{x + y \cdot z} \]
                    9. Step-by-step derivation
                      1. Applied rewrites52.2%

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

                      if -8.49999999999999986e105 < z < 6.00000000000000033e-77

                      1. Initial program 92.6%

                        \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                      2. Taylor expanded in a around inf

                        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
                        2. lower-+.f64N/A

                          \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
                        3. lower-*.f6450.8

                          \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
                      4. Applied rewrites50.8%

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

                        \[\leadsto a \cdot t \]
                      6. Step-by-step derivation
                        1. Applied rewrites28.3%

                          \[\leadsto a \cdot t \]
                        2. Taylor expanded in z around 0

                          \[\leadsto \color{blue}{x + a \cdot t} \]
                        3. Step-by-step derivation
                          1. lower-+.f64N/A

                            \[\leadsto x + \color{blue}{a \cdot t} \]
                          2. lower-*.f6452.9

                            \[\leadsto x + a \cdot \color{blue}{t} \]
                        4. Applied rewrites52.9%

                          \[\leadsto \color{blue}{x + a \cdot t} \]
                      7. Recombined 3 regimes into one program.
                      8. Add Preprocessing

                      Alternative 9: 63.1% accurate, 1.2× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{+272}:\\ \;\;\;\;a \cdot \left(b \cdot z\right)\\ \mathbf{elif}\;z \leq -8.5 \cdot 10^{+105}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \end{array} \end{array} \]
                      (FPCore (x y z t a b)
                       :precision binary64
                       (if (<= z -3.5e+272)
                         (* a (* b z))
                         (if (<= z -8.5e+105)
                           (fma y z x)
                           (if (<= z 6e-77) (+ x (* a t)) (fma y z x)))))
                      double code(double x, double y, double z, double t, double a, double b) {
                      	double tmp;
                      	if (z <= -3.5e+272) {
                      		tmp = a * (b * z);
                      	} else if (z <= -8.5e+105) {
                      		tmp = fma(y, z, x);
                      	} else if (z <= 6e-77) {
                      		tmp = x + (a * t);
                      	} else {
                      		tmp = fma(y, z, x);
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a, b)
                      	tmp = 0.0
                      	if (z <= -3.5e+272)
                      		tmp = Float64(a * Float64(b * z));
                      	elseif (z <= -8.5e+105)
                      		tmp = fma(y, z, x);
                      	elseif (z <= 6e-77)
                      		tmp = Float64(x + Float64(a * t));
                      	else
                      		tmp = fma(y, z, x);
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.5e+272], N[(a * N[(b * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.5e+105], N[(y * z + x), $MachinePrecision], If[LessEqual[z, 6e-77], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(y * z + x), $MachinePrecision]]]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;z \leq -3.5 \cdot 10^{+272}:\\
                      \;\;\;\;a \cdot \left(b \cdot z\right)\\
                      
                      \mathbf{elif}\;z \leq -8.5 \cdot 10^{+105}:\\
                      \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
                      
                      \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\
                      \;\;\;\;x + a \cdot t\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if z < -3.50000000000000023e272

                        1. Initial program 92.6%

                          \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                        2. Taylor expanded in z around inf

                          \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
                        3. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto z \cdot \color{blue}{\left(y + a \cdot b\right)} \]
                          2. lower-+.f64N/A

                            \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
                          3. lower-*.f6450.1

                            \[\leadsto z \cdot \left(y + a \cdot \color{blue}{b}\right) \]
                        4. Applied rewrites50.1%

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

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

                            \[\leadsto \left(y + a \cdot b\right) \cdot \color{blue}{z} \]
                          3. lower-*.f6450.1

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

                            \[\leadsto \left(y + a \cdot b\right) \cdot z \]
                          5. +-commutativeN/A

                            \[\leadsto \left(a \cdot b + y\right) \cdot z \]
                          6. lift-*.f64N/A

                            \[\leadsto \left(a \cdot b + y\right) \cdot z \]
                          7. lower-fma.f6450.1

                            \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot z \]
                        6. Applied rewrites50.1%

                          \[\leadsto \mathsf{fma}\left(a, b, y\right) \cdot \color{blue}{z} \]
                        7. Taylor expanded in y around 0

                          \[\leadsto a \cdot \color{blue}{\left(b \cdot z\right)} \]
                        8. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto a \cdot \left(b \cdot \color{blue}{z}\right) \]
                          2. lower-*.f6427.0

                            \[\leadsto a \cdot \left(b \cdot z\right) \]
                        9. Applied rewrites27.0%

                          \[\leadsto a \cdot \color{blue}{\left(b \cdot z\right)} \]

                        if -3.50000000000000023e272 < z < -8.49999999999999986e105 or 6.00000000000000033e-77 < z

                        1. Initial program 92.6%

                          \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                        2. Step-by-step derivation
                          1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
                          15. associate-*l*N/A

                            \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
                          16. distribute-lft-outN/A

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

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

                            \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
                          19. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                          20. lower-*.f6495.9

                            \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                        3. Applied rewrites95.9%

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

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

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

                            \[\leadsto \color{blue}{\left(x + a \cdot \left(t + b \cdot z\right)\right)} + z \cdot y \]
                          4. sum-to-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), \frac{a}{x}, 1\right), x, \color{blue}{y \cdot z}\right) \]
                          17. lower-*.f6484.6

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

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

                          \[\leadsto \color{blue}{x + y \cdot z} \]
                        7. Step-by-step derivation
                          1. lower-+.f64N/A

                            \[\leadsto x + \color{blue}{y \cdot z} \]
                          2. lower-*.f6452.2

                            \[\leadsto x + y \cdot \color{blue}{z} \]
                        8. Applied rewrites52.2%

                          \[\leadsto \color{blue}{x + y \cdot z} \]
                        9. Step-by-step derivation
                          1. Applied rewrites52.2%

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

                          if -8.49999999999999986e105 < z < 6.00000000000000033e-77

                          1. Initial program 92.6%

                            \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                          2. Taylor expanded in a around inf

                            \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
                          3. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
                            2. lower-+.f64N/A

                              \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
                            3. lower-*.f6450.8

                              \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
                          4. Applied rewrites50.8%

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

                            \[\leadsto a \cdot t \]
                          6. Step-by-step derivation
                            1. Applied rewrites28.3%

                              \[\leadsto a \cdot t \]
                            2. Taylor expanded in z around 0

                              \[\leadsto \color{blue}{x + a \cdot t} \]
                            3. Step-by-step derivation
                              1. lower-+.f64N/A

                                \[\leadsto x + \color{blue}{a \cdot t} \]
                              2. lower-*.f6452.9

                                \[\leadsto x + a \cdot \color{blue}{t} \]
                            4. Applied rewrites52.9%

                              \[\leadsto \color{blue}{x + a \cdot t} \]
                          7. Recombined 3 regimes into one program.
                          8. Add Preprocessing

                          Alternative 10: 63.1% accurate, 1.5× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+105}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\ \;\;\;\;x + a \cdot t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b)
                           :precision binary64
                           (if (<= z -8.5e+105) (fma y z x) (if (<= z 6e-77) (+ x (* a t)) (fma y z x))))
                          double code(double x, double y, double z, double t, double a, double b) {
                          	double tmp;
                          	if (z <= -8.5e+105) {
                          		tmp = fma(y, z, x);
                          	} else if (z <= 6e-77) {
                          		tmp = x + (a * t);
                          	} else {
                          		tmp = fma(y, z, x);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a, b)
                          	tmp = 0.0
                          	if (z <= -8.5e+105)
                          		tmp = fma(y, z, x);
                          	elseif (z <= 6e-77)
                          		tmp = Float64(x + Float64(a * t));
                          	else
                          		tmp = fma(y, z, x);
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+105], N[(y * z + x), $MachinePrecision], If[LessEqual[z, 6e-77], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(y * z + x), $MachinePrecision]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;z \leq -8.5 \cdot 10^{+105}:\\
                          \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
                          
                          \mathbf{elif}\;z \leq 6 \cdot 10^{-77}:\\
                          \;\;\;\;x + a \cdot t\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if z < -8.49999999999999986e105 or 6.00000000000000033e-77 < z

                            1. Initial program 92.6%

                              \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                            2. Step-by-step derivation
                              1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
                              15. associate-*l*N/A

                                \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
                              16. distribute-lft-outN/A

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

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

                                \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
                              19. *-commutativeN/A

                                \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                              20. lower-*.f6495.9

                                \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                            3. Applied rewrites95.9%

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

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

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

                                \[\leadsto \color{blue}{\left(x + a \cdot \left(t + b \cdot z\right)\right)} + z \cdot y \]
                              4. sum-to-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), \frac{a}{x}, 1\right), x, \color{blue}{y \cdot z}\right) \]
                              17. lower-*.f6484.6

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

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

                              \[\leadsto \color{blue}{x + y \cdot z} \]
                            7. Step-by-step derivation
                              1. lower-+.f64N/A

                                \[\leadsto x + \color{blue}{y \cdot z} \]
                              2. lower-*.f6452.2

                                \[\leadsto x + y \cdot \color{blue}{z} \]
                            8. Applied rewrites52.2%

                              \[\leadsto \color{blue}{x + y \cdot z} \]
                            9. Step-by-step derivation
                              1. Applied rewrites52.2%

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

                              if -8.49999999999999986e105 < z < 6.00000000000000033e-77

                              1. Initial program 92.6%

                                \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                              2. Taylor expanded in a around inf

                                \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
                              3. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
                                2. lower-+.f64N/A

                                  \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
                                3. lower-*.f6450.8

                                  \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
                              4. Applied rewrites50.8%

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

                                \[\leadsto a \cdot t \]
                              6. Step-by-step derivation
                                1. Applied rewrites28.3%

                                  \[\leadsto a \cdot t \]
                                2. Taylor expanded in z around 0

                                  \[\leadsto \color{blue}{x + a \cdot t} \]
                                3. Step-by-step derivation
                                  1. lower-+.f64N/A

                                    \[\leadsto x + \color{blue}{a \cdot t} \]
                                  2. lower-*.f6452.9

                                    \[\leadsto x + a \cdot \color{blue}{t} \]
                                4. Applied rewrites52.9%

                                  \[\leadsto \color{blue}{x + a \cdot t} \]
                              7. Recombined 2 regimes into one program.
                              8. Add Preprocessing

                              Alternative 11: 58.9% accurate, 1.6× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -5.5 \cdot 10^{+107}:\\ \;\;\;\;a \cdot t\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{+178}:\\ \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\ \mathbf{else}:\\ \;\;\;\;a \cdot t\\ \end{array} \end{array} \]
                              (FPCore (x y z t a b)
                               :precision binary64
                               (if (<= a -5.5e+107) (* a t) (if (<= a 1.8e+178) (fma y z x) (* a t))))
                              double code(double x, double y, double z, double t, double a, double b) {
                              	double tmp;
                              	if (a <= -5.5e+107) {
                              		tmp = a * t;
                              	} else if (a <= 1.8e+178) {
                              		tmp = fma(y, z, x);
                              	} else {
                              		tmp = a * t;
                              	}
                              	return tmp;
                              }
                              
                              function code(x, y, z, t, a, b)
                              	tmp = 0.0
                              	if (a <= -5.5e+107)
                              		tmp = Float64(a * t);
                              	elseif (a <= 1.8e+178)
                              		tmp = fma(y, z, x);
                              	else
                              		tmp = Float64(a * t);
                              	end
                              	return tmp
                              end
                              
                              code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.5e+107], N[(a * t), $MachinePrecision], If[LessEqual[a, 1.8e+178], N[(y * z + x), $MachinePrecision], N[(a * t), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;a \leq -5.5 \cdot 10^{+107}:\\
                              \;\;\;\;a \cdot t\\
                              
                              \mathbf{elif}\;a \leq 1.8 \cdot 10^{+178}:\\
                              \;\;\;\;\mathsf{fma}\left(y, z, x\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;a \cdot t\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if a < -5.5000000000000003e107 or 1.7999999999999999e178 < a

                                1. Initial program 92.6%

                                  \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                                2. Taylor expanded in a around inf

                                  \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
                                3. Step-by-step derivation
                                  1. lower-*.f64N/A

                                    \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
                                  2. lower-+.f64N/A

                                    \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
                                  3. lower-*.f6450.8

                                    \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
                                4. Applied rewrites50.8%

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

                                  \[\leadsto a \cdot t \]
                                6. Step-by-step derivation
                                  1. Applied rewrites28.3%

                                    \[\leadsto a \cdot t \]

                                  if -5.5000000000000003e107 < a < 1.7999999999999999e178

                                  1. Initial program 92.6%

                                    \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                                  2. Step-by-step derivation
                                    1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{\left(a \cdot z\right)} \cdot b\right)\right) \]
                                    15. associate-*l*N/A

                                      \[\leadsto \mathsf{fma}\left(z, y, x + \left(a \cdot t + \color{blue}{a \cdot \left(z \cdot b\right)}\right)\right) \]
                                    16. distribute-lft-outN/A

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

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

                                      \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \color{blue}{\left(t + z \cdot b\right)}\right) \]
                                    19. *-commutativeN/A

                                      \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                                    20. lower-*.f6495.9

                                      \[\leadsto \mathsf{fma}\left(z, y, x + a \cdot \left(t + \color{blue}{b \cdot z}\right)\right) \]
                                  3. Applied rewrites95.9%

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

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

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

                                      \[\leadsto \color{blue}{\left(x + a \cdot \left(t + b \cdot z\right)\right)} + z \cdot y \]
                                    4. sum-to-multN/A

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(b, z, t\right), \frac{a}{x}, 1\right), x, \color{blue}{y \cdot z}\right) \]
                                    17. lower-*.f6484.6

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

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

                                    \[\leadsto \color{blue}{x + y \cdot z} \]
                                  7. Step-by-step derivation
                                    1. lower-+.f64N/A

                                      \[\leadsto x + \color{blue}{y \cdot z} \]
                                    2. lower-*.f6452.2

                                      \[\leadsto x + y \cdot \color{blue}{z} \]
                                  8. Applied rewrites52.2%

                                    \[\leadsto \color{blue}{x + y \cdot z} \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites52.2%

                                      \[\leadsto \color{blue}{\mathsf{fma}\left(y, z, x\right)} \]
                                  10. Recombined 2 regimes into one program.
                                  11. Add Preprocessing

                                  Alternative 12: 38.5% accurate, 1.8× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -8.5 \cdot 10^{+105}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{-79}:\\ \;\;\;\;a \cdot t\\ \mathbf{else}:\\ \;\;\;\;z \cdot y\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a b)
                                   :precision binary64
                                   (if (<= z -8.5e+105) (* z y) (if (<= z 6.5e-79) (* a t) (* z y))))
                                  double code(double x, double y, double z, double t, double a, double b) {
                                  	double tmp;
                                  	if (z <= -8.5e+105) {
                                  		tmp = z * y;
                                  	} else if (z <= 6.5e-79) {
                                  		tmp = a * t;
                                  	} else {
                                  		tmp = z * y;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  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, b)
                                  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
                                      real(8), intent (in) :: b
                                      real(8) :: tmp
                                      if (z <= (-8.5d+105)) then
                                          tmp = z * y
                                      else if (z <= 6.5d-79) then
                                          tmp = a * t
                                      else
                                          tmp = z * y
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a, double b) {
                                  	double tmp;
                                  	if (z <= -8.5e+105) {
                                  		tmp = z * y;
                                  	} else if (z <= 6.5e-79) {
                                  		tmp = a * t;
                                  	} else {
                                  		tmp = z * y;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a, b):
                                  	tmp = 0
                                  	if z <= -8.5e+105:
                                  		tmp = z * y
                                  	elif z <= 6.5e-79:
                                  		tmp = a * t
                                  	else:
                                  		tmp = z * y
                                  	return tmp
                                  
                                  function code(x, y, z, t, a, b)
                                  	tmp = 0.0
                                  	if (z <= -8.5e+105)
                                  		tmp = Float64(z * y);
                                  	elseif (z <= 6.5e-79)
                                  		tmp = Float64(a * t);
                                  	else
                                  		tmp = Float64(z * y);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a, b)
                                  	tmp = 0.0;
                                  	if (z <= -8.5e+105)
                                  		tmp = z * y;
                                  	elseif (z <= 6.5e-79)
                                  		tmp = a * t;
                                  	else
                                  		tmp = z * y;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+105], N[(z * y), $MachinePrecision], If[LessEqual[z, 6.5e-79], N[(a * t), $MachinePrecision], N[(z * y), $MachinePrecision]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  \mathbf{if}\;z \leq -8.5 \cdot 10^{+105}:\\
                                  \;\;\;\;z \cdot y\\
                                  
                                  \mathbf{elif}\;z \leq 6.5 \cdot 10^{-79}:\\
                                  \;\;\;\;a \cdot t\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;z \cdot y\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if z < -8.49999999999999986e105 or 6.5000000000000003e-79 < z

                                    1. Initial program 92.6%

                                      \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                                    2. Taylor expanded in z around inf

                                      \[\leadsto \color{blue}{z \cdot \left(y + a \cdot b\right)} \]
                                    3. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto z \cdot \color{blue}{\left(y + a \cdot b\right)} \]
                                      2. lower-+.f64N/A

                                        \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
                                      3. lower-*.f6450.1

                                        \[\leadsto z \cdot \left(y + a \cdot \color{blue}{b}\right) \]
                                    4. Applied rewrites50.1%

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

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

                                        \[\leadsto z \cdot \left(y + \color{blue}{a \cdot b}\right) \]
                                      3. sum-to-multN/A

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

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

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

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

                                        \[\leadsto \left(z \cdot \left(\frac{a \cdot b}{y} + 1\right)\right) \cdot y \]
                                      8. lift-*.f64N/A

                                        \[\leadsto \left(z \cdot \left(\frac{a \cdot b}{y} + 1\right)\right) \cdot y \]
                                      9. associate-/l*N/A

                                        \[\leadsto \left(z \cdot \left(a \cdot \frac{b}{y} + 1\right)\right) \cdot y \]
                                      10. lower-fma.f64N/A

                                        \[\leadsto \left(z \cdot \mathsf{fma}\left(a, \frac{b}{y}, 1\right)\right) \cdot y \]
                                      11. lower-/.f6446.5

                                        \[\leadsto \left(z \cdot \mathsf{fma}\left(a, \frac{b}{y}, 1\right)\right) \cdot y \]
                                    6. Applied rewrites46.5%

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

                                      \[\leadsto z \cdot y \]
                                    8. Step-by-step derivation
                                      1. Applied rewrites27.6%

                                        \[\leadsto z \cdot y \]

                                      if -8.49999999999999986e105 < z < 6.5000000000000003e-79

                                      1. Initial program 92.6%

                                        \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                                      2. Taylor expanded in a around inf

                                        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
                                      3. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
                                        2. lower-+.f64N/A

                                          \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
                                        3. lower-*.f6450.8

                                          \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
                                      4. Applied rewrites50.8%

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

                                        \[\leadsto a \cdot t \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites28.3%

                                          \[\leadsto a \cdot t \]
                                      7. Recombined 2 regimes into one program.
                                      8. Add Preprocessing

                                      Alternative 13: 28.3% accurate, 5.3× speedup?

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

                                        \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b \]
                                      2. Taylor expanded in a around inf

                                        \[\leadsto \color{blue}{a \cdot \left(t + b \cdot z\right)} \]
                                      3. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto a \cdot \color{blue}{\left(t + b \cdot z\right)} \]
                                        2. lower-+.f64N/A

                                          \[\leadsto a \cdot \left(t + \color{blue}{b \cdot z}\right) \]
                                        3. lower-*.f6450.8

                                          \[\leadsto a \cdot \left(t + b \cdot \color{blue}{z}\right) \]
                                      4. Applied rewrites50.8%

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

                                        \[\leadsto a \cdot t \]
                                      6. Step-by-step derivation
                                        1. Applied rewrites28.3%

                                          \[\leadsto a \cdot t \]
                                        2. Add Preprocessing

                                        Reproduce

                                        ?
                                        herbie shell --seed 2025156 
                                        (FPCore (x y z t a b)
                                          :name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
                                          :precision binary64
                                          (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))