Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A

Percentage Accurate: 90.0% → 96.8%
Time: 10.5s
Alternatives: 16
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 96.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \leq \infty:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-i\right) \cdot c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(-z\right) \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(b, c, a\right) \cdot i}{z}, c, -t\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c i)
 :precision binary64
 (if (<= (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))) INFINITY)
   (* 2.0 (fma (fma c b a) (* (- i) c) (fma t z (* y x))))
   (* 2.0 (* (- z) (fma (/ (* (fma b c a) i) z) c (- t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
	double tmp;
	if ((2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))) <= ((double) INFINITY)) {
		tmp = 2.0 * fma(fma(c, b, a), (-i * c), fma(t, z, (y * x)));
	} else {
		tmp = 2.0 * (-z * fma(((fma(b, c, a) * i) / z), c, -t));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c, i)
	tmp = 0.0
	if (Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) <= Inf)
		tmp = Float64(2.0 * fma(fma(c, b, a), Float64(Float64(-i) * c), fma(t, z, Float64(y * x))));
	else
		tmp = Float64(2.0 * Float64(Float64(-z) * fma(Float64(Float64(fma(b, c, a) * i) / z), c, Float64(-t))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(c * b + a), $MachinePrecision] * N[((-i) * c), $MachinePrecision] + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[((-z) * N[(N[(N[(N[(b * c + a), $MachinePrecision] * i), $MachinePrecision] / z), $MachinePrecision] * c + (-t)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \leq \infty:\\
\;\;\;\;2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-i\right) \cdot c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\

\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\left(-z\right) \cdot \mathsf{fma}\left(\frac{\mathsf{fma}\left(b, c, a\right) \cdot i}{z}, c, -t\right)\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 #s(literal 2 binary64) (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i))) < +inf.0

    1. Initial program 96.0%

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
      8. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -\color{blue}{i \cdot c}, x \cdot y + z \cdot t\right) \]
      17. lower-*.f6499.1

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \color{blue}{t \cdot z} + x \cdot y\right) \]
      22. lower-fma.f6499.1

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
      25. lower-*.f6499.1

        \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
    4. Applied rewrites99.1%

      \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]

    if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)))

    1. Initial program 0.0%

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
      2. mul-1-negN/A

        \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
      3. associate-*r*N/A

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

        \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
      5. mul-1-negN/A

        \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
      6. *-commutativeN/A

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
      7. associate-*l*N/A

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
      8. *-commutativeN/A

        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
      9. distribute-lft-neg-inN/A

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

        \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
      11. lower-neg.f64N/A

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

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

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

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

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

        \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
      17. lower-*.f6414.3

        \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
    5. Applied rewrites14.3%

      \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
    6. Taylor expanded in z around -inf

      \[\leadsto 2 \cdot \left(-1 \cdot \color{blue}{\left(z \cdot \left(-1 \cdot t + \frac{c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)}{z}\right)\right)}\right) \]
    7. Step-by-step derivation
      1. Applied rewrites64.3%

        \[\leadsto 2 \cdot \left(\left(-z\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{\mathsf{fma}\left(b, c, a\right) \cdot i}{z}, c, -t\right)}\right) \]
    8. Recombined 2 regimes into one program.
    9. Final simplification97.2%

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

    Alternative 2: 57.9% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ t_2 := \left(a + b \cdot c\right) \cdot c\\ t_3 := 2 \cdot \left(y \cdot x\right)\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-24}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-257}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-160}:\\ \;\;\;\;t \cdot \left(z + z\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+88}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c i)
     :precision binary64
     (let* ((t_1 (* (* -2.0 (* (fma c b a) i)) c))
            (t_2 (* (+ a (* b c)) c))
            (t_3 (* 2.0 (* y x))))
       (if (<= t_2 -5e-24)
         t_1
         (if (<= t_2 -2e-257)
           t_3
           (if (<= t_2 1e-160) (* t (+ z z)) (if (<= t_2 5e+88) t_3 t_1))))))
    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
    	double t_1 = (-2.0 * (fma(c, b, a) * i)) * c;
    	double t_2 = (a + (b * c)) * c;
    	double t_3 = 2.0 * (y * x);
    	double tmp;
    	if (t_2 <= -5e-24) {
    		tmp = t_1;
    	} else if (t_2 <= -2e-257) {
    		tmp = t_3;
    	} else if (t_2 <= 1e-160) {
    		tmp = t * (z + z);
    	} else if (t_2 <= 5e+88) {
    		tmp = t_3;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c, i)
    	t_1 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c)
    	t_2 = Float64(Float64(a + Float64(b * c)) * c)
    	t_3 = Float64(2.0 * Float64(y * x))
    	tmp = 0.0
    	if (t_2 <= -5e-24)
    		tmp = t_1;
    	elseif (t_2 <= -2e-257)
    		tmp = t_3;
    	elseif (t_2 <= 1e-160)
    		tmp = Float64(t * Float64(z + z));
    	elseif (t_2 <= 5e+88)
    		tmp = t_3;
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-24], t$95$1, If[LessEqual[t$95$2, -2e-257], t$95$3, If[LessEqual[t$95$2, 1e-160], N[(t * N[(z + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+88], t$95$3, t$95$1]]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
    t_2 := \left(a + b \cdot c\right) \cdot c\\
    t_3 := 2 \cdot \left(y \cdot x\right)\\
    \mathbf{if}\;t\_2 \leq -5 \cdot 10^{-24}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-257}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 10^{-160}:\\
    \;\;\;\;t \cdot \left(z + z\right)\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+88}:\\
    \;\;\;\;t\_3\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 (+.f64 a (*.f64 b c)) c) < -4.9999999999999998e-24 or 4.99999999999999997e88 < (*.f64 (+.f64 a (*.f64 b c)) c)

      1. Initial program 84.0%

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

        \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
        2. associate-*r*N/A

          \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
        3. distribute-rgt-inN/A

          \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
        4. associate-*r*N/A

          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
        5. distribute-lft-outN/A

          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
        6. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
        7. distribute-lft-outN/A

          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
        8. associate-*r*N/A

          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
        9. distribute-rgt-inN/A

          \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
        10. lower-*.f64N/A

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

          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
        12. lower-*.f64N/A

          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
        13. +-commutativeN/A

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

          \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
        15. lower-fma.f6471.3

          \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
      5. Applied rewrites71.3%

        \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]

      if -4.9999999999999998e-24 < (*.f64 (+.f64 a (*.f64 b c)) c) < -2e-257 or 9.9999999999999999e-161 < (*.f64 (+.f64 a (*.f64 b c)) c) < 4.99999999999999997e88

      1. Initial program 98.7%

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

        \[\leadsto \color{blue}{2 \cdot \left(x \cdot y\right)} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

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

          \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
        3. lower-*.f6456.2

          \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
      5. Applied rewrites56.2%

        \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]

      if -2e-257 < (*.f64 (+.f64 a (*.f64 b c)) c) < 9.9999999999999999e-161

      1. Initial program 100.0%

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

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

          \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
        2. lower-*.f6466.5

          \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
      5. Applied rewrites66.5%

        \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
      6. Step-by-step derivation
        1. Applied rewrites66.5%

          \[\leadsto t \cdot \color{blue}{\left(z + z\right)} \]
      7. Recombined 3 regimes into one program.
      8. Add Preprocessing

      Alternative 3: 63.5% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+256}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-269}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+22}:\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c i)
       :precision binary64
       (let* ((t_1 (* (* -2.0 (* (fma c b a) i)) c)) (t_2 (* (* (+ a (* b c)) c) i)))
         (if (<= t_2 -5e+256)
           t_1
           (if (<= t_2 1e-269)
             (* 2.0 (fma (- i) (* a c) (* t z)))
             (if (<= t_2 2e+22) (* 2.0 (* y x)) t_1)))))
      double code(double x, double y, double z, double t, double a, double b, double c, double i) {
      	double t_1 = (-2.0 * (fma(c, b, a) * i)) * c;
      	double t_2 = ((a + (b * c)) * c) * i;
      	double tmp;
      	if (t_2 <= -5e+256) {
      		tmp = t_1;
      	} else if (t_2 <= 1e-269) {
      		tmp = 2.0 * fma(-i, (a * c), (t * z));
      	} else if (t_2 <= 2e+22) {
      		tmp = 2.0 * (y * x);
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a, b, c, i)
      	t_1 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c)
      	t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i)
      	tmp = 0.0
      	if (t_2 <= -5e+256)
      		tmp = t_1;
      	elseif (t_2 <= 1e-269)
      		tmp = Float64(2.0 * fma(Float64(-i), Float64(a * c), Float64(t * z)));
      	elseif (t_2 <= 2e+22)
      		tmp = Float64(2.0 * Float64(y * x));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+256], t$95$1, If[LessEqual[t$95$2, 1e-269], N[(2.0 * N[((-i) * N[(a * c), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+22], N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
      t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
      \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+256}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 10^{-269}:\\
      \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\
      
      \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+22}:\\
      \;\;\;\;2 \cdot \left(y \cdot x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.00000000000000015e256 or 2e22 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

        1. Initial program 78.9%

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

          \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
          2. associate-*r*N/A

            \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
          3. distribute-rgt-inN/A

            \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
          4. associate-*r*N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
          5. distribute-lft-outN/A

            \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
          6. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
          7. distribute-lft-outN/A

            \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
          8. associate-*r*N/A

            \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
          9. distribute-rgt-inN/A

            \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
          10. lower-*.f64N/A

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

            \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
          12. lower-*.f64N/A

            \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
          13. +-commutativeN/A

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

            \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
          15. lower-fma.f6481.6

            \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
        5. Applied rewrites81.6%

          \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]

        if -5.00000000000000015e256 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999996e-270

        1. Initial program 99.9%

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

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

            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
          2. mul-1-negN/A

            \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
          3. associate-*r*N/A

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

            \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
          5. mul-1-negN/A

            \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
          6. *-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
          7. associate-*l*N/A

            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
          8. *-commutativeN/A

            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
          9. distribute-lft-neg-inN/A

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

            \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
          11. lower-neg.f64N/A

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

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

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

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

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

            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
          17. lower-*.f6464.8

            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
        5. Applied rewrites64.8%

          \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
        6. Taylor expanded in a around inf

          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]
        7. Step-by-step derivation
          1. Applied rewrites56.0%

            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]

          if 9.9999999999999996e-270 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 2e22

          1. Initial program 99.9%

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

            \[\leadsto \color{blue}{2 \cdot \left(x \cdot y\right)} \]
          4. Step-by-step derivation
            1. lower-*.f64N/A

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

              \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
            3. lower-*.f6463.1

              \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
          5. Applied rewrites63.1%

            \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
        8. Recombined 3 regimes into one program.
        9. Add Preprocessing

        Alternative 4: 51.3% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+222}:\\ \;\;\;\;\left(c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right) \cdot -2\\ \mathbf{elif}\;t\_1 \leq 10^{-269}:\\ \;\;\;\;t \cdot \left(z + z\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+90}:\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(c \cdot b\right) \cdot i\right) \cdot c\right) \cdot -2\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c i)
         :precision binary64
         (let* ((t_1 (* (* (+ a (* b c)) c) i)))
           (if (<= t_1 -5e+222)
             (* (* c (* c (* i b))) -2.0)
             (if (<= t_1 1e-269)
               (* t (+ z z))
               (if (<= t_1 5e+90) (* 2.0 (* y x)) (* (* (* (* c b) i) c) -2.0))))))
        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = ((a + (b * c)) * c) * i;
        	double tmp;
        	if (t_1 <= -5e+222) {
        		tmp = (c * (c * (i * b))) * -2.0;
        	} else if (t_1 <= 1e-269) {
        		tmp = t * (z + z);
        	} else if (t_1 <= 5e+90) {
        		tmp = 2.0 * (y * x);
        	} else {
        		tmp = (((c * b) * i) * c) * -2.0;
        	}
        	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, c, i)
        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), intent (in) :: c
            real(8), intent (in) :: i
            real(8) :: t_1
            real(8) :: tmp
            t_1 = ((a + (b * c)) * c) * i
            if (t_1 <= (-5d+222)) then
                tmp = (c * (c * (i * b))) * (-2.0d0)
            else if (t_1 <= 1d-269) then
                tmp = t * (z + z)
            else if (t_1 <= 5d+90) then
                tmp = 2.0d0 * (y * x)
            else
                tmp = (((c * b) * i) * c) * (-2.0d0)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
        	double t_1 = ((a + (b * c)) * c) * i;
        	double tmp;
        	if (t_1 <= -5e+222) {
        		tmp = (c * (c * (i * b))) * -2.0;
        	} else if (t_1 <= 1e-269) {
        		tmp = t * (z + z);
        	} else if (t_1 <= 5e+90) {
        		tmp = 2.0 * (y * x);
        	} else {
        		tmp = (((c * b) * i) * c) * -2.0;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b, c, i):
        	t_1 = ((a + (b * c)) * c) * i
        	tmp = 0
        	if t_1 <= -5e+222:
        		tmp = (c * (c * (i * b))) * -2.0
        	elif t_1 <= 1e-269:
        		tmp = t * (z + z)
        	elif t_1 <= 5e+90:
        		tmp = 2.0 * (y * x)
        	else:
        		tmp = (((c * b) * i) * c) * -2.0
        	return tmp
        
        function code(x, y, z, t, a, b, c, i)
        	t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i)
        	tmp = 0.0
        	if (t_1 <= -5e+222)
        		tmp = Float64(Float64(c * Float64(c * Float64(i * b))) * -2.0);
        	elseif (t_1 <= 1e-269)
        		tmp = Float64(t * Float64(z + z));
        	elseif (t_1 <= 5e+90)
        		tmp = Float64(2.0 * Float64(y * x));
        	else
        		tmp = Float64(Float64(Float64(Float64(c * b) * i) * c) * -2.0);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b, c, i)
        	t_1 = ((a + (b * c)) * c) * i;
        	tmp = 0.0;
        	if (t_1 <= -5e+222)
        		tmp = (c * (c * (i * b))) * -2.0;
        	elseif (t_1 <= 1e-269)
        		tmp = t * (z + z);
        	elseif (t_1 <= 5e+90)
        		tmp = 2.0 * (y * x);
        	else
        		tmp = (((c * b) * i) * c) * -2.0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+222], N[(N[(c * N[(c * N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision], If[LessEqual[t$95$1, 1e-269], N[(t * N[(z + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+90], N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(c * b), $MachinePrecision] * i), $MachinePrecision] * c), $MachinePrecision] * -2.0), $MachinePrecision]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
        \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+222}:\\
        \;\;\;\;\left(c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right) \cdot -2\\
        
        \mathbf{elif}\;t\_1 \leq 10^{-269}:\\
        \;\;\;\;t \cdot \left(z + z\right)\\
        
        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+90}:\\
        \;\;\;\;2 \cdot \left(y \cdot x\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\left(\left(c \cdot b\right) \cdot i\right) \cdot c\right) \cdot -2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.00000000000000023e222

          1. Initial program 73.7%

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

            \[\leadsto \color{blue}{-2 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
            3. *-commutativeN/A

              \[\leadsto \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \cdot -2 \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \cdot -2 \]
            5. lower-*.f64N/A

              \[\leadsto \left(\color{blue}{\left({c}^{2} \cdot i\right)} \cdot b\right) \cdot -2 \]
            6. unpow2N/A

              \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot b\right) \cdot -2 \]
            7. lower-*.f6472.1

              \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot b\right) \cdot -2 \]
          5. Applied rewrites72.1%

            \[\leadsto \color{blue}{\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2} \]
          6. Step-by-step derivation
            1. Applied rewrites74.5%

              \[\leadsto \left(c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right) \cdot -2 \]

            if -5.00000000000000023e222 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999996e-270

            1. Initial program 99.9%

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

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

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

                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
            5. Applied rewrites47.0%

              \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites47.0%

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

              if 9.9999999999999996e-270 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000004e90

              1. Initial program 99.9%

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

                \[\leadsto \color{blue}{2 \cdot \left(x \cdot y\right)} \]
              4. Step-by-step derivation
                1. lower-*.f64N/A

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

                  \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                3. lower-*.f6458.9

                  \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
              5. Applied rewrites58.9%

                \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]

              if 5.0000000000000004e90 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

              1. Initial program 83.6%

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

                \[\leadsto \color{blue}{-2 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
                2. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
                3. *-commutativeN/A

                  \[\leadsto \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \cdot -2 \]
                4. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \cdot -2 \]
                5. lower-*.f64N/A

                  \[\leadsto \left(\color{blue}{\left({c}^{2} \cdot i\right)} \cdot b\right) \cdot -2 \]
                6. unpow2N/A

                  \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot b\right) \cdot -2 \]
                7. lower-*.f6450.2

                  \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot b\right) \cdot -2 \]
              5. Applied rewrites50.2%

                \[\leadsto \color{blue}{\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2} \]
              6. Step-by-step derivation
                1. Applied rewrites57.3%

                  \[\leadsto \left(\left(b \cdot c\right) \cdot \left(i \cdot c\right)\right) \cdot -2 \]
                2. Step-by-step derivation
                  1. Applied rewrites59.0%

                    \[\leadsto \left(\left(\left(c \cdot b\right) \cdot i\right) \cdot c\right) \cdot -2 \]
                3. Recombined 4 regimes into one program.
                4. Add Preprocessing

                Alternative 5: 51.4% accurate, 0.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right) \cdot -2\\ t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+222}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{-269}:\\ \;\;\;\;t \cdot \left(z + z\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+90}:\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c i)
                 :precision binary64
                 (let* ((t_1 (* (* c (* c (* i b))) -2.0)) (t_2 (* (* (+ a (* b c)) c) i)))
                   (if (<= t_2 -5e+222)
                     t_1
                     (if (<= t_2 1e-269)
                       (* t (+ z z))
                       (if (<= t_2 5e+90) (* 2.0 (* y x)) t_1)))))
                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (c * (c * (i * b))) * -2.0;
                	double t_2 = ((a + (b * c)) * c) * i;
                	double tmp;
                	if (t_2 <= -5e+222) {
                		tmp = t_1;
                	} else if (t_2 <= 1e-269) {
                		tmp = t * (z + z);
                	} else if (t_2 <= 5e+90) {
                		tmp = 2.0 * (y * x);
                	} else {
                		tmp = t_1;
                	}
                	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, c, i)
                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), intent (in) :: c
                    real(8), intent (in) :: i
                    real(8) :: t_1
                    real(8) :: t_2
                    real(8) :: tmp
                    t_1 = (c * (c * (i * b))) * (-2.0d0)
                    t_2 = ((a + (b * c)) * c) * i
                    if (t_2 <= (-5d+222)) then
                        tmp = t_1
                    else if (t_2 <= 1d-269) then
                        tmp = t * (z + z)
                    else if (t_2 <= 5d+90) then
                        tmp = 2.0d0 * (y * x)
                    else
                        tmp = t_1
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                	double t_1 = (c * (c * (i * b))) * -2.0;
                	double t_2 = ((a + (b * c)) * c) * i;
                	double tmp;
                	if (t_2 <= -5e+222) {
                		tmp = t_1;
                	} else if (t_2 <= 1e-269) {
                		tmp = t * (z + z);
                	} else if (t_2 <= 5e+90) {
                		tmp = 2.0 * (y * x);
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c, i):
                	t_1 = (c * (c * (i * b))) * -2.0
                	t_2 = ((a + (b * c)) * c) * i
                	tmp = 0
                	if t_2 <= -5e+222:
                		tmp = t_1
                	elif t_2 <= 1e-269:
                		tmp = t * (z + z)
                	elif t_2 <= 5e+90:
                		tmp = 2.0 * (y * x)
                	else:
                		tmp = t_1
                	return tmp
                
                function code(x, y, z, t, a, b, c, i)
                	t_1 = Float64(Float64(c * Float64(c * Float64(i * b))) * -2.0)
                	t_2 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i)
                	tmp = 0.0
                	if (t_2 <= -5e+222)
                		tmp = t_1;
                	elseif (t_2 <= 1e-269)
                		tmp = Float64(t * Float64(z + z));
                	elseif (t_2 <= 5e+90)
                		tmp = Float64(2.0 * Float64(y * x));
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c, i)
                	t_1 = (c * (c * (i * b))) * -2.0;
                	t_2 = ((a + (b * c)) * c) * i;
                	tmp = 0.0;
                	if (t_2 <= -5e+222)
                		tmp = t_1;
                	elseif (t_2 <= 1e-269)
                		tmp = t * (z + z);
                	elseif (t_2 <= 5e+90)
                		tmp = 2.0 * (y * x);
                	else
                		tmp = t_1;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * N[(c * N[(i * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+222], t$95$1, If[LessEqual[t$95$2, 1e-269], N[(t * N[(z + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+90], N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right) \cdot -2\\
                t_2 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
                \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+222}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;t\_2 \leq 10^{-269}:\\
                \;\;\;\;t \cdot \left(z + z\right)\\
                
                \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+90}:\\
                \;\;\;\;2 \cdot \left(y \cdot x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -5.00000000000000023e222 or 5.0000000000000004e90 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                  1. Initial program 78.5%

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

                    \[\leadsto \color{blue}{-2 \cdot \left(b \cdot \left({c}^{2} \cdot i\right)\right)} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(b \cdot \left({c}^{2} \cdot i\right)\right) \cdot -2} \]
                    3. *-commutativeN/A

                      \[\leadsto \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \cdot -2 \]
                    4. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(\left({c}^{2} \cdot i\right) \cdot b\right)} \cdot -2 \]
                    5. lower-*.f64N/A

                      \[\leadsto \left(\color{blue}{\left({c}^{2} \cdot i\right)} \cdot b\right) \cdot -2 \]
                    6. unpow2N/A

                      \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot b\right) \cdot -2 \]
                    7. lower-*.f6461.5

                      \[\leadsto \left(\left(\color{blue}{\left(c \cdot c\right)} \cdot i\right) \cdot b\right) \cdot -2 \]
                  5. Applied rewrites61.5%

                    \[\leadsto \color{blue}{\left(\left(\left(c \cdot c\right) \cdot i\right) \cdot b\right) \cdot -2} \]
                  6. Step-by-step derivation
                    1. Applied rewrites66.5%

                      \[\leadsto \left(c \cdot \left(c \cdot \left(i \cdot b\right)\right)\right) \cdot -2 \]

                    if -5.00000000000000023e222 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 9.9999999999999996e-270

                    1. Initial program 99.9%

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

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

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

                        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                    5. Applied rewrites47.0%

                      \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                    6. Step-by-step derivation
                      1. Applied rewrites47.0%

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

                      if 9.9999999999999996e-270 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 5.0000000000000004e90

                      1. Initial program 99.9%

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

                        \[\leadsto \color{blue}{2 \cdot \left(x \cdot y\right)} \]
                      4. Step-by-step derivation
                        1. lower-*.f64N/A

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

                          \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                        3. lower-*.f6458.9

                          \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                      5. Applied rewrites58.9%

                        \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]
                    7. Recombined 3 regimes into one program.
                    8. Add Preprocessing

                    Alternative 6: 94.9% accurate, 0.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+305}\right):\\ \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(y, x, t \cdot z - i \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot c\right)\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1 (* (* (+ a (* b c)) c) i)))
                       (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+305)))
                         (* (* -2.0 (* (fma c b a) i)) c)
                         (* 2.0 (fma y x (- (* t z) (* i (* (fma c b a) c))))))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = ((a + (b * c)) * c) * i;
                    	double tmp;
                    	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+305)) {
                    		tmp = (-2.0 * (fma(c, b, a) * i)) * c;
                    	} else {
                    		tmp = 2.0 * fma(y, x, ((t * z) - (i * (fma(c, b, a) * c))));
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i)
                    	tmp = 0.0
                    	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+305))
                    		tmp = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c);
                    	else
                    		tmp = Float64(2.0 * fma(y, x, Float64(Float64(t * z) - Float64(i * Float64(fma(c, b, a) * c)))));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+305]], $MachinePrecision]], N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], N[(2.0 * N[(y * x + N[(N[(t * z), $MachinePrecision] - N[(i * N[(N[(c * b + a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
                    \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+305}\right):\\
                    \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;2 \cdot \mathsf{fma}\left(y, x, t \cdot z - i \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot c\right)\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0 or 1.9999999999999999e305 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                      1. Initial program 72.5%

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

                        \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                        2. associate-*r*N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                        3. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        4. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                        5. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        6. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
                        7. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        8. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
                        9. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
                        10. lower-*.f64N/A

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

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        12. lower-*.f64N/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        13. +-commutativeN/A

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

                          \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
                        15. lower-fma.f6489.6

                          \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
                      5. Applied rewrites89.6%

                        \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]

                      if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.9999999999999999e305

                      1. Initial program 99.9%

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(y, x, z \cdot t - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right)} \]
                        7. lower--.f6499.9

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(y, x, t \cdot z - i \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot c\right)\right) \]
                        18. lower-fma.f6499.9

                          \[\leadsto 2 \cdot \mathsf{fma}\left(y, x, t \cdot z - i \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c\right)\right) \]
                      4. Applied rewrites99.9%

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

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

                    Alternative 7: 96.0% accurate, 0.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \leq \infty:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-i\right) \cdot c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (if (<= (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))) INFINITY)
                       (* 2.0 (fma (fma c b a) (* (- i) c) (fma t z (* y x))))
                       (* (* -2.0 (* (fma c b a) i)) c)))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double tmp;
                    	if ((2.0 * (((x * y) + (z * t)) - (((a + (b * c)) * c) * i))) <= ((double) INFINITY)) {
                    		tmp = 2.0 * fma(fma(c, b, a), (-i * c), fma(t, z, (y * x)));
                    	} else {
                    		tmp = (-2.0 * (fma(c, b, a) * i)) * c;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	tmp = 0.0
                    	if (Float64(2.0 * Float64(Float64(Float64(x * y) + Float64(z * t)) - Float64(Float64(Float64(a + Float64(b * c)) * c) * i))) <= Inf)
                    		tmp = Float64(2.0 * fma(fma(c, b, a), Float64(Float64(-i) * c), fma(t, z, Float64(y * x))));
                    	else
                    		tmp = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c);
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(2.0 * N[(N[(N[(x * y), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(2.0 * N[(N[(c * b + a), $MachinePrecision] * N[((-i) * c), $MachinePrecision] + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;2 \cdot \left(\left(x \cdot y + z \cdot t\right) - \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\right) \leq \infty:\\
                    \;\;\;\;2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), \left(-i\right) \cdot c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 #s(literal 2 binary64) (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i))) < +inf.0

                      1. Initial program 96.0%

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

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(a + b \cdot c\right) \cdot \left(c \cdot i\right)}\right)\right) + \left(x \cdot y + z \cdot t\right)\right) \]
                        8. distribute-rgt-neg-inN/A

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

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

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -\color{blue}{i \cdot c}, x \cdot y + z \cdot t\right) \]
                        17. lower-*.f6499.1

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

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

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \color{blue}{t \cdot z} + x \cdot y\right) \]
                        22. lower-fma.f6499.1

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                        25. lower-*.f6499.1

                          \[\leadsto 2 \cdot \mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                      4. Applied rewrites99.1%

                        \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(c, b, a\right), -i \cdot c, \mathsf{fma}\left(t, z, y \cdot x\right)\right)} \]

                      if +inf.0 < (*.f64 #s(literal 2 binary64) (-.f64 (+.f64 (*.f64 x y) (*.f64 z t)) (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)))

                      1. Initial program 0.0%

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

                        \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                        2. associate-*r*N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                        3. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        4. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                        5. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        6. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
                        7. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        8. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
                        9. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
                        10. lower-*.f64N/A

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

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        12. lower-*.f64N/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        13. +-commutativeN/A

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

                          \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
                        15. lower-fma.f6464.3

                          \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
                      5. Applied rewrites64.3%

                        \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]
                    3. Recombined 2 regimes into one program.
                    4. Final simplification97.2%

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

                    Alternative 8: 86.9% accurate, 0.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+130}\right):\\ \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, c \cdot a, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1 (* (* (+ a (* b c)) c) i)))
                       (if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+130)))
                         (* (* -2.0 (* (fma c b a) i)) c)
                         (* 2.0 (fma (- i) (* c a) (fma t z (* y x)))))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = ((a + (b * c)) * c) * i;
                    	double tmp;
                    	if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+130)) {
                    		tmp = (-2.0 * (fma(c, b, a) * i)) * c;
                    	} else {
                    		tmp = 2.0 * fma(-i, (c * a), fma(t, z, (y * x)));
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i)
                    	tmp = 0.0
                    	if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+130))
                    		tmp = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c);
                    	else
                    		tmp = Float64(2.0 * fma(Float64(-i), Float64(c * a), fma(t, z, Float64(y * x))));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+130]], $MachinePrecision]], N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], N[(2.0 * N[((-i) * N[(c * a), $MachinePrecision] + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
                    \mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+130}\right):\\
                    \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;2 \cdot \mathsf{fma}\left(-i, c \cdot a, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0 or 4.9999999999999996e130 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                      1. Initial program 74.9%

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

                        \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                        2. associate-*r*N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                        3. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        4. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                        5. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        6. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
                        7. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        8. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
                        9. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
                        10. lower-*.f64N/A

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

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        12. lower-*.f64N/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        13. +-commutativeN/A

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

                          \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
                        15. lower-fma.f6487.9

                          \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
                      5. Applied rewrites87.9%

                        \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]

                      if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 4.9999999999999996e130

                      1. Initial program 99.8%

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(a \cdot \left(c \cdot i\right)\right)\right)} + \left(t \cdot z + x \cdot y\right)\right) \]
                        6. associate-*r*N/A

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

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

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{c \cdot \left(a \cdot i\right)}\right)\right) + \left(t \cdot z + x \cdot y\right)\right) \]
                        9. associate-*r*N/A

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

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

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(a \cdot c\right)}\right)\right) + \left(t \cdot z + x \cdot y\right)\right) \]
                        12. distribute-lft-neg-inN/A

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, c \cdot a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                        19. lower-*.f6490.1

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, c \cdot a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                      5. Applied rewrites90.1%

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

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

                    Alternative 9: 87.3% accurate, 0.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ \mathbf{elif}\;t\_1 \leq 10^{+106}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, c \cdot a, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1 (* (* (+ a (* b c)) c) i)))
                       (if (<= t_1 (- INFINITY))
                         (* (* -2.0 (* (fma c b a) i)) c)
                         (if (<= t_1 1e+106)
                           (* 2.0 (fma (- i) (* c a) (fma t z (* y x))))
                           (* 2.0 (fma (- i) (* (fma c b a) c) (* y x)))))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = ((a + (b * c)) * c) * i;
                    	double tmp;
                    	if (t_1 <= -((double) INFINITY)) {
                    		tmp = (-2.0 * (fma(c, b, a) * i)) * c;
                    	} else if (t_1 <= 1e+106) {
                    		tmp = 2.0 * fma(-i, (c * a), fma(t, z, (y * x)));
                    	} else {
                    		tmp = 2.0 * fma(-i, (fma(c, b, a) * c), (y * x));
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(Float64(a + Float64(b * c)) * c) * i)
                    	tmp = 0.0
                    	if (t_1 <= Float64(-Inf))
                    		tmp = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c);
                    	elseif (t_1 <= 1e+106)
                    		tmp = Float64(2.0 * fma(Float64(-i), Float64(c * a), fma(t, z, Float64(y * x))));
                    	else
                    		tmp = Float64(2.0 * fma(Float64(-i), Float64(fma(c, b, a) * c), Float64(y * x)));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(a + N[(b * c), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[t$95$1, 1e+106], N[(2.0 * N[((-i) * N[(c * a), $MachinePrecision] + N[(t * z + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[((-i) * N[(N[(c * b + a), $MachinePrecision] * c), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(\left(a + b \cdot c\right) \cdot c\right) \cdot i\\
                    \mathbf{if}\;t\_1 \leq -\infty:\\
                    \;\;\;\;\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
                    
                    \mathbf{elif}\;t\_1 \leq 10^{+106}:\\
                    \;\;\;\;2 \cdot \mathsf{fma}\left(-i, c \cdot a, \mathsf{fma}\left(t, z, y \cdot x\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < -inf.0

                      1. Initial program 69.4%

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

                        \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. *-commutativeN/A

                          \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                        2. associate-*r*N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                        3. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        4. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                        5. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        6. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
                        7. distribute-lft-outN/A

                          \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                        8. associate-*r*N/A

                          \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
                        9. distribute-rgt-inN/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
                        10. lower-*.f64N/A

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

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        12. lower-*.f64N/A

                          \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                        13. +-commutativeN/A

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

                          \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
                        15. lower-fma.f6487.8

                          \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
                      5. Applied rewrites87.8%

                        \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]

                      if -inf.0 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i) < 1.00000000000000009e106

                      1. Initial program 99.9%

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(a \cdot \left(c \cdot i\right)\right)\right)} + \left(t \cdot z + x \cdot y\right)\right) \]
                        6. associate-*r*N/A

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

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

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{c \cdot \left(a \cdot i\right)}\right)\right) + \left(t \cdot z + x \cdot y\right)\right) \]
                        9. associate-*r*N/A

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

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

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(a \cdot c\right)}\right)\right) + \left(t \cdot z + x \cdot y\right)\right) \]
                        12. distribute-lft-neg-inN/A

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

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

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

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

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

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, c \cdot a, \mathsf{fma}\left(t, z, \color{blue}{y \cdot x}\right)\right) \]
                      5. Applied rewrites90.4%

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

                      if 1.00000000000000009e106 < (*.f64 (*.f64 (+.f64 a (*.f64 b c)) c) i)

                      1. Initial program 82.6%

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

                        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. fp-cancel-sub-sign-invN/A

                          \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                        2. mul-1-negN/A

                          \[\leadsto 2 \cdot \left(x \cdot y + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                        3. associate-*r*N/A

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

                          \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + x \cdot y\right)} \]
                        5. mul-1-negN/A

                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + x \cdot y\right) \]
                        6. *-commutativeN/A

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + x \cdot y\right) \]
                        7. associate-*l*N/A

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + x \cdot y\right) \]
                        8. *-commutativeN/A

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + x \cdot y\right) \]
                        9. distribute-lft-neg-inN/A

                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \left(c \cdot \left(a + b \cdot c\right)\right)} + x \cdot y\right) \]
                        10. lower-fma.f64N/A

                          \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), x \cdot y\right)} \]
                        11. lower-neg.f64N/A

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

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

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(\color{blue}{c \cdot b} + a\right) \cdot c, x \cdot y\right) \]
                        16. lower-fma.f64N/A

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, x \cdot y\right) \]
                        17. *-commutativeN/A

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                        18. lower-*.f6488.2

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                      5. Applied rewrites88.2%

                        \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)} \]
                    3. Recombined 3 regimes into one program.
                    4. Add Preprocessing

                    Alternative 10: 65.2% accurate, 0.5× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(c \cdot c\right) \cdot b\\ t_2 := 2 \cdot \mathsf{fma}\left(-i, t\_1, t \cdot z\right)\\ t_3 := 2 \cdot \mathsf{fma}\left(-i, t\_1, y \cdot x\right)\\ \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-71}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-230}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-307}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\ \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+30}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
                    (FPCore (x y z t a b c i)
                     :precision binary64
                     (let* ((t_1 (* (* c c) b))
                            (t_2 (* 2.0 (fma (- i) t_1 (* t z))))
                            (t_3 (* 2.0 (fma (- i) t_1 (* y x)))))
                       (if (<= (* x y) -1e-71)
                         t_3
                         (if (<= (* x y) -5e-230)
                           t_2
                           (if (<= (* x y) 4e-307)
                             (* 2.0 (fma (- i) (* a c) (* t z)))
                             (if (<= (* x y) 5e+30) t_2 t_3))))))
                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                    	double t_1 = (c * c) * b;
                    	double t_2 = 2.0 * fma(-i, t_1, (t * z));
                    	double t_3 = 2.0 * fma(-i, t_1, (y * x));
                    	double tmp;
                    	if ((x * y) <= -1e-71) {
                    		tmp = t_3;
                    	} else if ((x * y) <= -5e-230) {
                    		tmp = t_2;
                    	} else if ((x * y) <= 4e-307) {
                    		tmp = 2.0 * fma(-i, (a * c), (t * z));
                    	} else if ((x * y) <= 5e+30) {
                    		tmp = t_2;
                    	} else {
                    		tmp = t_3;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a, b, c, i)
                    	t_1 = Float64(Float64(c * c) * b)
                    	t_2 = Float64(2.0 * fma(Float64(-i), t_1, Float64(t * z)))
                    	t_3 = Float64(2.0 * fma(Float64(-i), t_1, Float64(y * x)))
                    	tmp = 0.0
                    	if (Float64(x * y) <= -1e-71)
                    		tmp = t_3;
                    	elseif (Float64(x * y) <= -5e-230)
                    		tmp = t_2;
                    	elseif (Float64(x * y) <= 4e-307)
                    		tmp = Float64(2.0 * fma(Float64(-i), Float64(a * c), Float64(t * z)));
                    	elseif (Float64(x * y) <= 5e+30)
                    		tmp = t_2;
                    	else
                    		tmp = t_3;
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(c * c), $MachinePrecision] * b), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[((-i) * t$95$1 + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[((-i) * t$95$1 + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(x * y), $MachinePrecision], -1e-71], t$95$3, If[LessEqual[N[(x * y), $MachinePrecision], -5e-230], t$95$2, If[LessEqual[N[(x * y), $MachinePrecision], 4e-307], N[(2.0 * N[((-i) * N[(a * c), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x * y), $MachinePrecision], 5e+30], t$95$2, t$95$3]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \left(c \cdot c\right) \cdot b\\
                    t_2 := 2 \cdot \mathsf{fma}\left(-i, t\_1, t \cdot z\right)\\
                    t_3 := 2 \cdot \mathsf{fma}\left(-i, t\_1, y \cdot x\right)\\
                    \mathbf{if}\;x \cdot y \leq -1 \cdot 10^{-71}:\\
                    \;\;\;\;t\_3\\
                    
                    \mathbf{elif}\;x \cdot y \leq -5 \cdot 10^{-230}:\\
                    \;\;\;\;t\_2\\
                    
                    \mathbf{elif}\;x \cdot y \leq 4 \cdot 10^{-307}:\\
                    \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\
                    
                    \mathbf{elif}\;x \cdot y \leq 5 \cdot 10^{+30}:\\
                    \;\;\;\;t\_2\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_3\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if (*.f64 x y) < -9.9999999999999992e-72 or 4.9999999999999998e30 < (*.f64 x y)

                      1. Initial program 87.1%

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

                        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                      4. Step-by-step derivation
                        1. fp-cancel-sub-sign-invN/A

                          \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                        2. mul-1-negN/A

                          \[\leadsto 2 \cdot \left(x \cdot y + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                        3. associate-*r*N/A

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

                          \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + x \cdot y\right)} \]
                        5. mul-1-negN/A

                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + x \cdot y\right) \]
                        6. *-commutativeN/A

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + x \cdot y\right) \]
                        7. associate-*l*N/A

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + x \cdot y\right) \]
                        8. *-commutativeN/A

                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + x \cdot y\right) \]
                        9. distribute-lft-neg-inN/A

                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \left(c \cdot \left(a + b \cdot c\right)\right)} + x \cdot y\right) \]
                        10. lower-fma.f64N/A

                          \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), x \cdot y\right)} \]
                        11. lower-neg.f64N/A

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

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

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

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

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(\color{blue}{c \cdot b} + a\right) \cdot c, x \cdot y\right) \]
                        16. lower-fma.f64N/A

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, x \cdot y\right) \]
                        17. *-commutativeN/A

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                        18. lower-*.f6482.0

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                      5. Applied rewrites82.0%

                        \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)} \]
                      6. Taylor expanded in a around 0

                        \[\leadsto 2 \cdot \mathsf{fma}\left(-i, b \cdot \color{blue}{{c}^{2}}, y \cdot x\right) \]
                      7. Step-by-step derivation
                        1. Applied rewrites71.7%

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot \color{blue}{b}, y \cdot x\right) \]

                        if -9.9999999999999992e-72 < (*.f64 x y) < -5.00000000000000035e-230 or 3.99999999999999964e-307 < (*.f64 x y) < 4.9999999999999998e30

                        1. Initial program 93.6%

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

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

                            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                          2. mul-1-negN/A

                            \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                          3. associate-*r*N/A

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

                            \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
                          5. mul-1-negN/A

                            \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
                          6. *-commutativeN/A

                            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
                          7. associate-*l*N/A

                            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
                          8. *-commutativeN/A

                            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
                          9. distribute-lft-neg-inN/A

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

                            \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
                          11. lower-neg.f64N/A

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

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

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

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

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

                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
                          17. lower-*.f6485.5

                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
                        5. Applied rewrites85.5%

                          \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
                        6. Taylor expanded in a around 0

                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, b \cdot \color{blue}{{c}^{2}}, t \cdot z\right) \]
                        7. Step-by-step derivation
                          1. Applied rewrites72.6%

                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot \color{blue}{b}, t \cdot z\right) \]

                          if -5.00000000000000035e-230 < (*.f64 x y) < 3.99999999999999964e-307

                          1. Initial program 97.6%

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

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

                              \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                            2. mul-1-negN/A

                              \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                            3. associate-*r*N/A

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

                              \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
                            5. mul-1-negN/A

                              \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
                            6. *-commutativeN/A

                              \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
                            7. associate-*l*N/A

                              \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
                            8. *-commutativeN/A

                              \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
                            9. distribute-lft-neg-inN/A

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

                              \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
                            11. lower-neg.f64N/A

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

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

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

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

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

                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
                            17. lower-*.f6496.6

                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
                          5. Applied rewrites96.6%

                            \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
                          6. Taylor expanded in a around inf

                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]
                          7. Step-by-step derivation
                            1. Applied rewrites85.7%

                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]
                          8. Recombined 3 regimes into one program.
                          9. Add Preprocessing

                          Alternative 11: 63.4% accurate, 0.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ \mathbf{if}\;c \leq -2.4 \cdot 10^{+92}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq -8.5 \cdot 10^{-223}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, c \cdot a, y \cdot x\right)\\ \mathbf{elif}\;c \leq 5.6 \cdot 10^{-57}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\ \mathbf{elif}\;c \leq 2.15 \cdot 10^{+70}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, t \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t a b c i)
                           :precision binary64
                           (let* ((t_1 (* (* -2.0 (* (fma c b a) i)) c)))
                             (if (<= c -2.4e+92)
                               t_1
                               (if (<= c -8.5e-223)
                                 (* 2.0 (fma (- i) (* c a) (* y x)))
                                 (if (<= c 5.6e-57)
                                   (* 2.0 (fma (- i) (* a c) (* t z)))
                                   (if (<= c 2.15e+70)
                                     (* 2.0 (fma (- i) (* (* c c) b) (* t z)))
                                     t_1))))))
                          double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                          	double t_1 = (-2.0 * (fma(c, b, a) * i)) * c;
                          	double tmp;
                          	if (c <= -2.4e+92) {
                          		tmp = t_1;
                          	} else if (c <= -8.5e-223) {
                          		tmp = 2.0 * fma(-i, (c * a), (y * x));
                          	} else if (c <= 5.6e-57) {
                          		tmp = 2.0 * fma(-i, (a * c), (t * z));
                          	} else if (c <= 2.15e+70) {
                          		tmp = 2.0 * fma(-i, ((c * c) * b), (t * z));
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a, b, c, i)
                          	t_1 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c)
                          	tmp = 0.0
                          	if (c <= -2.4e+92)
                          		tmp = t_1;
                          	elseif (c <= -8.5e-223)
                          		tmp = Float64(2.0 * fma(Float64(-i), Float64(c * a), Float64(y * x)));
                          	elseif (c <= 5.6e-57)
                          		tmp = Float64(2.0 * fma(Float64(-i), Float64(a * c), Float64(t * z)));
                          	elseif (c <= 2.15e+70)
                          		tmp = Float64(2.0 * fma(Float64(-i), Float64(Float64(c * c) * b), Float64(t * z)));
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -2.4e+92], t$95$1, If[LessEqual[c, -8.5e-223], N[(2.0 * N[((-i) * N[(c * a), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.6e-57], N[(2.0 * N[((-i) * N[(a * c), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.15e+70], N[(2.0 * N[((-i) * N[(N[(c * c), $MachinePrecision] * b), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
                          \mathbf{if}\;c \leq -2.4 \cdot 10^{+92}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;c \leq -8.5 \cdot 10^{-223}:\\
                          \;\;\;\;2 \cdot \mathsf{fma}\left(-i, c \cdot a, y \cdot x\right)\\
                          
                          \mathbf{elif}\;c \leq 5.6 \cdot 10^{-57}:\\
                          \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\
                          
                          \mathbf{elif}\;c \leq 2.15 \cdot 10^{+70}:\\
                          \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, t \cdot z\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 4 regimes
                          2. if c < -2.40000000000000005e92 or 2.15e70 < c

                            1. Initial program 79.9%

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

                              \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                            4. Step-by-step derivation
                              1. *-commutativeN/A

                                \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                              2. associate-*r*N/A

                                \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                              3. distribute-rgt-inN/A

                                \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                              4. associate-*r*N/A

                                \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                              5. distribute-lft-outN/A

                                \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                              6. lower-*.f64N/A

                                \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
                              7. distribute-lft-outN/A

                                \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                              8. associate-*r*N/A

                                \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
                              9. distribute-rgt-inN/A

                                \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
                              10. lower-*.f64N/A

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

                                \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                              12. lower-*.f64N/A

                                \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                              13. +-commutativeN/A

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

                                \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
                              15. lower-fma.f6483.8

                                \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
                            5. Applied rewrites83.8%

                              \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]

                            if -2.40000000000000005e92 < c < -8.5000000000000003e-223

                            1. Initial program 94.3%

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

                              \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                            4. Step-by-step derivation
                              1. fp-cancel-sub-sign-invN/A

                                \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                              2. mul-1-negN/A

                                \[\leadsto 2 \cdot \left(x \cdot y + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                              3. associate-*r*N/A

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

                                \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + x \cdot y\right)} \]
                              5. mul-1-negN/A

                                \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + x \cdot y\right) \]
                              6. *-commutativeN/A

                                \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + x \cdot y\right) \]
                              7. associate-*l*N/A

                                \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + x \cdot y\right) \]
                              8. *-commutativeN/A

                                \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + x \cdot y\right) \]
                              9. distribute-lft-neg-inN/A

                                \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \left(c \cdot \left(a + b \cdot c\right)\right)} + x \cdot y\right) \]
                              10. lower-fma.f64N/A

                                \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), x \cdot y\right)} \]
                              11. lower-neg.f64N/A

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

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

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

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

                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(\color{blue}{c \cdot b} + a\right) \cdot c, x \cdot y\right) \]
                              16. lower-fma.f64N/A

                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, x \cdot y\right) \]
                              17. *-commutativeN/A

                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                              18. lower-*.f6476.0

                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                            5. Applied rewrites76.0%

                              \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)} \]
                            6. Taylor expanded in a around inf

                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, y \cdot x\right) \]
                            7. Step-by-step derivation
                              1. Applied rewrites67.8%

                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, c \cdot \color{blue}{a}, y \cdot x\right) \]

                              if -8.5000000000000003e-223 < c < 5.5999999999999999e-57

                              1. Initial program 98.4%

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

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

                                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                2. mul-1-negN/A

                                  \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                3. associate-*r*N/A

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

                                  \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
                                5. mul-1-negN/A

                                  \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
                                6. *-commutativeN/A

                                  \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
                                7. associate-*l*N/A

                                  \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
                                8. *-commutativeN/A

                                  \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
                                9. distribute-lft-neg-inN/A

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

                                  \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
                                11. lower-neg.f64N/A

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

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

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

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

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

                                  \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
                                17. lower-*.f6466.2

                                  \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
                              5. Applied rewrites66.2%

                                \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
                              6. Taylor expanded in a around inf

                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]
                              7. Step-by-step derivation
                                1. Applied rewrites66.2%

                                  \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]

                                if 5.5999999999999999e-57 < c < 2.15e70

                                1. Initial program 96.8%

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

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

                                    \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                  2. mul-1-negN/A

                                    \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                  3. associate-*r*N/A

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

                                    \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
                                  5. mul-1-negN/A

                                    \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
                                  6. *-commutativeN/A

                                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
                                  7. associate-*l*N/A

                                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
                                  8. *-commutativeN/A

                                    \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
                                  9. distribute-lft-neg-inN/A

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

                                    \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
                                  11. lower-neg.f64N/A

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

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

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

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

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

                                    \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
                                  17. lower-*.f6476.4

                                    \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
                                5. Applied rewrites76.4%

                                  \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
                                6. Taylor expanded in a around 0

                                  \[\leadsto 2 \cdot \mathsf{fma}\left(-i, b \cdot \color{blue}{{c}^{2}}, t \cdot z\right) \]
                                7. Step-by-step derivation
                                  1. Applied rewrites66.4%

                                    \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot \color{blue}{b}, t \cdot z\right) \]
                                8. Recombined 4 regimes into one program.
                                9. Add Preprocessing

                                Alternative 12: 63.4% accurate, 0.8× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \mathsf{fma}\left(-i, c \cdot a, y \cdot x\right)\\ t_2 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\ \mathbf{if}\;c \leq -2.4 \cdot 10^{+92}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;c \leq -8.5 \cdot 10^{-223}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;c \leq 2 \cdot 10^{-219}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\ \mathbf{elif}\;c \leq 0.000112:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
                                (FPCore (x y z t a b c i)
                                 :precision binary64
                                 (let* ((t_1 (* 2.0 (fma (- i) (* c a) (* y x))))
                                        (t_2 (* (* -2.0 (* (fma c b a) i)) c)))
                                   (if (<= c -2.4e+92)
                                     t_2
                                     (if (<= c -8.5e-223)
                                       t_1
                                       (if (<= c 2e-219)
                                         (* 2.0 (fma (- i) (* a c) (* t z)))
                                         (if (<= c 0.000112) t_1 t_2))))))
                                double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                	double t_1 = 2.0 * fma(-i, (c * a), (y * x));
                                	double t_2 = (-2.0 * (fma(c, b, a) * i)) * c;
                                	double tmp;
                                	if (c <= -2.4e+92) {
                                		tmp = t_2;
                                	} else if (c <= -8.5e-223) {
                                		tmp = t_1;
                                	} else if (c <= 2e-219) {
                                		tmp = 2.0 * fma(-i, (a * c), (t * z));
                                	} else if (c <= 0.000112) {
                                		tmp = t_1;
                                	} else {
                                		tmp = t_2;
                                	}
                                	return tmp;
                                }
                                
                                function code(x, y, z, t, a, b, c, i)
                                	t_1 = Float64(2.0 * fma(Float64(-i), Float64(c * a), Float64(y * x)))
                                	t_2 = Float64(Float64(-2.0 * Float64(fma(c, b, a) * i)) * c)
                                	tmp = 0.0
                                	if (c <= -2.4e+92)
                                		tmp = t_2;
                                	elseif (c <= -8.5e-223)
                                		tmp = t_1;
                                	elseif (c <= 2e-219)
                                		tmp = Float64(2.0 * fma(Float64(-i), Float64(a * c), Float64(t * z)));
                                	elseif (c <= 0.000112)
                                		tmp = t_1;
                                	else
                                		tmp = t_2;
                                	end
                                	return tmp
                                end
                                
                                code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(2.0 * N[((-i) * N[(c * a), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-2.0 * N[(N[(c * b + a), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -2.4e+92], t$95$2, If[LessEqual[c, -8.5e-223], t$95$1, If[LessEqual[c, 2e-219], N[(2.0 * N[((-i) * N[(a * c), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 0.000112], t$95$1, t$95$2]]]]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                t_1 := 2 \cdot \mathsf{fma}\left(-i, c \cdot a, y \cdot x\right)\\
                                t_2 := \left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c\\
                                \mathbf{if}\;c \leq -2.4 \cdot 10^{+92}:\\
                                \;\;\;\;t\_2\\
                                
                                \mathbf{elif}\;c \leq -8.5 \cdot 10^{-223}:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;c \leq 2 \cdot 10^{-219}:\\
                                \;\;\;\;2 \cdot \mathsf{fma}\left(-i, a \cdot c, t \cdot z\right)\\
                                
                                \mathbf{elif}\;c \leq 0.000112:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_2\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 3 regimes
                                2. if c < -2.40000000000000005e92 or 1.11999999999999998e-4 < c

                                  1. Initial program 82.0%

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

                                    \[\leadsto \color{blue}{-2 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. *-commutativeN/A

                                      \[\leadsto -2 \cdot \color{blue}{\left(\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c\right)} \]
                                    2. associate-*r*N/A

                                      \[\leadsto \color{blue}{\left(-2 \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \cdot c} \]
                                    3. distribute-rgt-inN/A

                                      \[\leadsto \left(-2 \cdot \color{blue}{\left(a \cdot i + \left(b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                                    4. associate-*r*N/A

                                      \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{b \cdot \left(c \cdot i\right)}\right)\right) \cdot c \]
                                    5. distribute-lft-outN/A

                                      \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                                    6. lower-*.f64N/A

                                      \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i\right) + -2 \cdot \left(b \cdot \left(c \cdot i\right)\right)\right) \cdot c} \]
                                    7. distribute-lft-outN/A

                                      \[\leadsto \color{blue}{\left(-2 \cdot \left(a \cdot i + b \cdot \left(c \cdot i\right)\right)\right)} \cdot c \]
                                    8. associate-*r*N/A

                                      \[\leadsto \left(-2 \cdot \left(a \cdot i + \color{blue}{\left(b \cdot c\right) \cdot i}\right)\right) \cdot c \]
                                    9. distribute-rgt-inN/A

                                      \[\leadsto \left(-2 \cdot \color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right)}\right) \cdot c \]
                                    10. lower-*.f64N/A

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

                                      \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                                    12. lower-*.f64N/A

                                      \[\leadsto \left(-2 \cdot \color{blue}{\left(\left(a + b \cdot c\right) \cdot i\right)}\right) \cdot c \]
                                    13. +-commutativeN/A

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

                                      \[\leadsto \left(-2 \cdot \left(\left(\color{blue}{c \cdot b} + a\right) \cdot i\right)\right) \cdot c \]
                                    15. lower-fma.f6479.6

                                      \[\leadsto \left(-2 \cdot \left(\color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot i\right)\right) \cdot c \]
                                  5. Applied rewrites79.6%

                                    \[\leadsto \color{blue}{\left(-2 \cdot \left(\mathsf{fma}\left(c, b, a\right) \cdot i\right)\right) \cdot c} \]

                                  if -2.40000000000000005e92 < c < -8.5000000000000003e-223 or 2.0000000000000001e-219 < c < 1.11999999999999998e-4

                                  1. Initial program 95.9%

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

                                    \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                  4. Step-by-step derivation
                                    1. fp-cancel-sub-sign-invN/A

                                      \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                    2. mul-1-negN/A

                                      \[\leadsto 2 \cdot \left(x \cdot y + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                    3. associate-*r*N/A

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

                                      \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + x \cdot y\right)} \]
                                    5. mul-1-negN/A

                                      \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + x \cdot y\right) \]
                                    6. *-commutativeN/A

                                      \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + x \cdot y\right) \]
                                    7. associate-*l*N/A

                                      \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + x \cdot y\right) \]
                                    8. *-commutativeN/A

                                      \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + x \cdot y\right) \]
                                    9. distribute-lft-neg-inN/A

                                      \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \left(c \cdot \left(a + b \cdot c\right)\right)} + x \cdot y\right) \]
                                    10. lower-fma.f64N/A

                                      \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), x \cdot y\right)} \]
                                    11. lower-neg.f64N/A

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

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

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

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

                                      \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(\color{blue}{c \cdot b} + a\right) \cdot c, x \cdot y\right) \]
                                    16. lower-fma.f64N/A

                                      \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, x \cdot y\right) \]
                                    17. *-commutativeN/A

                                      \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                                    18. lower-*.f6473.0

                                      \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                                  5. Applied rewrites73.0%

                                    \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)} \]
                                  6. Taylor expanded in a around inf

                                    \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, y \cdot x\right) \]
                                  7. Step-by-step derivation
                                    1. Applied rewrites65.1%

                                      \[\leadsto 2 \cdot \mathsf{fma}\left(-i, c \cdot \color{blue}{a}, y \cdot x\right) \]

                                    if -8.5000000000000003e-223 < c < 2.0000000000000001e-219

                                    1. Initial program 99.8%

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

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

                                        \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                      2. mul-1-negN/A

                                        \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                      3. associate-*r*N/A

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

                                        \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
                                      5. mul-1-negN/A

                                        \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
                                      6. *-commutativeN/A

                                        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
                                      7. associate-*l*N/A

                                        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
                                      8. *-commutativeN/A

                                        \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
                                      9. distribute-lft-neg-inN/A

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

                                        \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
                                      11. lower-neg.f64N/A

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

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

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

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

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

                                        \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
                                      17. lower-*.f6477.4

                                        \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
                                    5. Applied rewrites77.4%

                                      \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
                                    6. Taylor expanded in a around inf

                                      \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites77.4%

                                        \[\leadsto 2 \cdot \mathsf{fma}\left(-i, a \cdot \color{blue}{c}, t \cdot z\right) \]
                                    8. Recombined 3 regimes into one program.
                                    9. Add Preprocessing

                                    Alternative 13: 63.8% accurate, 1.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+63} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot c, b \cdot c, z \cdot t\right) \cdot 2\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a b c i)
                                     :precision binary64
                                     (if (or (<= x -1.5e+63) (not (<= x 2.85e-118)))
                                       (* 2.0 (fma (- i) (* (* c c) b) (* y x)))
                                       (* (fma (* (- i) c) (* b c) (* z t)) 2.0)))
                                    double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                    	double tmp;
                                    	if ((x <= -1.5e+63) || !(x <= 2.85e-118)) {
                                    		tmp = 2.0 * fma(-i, ((c * c) * b), (y * x));
                                    	} else {
                                    		tmp = fma((-i * c), (b * c), (z * t)) * 2.0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a, b, c, i)
                                    	tmp = 0.0
                                    	if ((x <= -1.5e+63) || !(x <= 2.85e-118))
                                    		tmp = Float64(2.0 * fma(Float64(-i), Float64(Float64(c * c) * b), Float64(y * x)));
                                    	else
                                    		tmp = Float64(fma(Float64(Float64(-i) * c), Float64(b * c), Float64(z * t)) * 2.0);
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.5e+63], N[Not[LessEqual[x, 2.85e-118]], $MachinePrecision]], N[(2.0 * N[((-i) * N[(N[(c * c), $MachinePrecision] * b), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-i) * c), $MachinePrecision] * N[(b * c), $MachinePrecision] + N[(z * t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;x \leq -1.5 \cdot 10^{+63} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\
                                    \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, y \cdot x\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot c, b \cdot c, z \cdot t\right) \cdot 2\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if x < -1.5e63 or 2.85000000000000006e-118 < x

                                      1. Initial program 87.9%

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

                                        \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                      4. Step-by-step derivation
                                        1. fp-cancel-sub-sign-invN/A

                                          \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                        2. mul-1-negN/A

                                          \[\leadsto 2 \cdot \left(x \cdot y + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                        3. associate-*r*N/A

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

                                          \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + x \cdot y\right)} \]
                                        5. mul-1-negN/A

                                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + x \cdot y\right) \]
                                        6. *-commutativeN/A

                                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + x \cdot y\right) \]
                                        7. associate-*l*N/A

                                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + x \cdot y\right) \]
                                        8. *-commutativeN/A

                                          \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + x \cdot y\right) \]
                                        9. distribute-lft-neg-inN/A

                                          \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \left(c \cdot \left(a + b \cdot c\right)\right)} + x \cdot y\right) \]
                                        10. lower-fma.f64N/A

                                          \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), x \cdot y\right)} \]
                                        11. lower-neg.f64N/A

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

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

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

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

                                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(\color{blue}{c \cdot b} + a\right) \cdot c, x \cdot y\right) \]
                                        16. lower-fma.f64N/A

                                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, x \cdot y\right) \]
                                        17. *-commutativeN/A

                                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                                        18. lower-*.f6479.2

                                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                                      5. Applied rewrites79.2%

                                        \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)} \]
                                      6. Taylor expanded in a around 0

                                        \[\leadsto 2 \cdot \mathsf{fma}\left(-i, b \cdot \color{blue}{{c}^{2}}, y \cdot x\right) \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites65.3%

                                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot \color{blue}{b}, y \cdot x\right) \]

                                        if -1.5e63 < x < 2.85000000000000006e-118

                                        1. Initial program 94.6%

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

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

                                            \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                          2. mul-1-negN/A

                                            \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                          3. associate-*r*N/A

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

                                            \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
                                          5. mul-1-negN/A

                                            \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
                                          6. *-commutativeN/A

                                            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
                                          7. associate-*l*N/A

                                            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
                                          8. *-commutativeN/A

                                            \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
                                          9. distribute-lft-neg-inN/A

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

                                            \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
                                          11. lower-neg.f64N/A

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

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

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

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

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

                                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
                                          17. lower-*.f6481.2

                                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
                                        5. Applied rewrites81.2%

                                          \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
                                        6. Taylor expanded in a around 0

                                          \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right) \]
                                        7. Step-by-step derivation
                                          1. Applied rewrites71.7%

                                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right) \]
                                          2. Step-by-step derivation
                                            1. lift-*.f64N/A

                                              \[\leadsto \color{blue}{2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right)} \]
                                            2. *-commutativeN/A

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right) \cdot 2} \]
                                            3. lower-*.f6471.7

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right) \cdot 2} \]
                                          3. Applied rewrites72.6%

                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\left(-i\right) \cdot c, b \cdot c, z \cdot t\right) \cdot 2} \]
                                        8. Recombined 2 regimes into one program.
                                        9. Final simplification68.4%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{+63} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(-i\right) \cdot c, b \cdot c, z \cdot t\right) \cdot 2\\ \end{array} \]
                                        10. Add Preprocessing

                                        Alternative 14: 62.5% accurate, 1.0× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{+62} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right)\\ \end{array} \end{array} \]
                                        (FPCore (x y z t a b c i)
                                         :precision binary64
                                         (if (or (<= x -6.4e+62) (not (<= x 2.85e-118)))
                                           (* 2.0 (fma (- i) (* (* c c) b) (* y x)))
                                           (* 2.0 (fma (- i) (* (* b c) c) (* t z)))))
                                        double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                        	double tmp;
                                        	if ((x <= -6.4e+62) || !(x <= 2.85e-118)) {
                                        		tmp = 2.0 * fma(-i, ((c * c) * b), (y * x));
                                        	} else {
                                        		tmp = 2.0 * fma(-i, ((b * c) * c), (t * z));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(x, y, z, t, a, b, c, i)
                                        	tmp = 0.0
                                        	if ((x <= -6.4e+62) || !(x <= 2.85e-118))
                                        		tmp = Float64(2.0 * fma(Float64(-i), Float64(Float64(c * c) * b), Float64(y * x)));
                                        	else
                                        		tmp = Float64(2.0 * fma(Float64(-i), Float64(Float64(b * c) * c), Float64(t * z)));
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.4e+62], N[Not[LessEqual[x, 2.85e-118]], $MachinePrecision]], N[(2.0 * N[((-i) * N[(N[(c * c), $MachinePrecision] * b), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[((-i) * N[(N[(b * c), $MachinePrecision] * c), $MachinePrecision] + N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;x \leq -6.4 \cdot 10^{+62} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\
                                        \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, y \cdot x\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right)\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if x < -6.39999999999999968e62 or 2.85000000000000006e-118 < x

                                          1. Initial program 88.0%

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

                                            \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y - c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                          4. Step-by-step derivation
                                            1. fp-cancel-sub-sign-invN/A

                                              \[\leadsto 2 \cdot \color{blue}{\left(x \cdot y + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                            2. mul-1-negN/A

                                              \[\leadsto 2 \cdot \left(x \cdot y + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                            3. associate-*r*N/A

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

                                              \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + x \cdot y\right)} \]
                                            5. mul-1-negN/A

                                              \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + x \cdot y\right) \]
                                            6. *-commutativeN/A

                                              \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + x \cdot y\right) \]
                                            7. associate-*l*N/A

                                              \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + x \cdot y\right) \]
                                            8. *-commutativeN/A

                                              \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + x \cdot y\right) \]
                                            9. distribute-lft-neg-inN/A

                                              \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(i\right)\right) \cdot \left(c \cdot \left(a + b \cdot c\right)\right)} + x \cdot y\right) \]
                                            10. lower-fma.f64N/A

                                              \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), x \cdot y\right)} \]
                                            11. lower-neg.f64N/A

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

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

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

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

                                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(\color{blue}{c \cdot b} + a\right) \cdot c, x \cdot y\right) \]
                                            16. lower-fma.f64N/A

                                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, x \cdot y\right) \]
                                            17. *-commutativeN/A

                                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                                            18. lower-*.f6479.3

                                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{y \cdot x}\right) \]
                                          5. Applied rewrites79.3%

                                            \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, y \cdot x\right)} \]
                                          6. Taylor expanded in a around 0

                                            \[\leadsto 2 \cdot \mathsf{fma}\left(-i, b \cdot \color{blue}{{c}^{2}}, y \cdot x\right) \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites65.5%

                                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot \color{blue}{b}, y \cdot x\right) \]

                                            if -6.39999999999999968e62 < x < 2.85000000000000006e-118

                                            1. Initial program 94.6%

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

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

                                                \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z + \left(\mathsf{neg}\left(c\right)\right) \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)} \]
                                              2. mul-1-negN/A

                                                \[\leadsto 2 \cdot \left(t \cdot z + \color{blue}{\left(-1 \cdot c\right)} \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) \]
                                              3. associate-*r*N/A

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

                                                \[\leadsto 2 \cdot \color{blue}{\left(-1 \cdot \left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right) + t \cdot z\right)} \]
                                              5. mul-1-negN/A

                                                \[\leadsto 2 \cdot \left(\color{blue}{\left(\mathsf{neg}\left(c \cdot \left(i \cdot \left(a + b \cdot c\right)\right)\right)\right)} + t \cdot z\right) \]
                                              6. *-commutativeN/A

                                                \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{\left(i \cdot \left(a + b \cdot c\right)\right) \cdot c}\right)\right) + t \cdot z\right) \]
                                              7. associate-*l*N/A

                                                \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(\color{blue}{i \cdot \left(\left(a + b \cdot c\right) \cdot c\right)}\right)\right) + t \cdot z\right) \]
                                              8. *-commutativeN/A

                                                \[\leadsto 2 \cdot \left(\left(\mathsf{neg}\left(i \cdot \color{blue}{\left(c \cdot \left(a + b \cdot c\right)\right)}\right)\right) + t \cdot z\right) \]
                                              9. distribute-lft-neg-inN/A

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

                                                \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(\mathsf{neg}\left(i\right), c \cdot \left(a + b \cdot c\right), t \cdot z\right)} \]
                                              11. lower-neg.f64N/A

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

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

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

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

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

                                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \color{blue}{\mathsf{fma}\left(c, b, a\right)} \cdot c, t \cdot z\right) \]
                                              17. lower-*.f6481.9

                                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, \color{blue}{t \cdot z}\right) \]
                                            5. Applied rewrites81.9%

                                              \[\leadsto 2 \cdot \color{blue}{\mathsf{fma}\left(-i, \mathsf{fma}\left(c, b, a\right) \cdot c, t \cdot z\right)} \]
                                            6. Taylor expanded in a around 0

                                              \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right) \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites72.3%

                                                \[\leadsto 2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right) \]
                                            8. Recombined 2 regimes into one program.
                                            9. Final simplification68.4%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -6.4 \cdot 10^{+62} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(c \cdot c\right) \cdot b, y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \mathsf{fma}\left(-i, \left(b \cdot c\right) \cdot c, t \cdot z\right)\\ \end{array} \]
                                            10. Add Preprocessing

                                            Alternative 15: 39.7% accurate, 1.7× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+63} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z + z\right)\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a b c i)
                                             :precision binary64
                                             (if (or (<= x -1.1e+63) (not (<= x 2.85e-118)))
                                               (* 2.0 (* y x))
                                               (* t (+ z z))))
                                            double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                            	double tmp;
                                            	if ((x <= -1.1e+63) || !(x <= 2.85e-118)) {
                                            		tmp = 2.0 * (y * x);
                                            	} else {
                                            		tmp = t * (z + z);
                                            	}
                                            	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, c, i)
                                            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), intent (in) :: c
                                                real(8), intent (in) :: i
                                                real(8) :: tmp
                                                if ((x <= (-1.1d+63)) .or. (.not. (x <= 2.85d-118))) then
                                                    tmp = 2.0d0 * (y * x)
                                                else
                                                    tmp = t * (z + z)
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
                                            	double tmp;
                                            	if ((x <= -1.1e+63) || !(x <= 2.85e-118)) {
                                            		tmp = 2.0 * (y * x);
                                            	} else {
                                            		tmp = t * (z + z);
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a, b, c, i):
                                            	tmp = 0
                                            	if (x <= -1.1e+63) or not (x <= 2.85e-118):
                                            		tmp = 2.0 * (y * x)
                                            	else:
                                            		tmp = t * (z + z)
                                            	return tmp
                                            
                                            function code(x, y, z, t, a, b, c, i)
                                            	tmp = 0.0
                                            	if ((x <= -1.1e+63) || !(x <= 2.85e-118))
                                            		tmp = Float64(2.0 * Float64(y * x));
                                            	else
                                            		tmp = Float64(t * Float64(z + z));
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a, b, c, i)
                                            	tmp = 0.0;
                                            	if ((x <= -1.1e+63) || ~((x <= 2.85e-118)))
                                            		tmp = 2.0 * (y * x);
                                            	else
                                            		tmp = t * (z + z);
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.1e+63], N[Not[LessEqual[x, 2.85e-118]], $MachinePrecision]], N[(2.0 * N[(y * x), $MachinePrecision]), $MachinePrecision], N[(t * N[(z + z), $MachinePrecision]), $MachinePrecision]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;x \leq -1.1 \cdot 10^{+63} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\
                                            \;\;\;\;2 \cdot \left(y \cdot x\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t \cdot \left(z + z\right)\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if x < -1.0999999999999999e63 or 2.85000000000000006e-118 < x

                                              1. Initial program 88.0%

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

                                                \[\leadsto \color{blue}{2 \cdot \left(x \cdot y\right)} \]
                                              4. Step-by-step derivation
                                                1. lower-*.f64N/A

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

                                                  \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                                                3. lower-*.f6444.3

                                                  \[\leadsto 2 \cdot \color{blue}{\left(y \cdot x\right)} \]
                                              5. Applied rewrites44.3%

                                                \[\leadsto \color{blue}{2 \cdot \left(y \cdot x\right)} \]

                                              if -1.0999999999999999e63 < x < 2.85000000000000006e-118

                                              1. Initial program 94.6%

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

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

                                                  \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                                                2. lower-*.f6440.9

                                                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                                              5. Applied rewrites40.9%

                                                \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites40.9%

                                                  \[\leadsto t \cdot \color{blue}{\left(z + z\right)} \]
                                              7. Recombined 2 regimes into one program.
                                              8. Final simplification42.9%

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.1 \cdot 10^{+63} \lor \neg \left(x \leq 2.85 \cdot 10^{-118}\right):\\ \;\;\;\;2 \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(z + z\right)\\ \end{array} \]
                                              9. Add Preprocessing

                                              Alternative 16: 29.5% accurate, 4.4× speedup?

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

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

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

                                                  \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                                                2. lower-*.f6428.3

                                                  \[\leadsto 2 \cdot \color{blue}{\left(t \cdot z\right)} \]
                                              5. Applied rewrites28.3%

                                                \[\leadsto \color{blue}{2 \cdot \left(t \cdot z\right)} \]
                                              6. Step-by-step derivation
                                                1. Applied rewrites28.3%

                                                  \[\leadsto t \cdot \color{blue}{\left(z + z\right)} \]
                                                2. Add Preprocessing

                                                Developer Target 1: 94.4% accurate, 1.0× speedup?

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

                                                Reproduce

                                                ?
                                                herbie shell --seed 2024360 
                                                (FPCore (x y z t a b c i)
                                                  :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, A"
                                                  :precision binary64
                                                
                                                  :alt
                                                  (! :herbie-platform default (* 2 (- (+ (* x y) (* z t)) (* (+ a (* b c)) (* c i)))))
                                                
                                                  (* 2.0 (- (+ (* x y) (* z t)) (* (* (+ a (* b c)) c) i))))