Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 69.7% → 99.5%
Time: 11.1s
Alternatives: 23
Speedup: 3.8×

Specification

?
\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (* (* 3.0 x1) x1))
       (t_1 (+ (* x1 x1) 1.0))
       (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
  (+
   x1
   (+
    (+
     (+
      (+
       (*
        (+
         (* (* (* 2.0 x1) t_2) (- t_2 3.0))
         (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
        t_1)
       (* t_0 t_2))
      (* (* x1 x1) x1))
     x1)
    (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
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(x1, x2)
use fmin_fmax_functions
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    t_0 = (3.0d0 * x1) * x1
    t_1 = (x1 * x1) + 1.0d0
    t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
    code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2):
	t_0 = (3.0 * x1) * x1
	t_1 = (x1 * x1) + 1.0
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2)
	t_0 = Float64(Float64(3.0 * x1) * x1)
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
	return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
end
function tmp = code(x1, x2)
	t_0 = (3.0 * x1) * x1;
	t_1 = (x1 * x1) + 1.0;
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (* (* 3.0 x1) x1))
       (t_1 (+ (* x1 x1) 1.0))
       (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
  (+
   x1
   (+
    (+
     (+
      (+
       (*
        (+
         (* (* (* 2.0 x1) t_2) (- t_2 3.0))
         (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
        t_1)
       (* t_0 t_2))
      (* (* x1 x1) x1))
     x1)
    (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))))
double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
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(x1, x2)
use fmin_fmax_functions
    real(8), intent (in) :: x1
    real(8), intent (in) :: x2
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    t_0 = (3.0d0 * x1) * x1
    t_1 = (x1 * x1) + 1.0d0
    t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
    code = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
end function
public static double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) + 1.0;
	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
}
def code(x1, x2):
	t_0 = (3.0 * x1) * x1
	t_1 = (x1 * x1) + 1.0
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
	return x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
function code(x1, x2)
	t_0 = Float64(Float64(3.0 * x1) * x1)
	t_1 = Float64(Float64(x1 * x1) + 1.0)
	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
	return Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
end
function tmp = code(x1, x2)
	t_0 = (3.0 * x1) * x1;
	t_1 = (x1 * x1) + 1.0;
	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
	tmp = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)
\end{array}

Alternative 1: 99.5% accurate, 0.5× speedup?

\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 - -1\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 2 \cdot x2 - 3\\ t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\ t_5 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_1}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_2 + t\_0 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(\left(1 - \frac{\frac{\left(x1 - t\_0\right) - \left(x2 + x2\right)}{-1 - x1 \cdot x1}}{3}\right) \cdot 3\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_1 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot t\_5 - t\_1 \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{t\_0 - \left(\left(x2 + x2\right) + x1\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_3\right)}{x1} + 4 \cdot t\_3\right)}{x1}}{x1}\right)\\ \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (* (* 3.0 x1) x1))
       (t_1 (- (* x1 x1) -1.0))
       (t_2 (+ (* x1 x1) 1.0))
       (t_3 (- (* 2.0 x2) 3.0))
       (t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_2))
       (t_5 (/ (+ (- (+ x2 x2) x1) t_0) t_1)))
  (if (<=
       (+
        x1
        (+
         (+
          (+
           (+
            (*
             (+
              (* (* (* 2.0 x1) t_4) (- t_4 3.0))
              (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
             t_2)
            (* t_0 t_4))
           (* (* x1 x1) x1))
          x1)
         (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_2))))
       INFINITY)
    (-
     (+
      (-
       (*
        (-
         (* (- (* 4.0 t_5) 6.0) (* x1 x1))
         (*
          (*
           (-
            1.0
            (/ (/ (- (- x1 t_0) (+ x2 x2)) (- -1.0 (* x1 x1))) 3.0))
           3.0)
          (* t_5 (+ x1 x1))))
        t_1)
       (- (* (* -3.0 (* x1 x1)) t_5) (* t_1 x1)))
      x1)
     (* -3.0 (/ (- t_0 (+ (+ x2 x2) x1)) t_1)))
    (*
     (pow x1 4.0)
     (+
      6.0
      (*
       -1.0
       (/
        (+
         3.0
         (*
          -1.0
          (/
           (+
            9.0
            (+
             (* -1.0 (/ (+ 1.0 (* -2.0 (+ 1.0 (* 3.0 t_3)))) x1))
             (* 4.0 t_3)))
           x1)))
        x1)))))))
double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) - -1.0;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = (2.0 * x2) - 3.0;
	double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
	double t_5 = (((x2 + x2) - x1) + t_0) / t_1;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - (((1.0 - ((((x1 - t_0) - (x2 + x2)) / (-1.0 - (x1 * x1))) / 3.0)) * 3.0) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1));
	} else {
		tmp = pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)));
	}
	return tmp;
}
public static double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) - -1.0;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = (2.0 * x2) - 3.0;
	double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
	double t_5 = (((x2 + x2) - x1) + t_0) / t_1;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= Double.POSITIVE_INFINITY) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - (((1.0 - ((((x1 - t_0) - (x2 + x2)) / (-1.0 - (x1 * x1))) / 3.0)) * 3.0) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1));
	} else {
		tmp = Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (3.0 * x1) * x1
	t_1 = (x1 * x1) - -1.0
	t_2 = (x1 * x1) + 1.0
	t_3 = (2.0 * x2) - 3.0
	t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2
	t_5 = (((x2 + x2) - x1) + t_0) / t_1
	tmp = 0
	if (x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= math.inf:
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - (((1.0 - ((((x1 - t_0) - (x2 + x2)) / (-1.0 - (x1 * x1))) / 3.0)) * 3.0) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1))
	else:
		tmp = math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(3.0 * x1) * x1)
	t_1 = Float64(Float64(x1 * x1) - -1.0)
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(Float64(2.0 * x2) - 3.0)
	t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_2)
	t_5 = Float64(Float64(Float64(Float64(x2 + x2) - x1) + t_0) / t_1)
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0))) * t_2) + Float64(t_0 * t_4)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * t_5) - 6.0) * Float64(x1 * x1)) - Float64(Float64(Float64(1.0 - Float64(Float64(Float64(Float64(x1 - t_0) - Float64(x2 + x2)) / Float64(-1.0 - Float64(x1 * x1))) / 3.0)) * 3.0) * Float64(t_5 * Float64(x1 + x1)))) * t_1) - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * t_5) - Float64(t_1 * x1))) + x1) - Float64(-3.0 * Float64(Float64(t_0 - Float64(Float64(x2 + x2) + x1)) / t_1)));
	else
		tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + Float64(Float64(-1.0 * Float64(Float64(1.0 + Float64(-2.0 * Float64(1.0 + Float64(3.0 * t_3)))) / x1)) + Float64(4.0 * t_3))) / x1))) / x1))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (3.0 * x1) * x1;
	t_1 = (x1 * x1) - -1.0;
	t_2 = (x1 * x1) + 1.0;
	t_3 = (2.0 * x2) - 3.0;
	t_4 = ((t_0 + (2.0 * x2)) - x1) / t_2;
	t_5 = (((x2 + x2) - x1) + t_0) / t_1;
	tmp = 0.0;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_2)))) <= Inf)
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - (((1.0 - ((((x1 - t_0) - (x2 + x2)) / (-1.0 - (x1 * x1))) / 3.0)) * 3.0) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1));
	else
		tmp = (x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision] + t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$0 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * t$95$5), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(1.0 - N[(N[(N[(N[(x1 - t$95$0), $MachinePrecision] - N[(x2 + x2), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[(x1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] * N[(t$95$5 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] - N[(t$95$1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(N[(t$95$0 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-1.0 * N[(N[(3.0 + N[(-1.0 * N[(N[(9.0 + N[(N[(-1.0 * N[(N[(1.0 + N[(-2.0 * N[(1.0 + N[(3.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 - -1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 2 \cdot x2 - 3\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_1}\\
\mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_2 + t\_0 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(\left(1 - \frac{\frac{\left(x1 - t\_0\right) - \left(x2 + x2\right)}{-1 - x1 \cdot x1}}{3}\right) \cdot 3\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_1 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot t\_5 - t\_1 \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{t\_0 - \left(\left(x2 + x2\right) + x1\right)}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_3\right)}{x1} + 4 \cdot t\_3\right)}{x1}}{x1}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Applied rewrites69.8%

      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
    3. Applied rewrites69.8%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \color{blue}{\left(\left(1 - \frac{\frac{\left(x1 - \left(3 \cdot x1\right) \cdot x1\right) - \left(x2 + x2\right)}{-1 - x1 \cdot x1}}{3}\right) \cdot 3\right)} \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

    if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Taylor expanded in x1 around -inf

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
    3. Applied rewrites49.1%

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 99.5% accurate, 0.5× speedup?

\[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 - -1\\ t_2 := 2 \cdot x2 - 3\\ t_3 := x1 \cdot x1 + 1\\ t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_3}\\ t_5 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_1}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_3 + t\_0 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_3}\right) \leq \infty:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_1 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot t\_5 - t\_1 \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{t\_0 - \left(\left(x2 + x2\right) + x1\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_2\right)}{x1} + 4 \cdot t\_2\right)}{x1}}{x1}\right)\\ \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (* (* 3.0 x1) x1))
       (t_1 (- (* x1 x1) -1.0))
       (t_2 (- (* 2.0 x2) 3.0))
       (t_3 (+ (* x1 x1) 1.0))
       (t_4 (/ (- (+ t_0 (* 2.0 x2)) x1) t_3))
       (t_5 (/ (+ (- (+ x2 x2) x1) t_0) t_1)))
  (if (<=
       (+
        x1
        (+
         (+
          (+
           (+
            (*
             (+
              (* (* (* 2.0 x1) t_4) (- t_4 3.0))
              (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
             t_3)
            (* t_0 t_4))
           (* (* x1 x1) x1))
          x1)
         (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_3))))
       INFINITY)
    (-
     (+
      (-
       (*
        (-
         (* (- (* 4.0 t_5) 6.0) (* x1 x1))
         (* (- 3.0 t_5) (* t_5 (+ x1 x1))))
        t_1)
       (- (* (* -3.0 (* x1 x1)) t_5) (* t_1 x1)))
      x1)
     (* -3.0 (/ (- t_0 (+ (+ x2 x2) x1)) t_1)))
    (*
     (pow x1 4.0)
     (+
      6.0
      (*
       -1.0
       (/
        (+
         3.0
         (*
          -1.0
          (/
           (+
            9.0
            (+
             (* -1.0 (/ (+ 1.0 (* -2.0 (+ 1.0 (* 3.0 t_2)))) x1))
             (* 4.0 t_2)))
           x1)))
        x1)))))))
double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) - -1.0;
	double t_2 = (2.0 * x2) - 3.0;
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3;
	double t_5 = (((x2 + x2) - x1) + t_0) / t_1;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)))) <= ((double) INFINITY)) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1));
	} else {
		tmp = pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_2)))) / x1)) + (4.0 * t_2))) / x1))) / x1)));
	}
	return tmp;
}
public static double code(double x1, double x2) {
	double t_0 = (3.0 * x1) * x1;
	double t_1 = (x1 * x1) - -1.0;
	double t_2 = (2.0 * x2) - 3.0;
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3;
	double t_5 = (((x2 + x2) - x1) + t_0) / t_1;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)))) <= Double.POSITIVE_INFINITY) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1));
	} else {
		tmp = Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_2)))) / x1)) + (4.0 * t_2))) / x1))) / x1)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (3.0 * x1) * x1
	t_1 = (x1 * x1) - -1.0
	t_2 = (2.0 * x2) - 3.0
	t_3 = (x1 * x1) + 1.0
	t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3
	t_5 = (((x2 + x2) - x1) + t_0) / t_1
	tmp = 0
	if (x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)))) <= math.inf:
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1))
	else:
		tmp = math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_2)))) / x1)) + (4.0 * t_2))) / x1))) / x1)))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(3.0 * x1) * x1)
	t_1 = Float64(Float64(x1 * x1) - -1.0)
	t_2 = Float64(Float64(2.0 * x2) - 3.0)
	t_3 = Float64(Float64(x1 * x1) + 1.0)
	t_4 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_3)
	t_5 = Float64(Float64(Float64(Float64(x2 + x2) - x1) + t_0) / t_1)
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0))) * t_3) + Float64(t_0 * t_4)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_3)))) <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * t_5) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - t_5) * Float64(t_5 * Float64(x1 + x1)))) * t_1) - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * t_5) - Float64(t_1 * x1))) + x1) - Float64(-3.0 * Float64(Float64(t_0 - Float64(Float64(x2 + x2) + x1)) / t_1)));
	else
		tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + Float64(Float64(-1.0 * Float64(Float64(1.0 + Float64(-2.0 * Float64(1.0 + Float64(3.0 * t_2)))) / x1)) + Float64(4.0 * t_2))) / x1))) / x1))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (3.0 * x1) * x1;
	t_1 = (x1 * x1) - -1.0;
	t_2 = (2.0 * x2) - 3.0;
	t_3 = (x1 * x1) + 1.0;
	t_4 = ((t_0 + (2.0 * x2)) - x1) / t_3;
	t_5 = (((x2 + x2) - x1) + t_0) / t_1;
	tmp = 0.0;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_0 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_3)))) <= Inf)
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (((-3.0 * (x1 * x1)) * t_5) - (t_1 * x1))) + x1) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / t_1));
	else
		tmp = (x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_2)))) / x1)) + (4.0 * t_2))) / x1))) / x1)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision] + t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(t$95$0 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * t$95$5), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - t$95$5), $MachinePrecision] * N[(t$95$5 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision] - N[(t$95$1 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(N[(t$95$0 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-1.0 * N[(N[(3.0 + N[(-1.0 * N[(N[(9.0 + N[(N[(-1.0 * N[(N[(1.0 + N[(-2.0 * N[(1.0 + N[(3.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := \left(3 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 - -1\\
t_2 := 2 \cdot x2 - 3\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_1}\\
\mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_3 + t\_0 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_3}\right) \leq \infty:\\
\;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_1 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot t\_5 - t\_1 \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{t\_0 - \left(\left(x2 + x2\right) + x1\right)}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_2\right)}{x1} + 4 \cdot t\_2\right)}{x1}}{x1}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Applied rewrites69.8%

      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]

    if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Taylor expanded in x1 around -inf

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
    3. Applied rewrites49.1%

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 98.7% accurate, 0.6× speedup?

\[\begin{array}{l} t_0 := 2 \cdot x2 - 3\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := x1 \cdot x1 - -1\\ t_3 := x1 \cdot x1 + 1\\ t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\ t_5 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_1}{t\_2}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_3 + t\_1 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right) \leq \infty:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_2 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_1 - \left(\left(x2 + x2\right) + x1\right)}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_0\right)}{x1} + 4 \cdot t\_0\right)}{x1}}{x1}\right)\\ \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (- (* 2.0 x2) 3.0))
       (t_1 (* (* 3.0 x1) x1))
       (t_2 (- (* x1 x1) -1.0))
       (t_3 (+ (* x1 x1) 1.0))
       (t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_3))
       (t_5 (/ (+ (- (+ x2 x2) x1) t_1) t_2)))
  (if (<=
       (+
        x1
        (+
         (+
          (+
           (+
            (*
             (+
              (* (* (* 2.0 x1) t_4) (- t_4 3.0))
              (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
             t_3)
            (* t_1 t_4))
           (* (* x1 x1) x1))
          x1)
         (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_3))))
       INFINITY)
    (-
     (+
      (-
       (*
        (-
         (* (- (* 4.0 t_5) 6.0) (* x1 x1))
         (* (- 3.0 t_5) (* t_5 (+ x1 x1))))
        t_2)
       (* -1.0 x1))
      x1)
     (* -3.0 (/ (- t_1 (+ (+ x2 x2) x1)) t_2)))
    (*
     (pow x1 4.0)
     (+
      6.0
      (*
       -1.0
       (/
        (+
         3.0
         (*
          -1.0
          (/
           (+
            9.0
            (+
             (* -1.0 (/ (+ 1.0 (* -2.0 (+ 1.0 (* 3.0 t_0)))) x1))
             (* 4.0 t_0)))
           x1)))
        x1)))))))
double code(double x1, double x2) {
	double t_0 = (2.0 * x2) - 3.0;
	double t_1 = (3.0 * x1) * x1;
	double t_2 = (x1 * x1) - -1.0;
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
	double t_5 = (((x2 + x2) - x1) + t_1) / t_2;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)))) <= ((double) INFINITY)) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_2) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_2));
	} else {
		tmp = pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)));
	}
	return tmp;
}
public static double code(double x1, double x2) {
	double t_0 = (2.0 * x2) - 3.0;
	double t_1 = (3.0 * x1) * x1;
	double t_2 = (x1 * x1) - -1.0;
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
	double t_5 = (((x2 + x2) - x1) + t_1) / t_2;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)))) <= Double.POSITIVE_INFINITY) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_2) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_2));
	} else {
		tmp = Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (2.0 * x2) - 3.0
	t_1 = (3.0 * x1) * x1
	t_2 = (x1 * x1) - -1.0
	t_3 = (x1 * x1) + 1.0
	t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3
	t_5 = (((x2 + x2) - x1) + t_1) / t_2
	tmp = 0
	if (x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)))) <= math.inf:
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_2) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_2))
	else:
		tmp = math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(2.0 * x2) - 3.0)
	t_1 = Float64(Float64(3.0 * x1) * x1)
	t_2 = Float64(Float64(x1 * x1) - -1.0)
	t_3 = Float64(Float64(x1 * x1) + 1.0)
	t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_3)
	t_5 = Float64(Float64(Float64(Float64(x2 + x2) - x1) + t_1) / t_2)
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0))) * t_3) + Float64(t_1 * t_4)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_3)))) <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * t_5) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - t_5) * Float64(t_5 * Float64(x1 + x1)))) * t_2) - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(Float64(t_1 - Float64(Float64(x2 + x2) + x1)) / t_2)));
	else
		tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + Float64(Float64(-1.0 * Float64(Float64(1.0 + Float64(-2.0 * Float64(1.0 + Float64(3.0 * t_0)))) / x1)) + Float64(4.0 * t_0))) / x1))) / x1))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (2.0 * x2) - 3.0;
	t_1 = (3.0 * x1) * x1;
	t_2 = (x1 * x1) - -1.0;
	t_3 = (x1 * x1) + 1.0;
	t_4 = ((t_1 + (2.0 * x2)) - x1) / t_3;
	t_5 = (((x2 + x2) - x1) + t_1) / t_2;
	tmp = 0.0;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_3)))) <= Inf)
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_2) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_2));
	else
		tmp = (x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * t$95$5), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - t$95$5), $MachinePrecision] * N[(t$95$5 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(N[(t$95$1 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-1.0 * N[(N[(3.0 + N[(-1.0 * N[(N[(9.0 + N[(N[(-1.0 * N[(N[(1.0 + N[(-2.0 * N[(1.0 + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := \left(3 \cdot x1\right) \cdot x1\\
t_2 := x1 \cdot x1 - -1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_1}{t\_2}\\
\mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_3 + t\_1 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right) \leq \infty:\\
\;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_2 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_1 - \left(\left(x2 + x2\right) + x1\right)}{t\_2}\\

\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_0\right)}{x1} + 4 \cdot t\_0\right)}{x1}}{x1}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Applied rewrites69.8%

      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
    3. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    4. Step-by-step derivation
      1. lower-*.f6473.1%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    5. Applied rewrites73.1%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

    if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Taylor expanded in x1 around -inf

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
    3. Applied rewrites49.1%

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 98.4% accurate, 0.6× speedup?

\[\begin{array}{l} t_0 := 2 \cdot x2 - 3\\ t_1 := x1 \cdot x1 - -1\\ t_2 := \left(3 \cdot x1\right) \cdot x1\\ t_3 := x1 \cdot x1 + 1\\ t_4 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_3}\\ t_5 := \frac{2 \cdot x2 + t\_2}{t\_1}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_3 + t\_2 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_3}\right) \leq \infty:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_1 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2 - \left(\left(x2 + x2\right) + x1\right)}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_0\right)}{x1} + 4 \cdot t\_0\right)}{x1}}{x1}\right)\\ \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (- (* 2.0 x2) 3.0))
       (t_1 (- (* x1 x1) -1.0))
       (t_2 (* (* 3.0 x1) x1))
       (t_3 (+ (* x1 x1) 1.0))
       (t_4 (/ (- (+ t_2 (* 2.0 x2)) x1) t_3))
       (t_5 (/ (+ (* 2.0 x2) t_2) t_1)))
  (if (<=
       (+
        x1
        (+
         (+
          (+
           (+
            (*
             (+
              (* (* (* 2.0 x1) t_4) (- t_4 3.0))
              (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
             t_3)
            (* t_2 t_4))
           (* (* x1 x1) x1))
          x1)
         (* 3.0 (/ (- (- t_2 (* 2.0 x2)) x1) t_3))))
       INFINITY)
    (-
     (+
      (-
       (*
        (-
         (* (- (* 4.0 t_5) 6.0) (* x1 x1))
         (* (- 3.0 t_5) (* t_5 (+ x1 x1))))
        t_1)
       (* -1.0 x1))
      x1)
     (* -3.0 (/ (- t_2 (+ (+ x2 x2) x1)) t_1)))
    (*
     (pow x1 4.0)
     (+
      6.0
      (*
       -1.0
       (/
        (+
         3.0
         (*
          -1.0
          (/
           (+
            9.0
            (+
             (* -1.0 (/ (+ 1.0 (* -2.0 (+ 1.0 (* 3.0 t_0)))) x1))
             (* 4.0 t_0)))
           x1)))
        x1)))))))
double code(double x1, double x2) {
	double t_0 = (2.0 * x2) - 3.0;
	double t_1 = (x1 * x1) - -1.0;
	double t_2 = (3.0 * x1) * x1;
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3;
	double t_5 = ((2.0 * x2) + t_2) / t_1;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_2 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)))) <= ((double) INFINITY)) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (-1.0 * x1)) + x1) - (-3.0 * ((t_2 - ((x2 + x2) + x1)) / t_1));
	} else {
		tmp = pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)));
	}
	return tmp;
}
public static double code(double x1, double x2) {
	double t_0 = (2.0 * x2) - 3.0;
	double t_1 = (x1 * x1) - -1.0;
	double t_2 = (3.0 * x1) * x1;
	double t_3 = (x1 * x1) + 1.0;
	double t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3;
	double t_5 = ((2.0 * x2) + t_2) / t_1;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_2 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)))) <= Double.POSITIVE_INFINITY) {
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (-1.0 * x1)) + x1) - (-3.0 * ((t_2 - ((x2 + x2) + x1)) / t_1));
	} else {
		tmp = Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (2.0 * x2) - 3.0
	t_1 = (x1 * x1) - -1.0
	t_2 = (3.0 * x1) * x1
	t_3 = (x1 * x1) + 1.0
	t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3
	t_5 = ((2.0 * x2) + t_2) / t_1
	tmp = 0
	if (x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_2 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)))) <= math.inf:
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (-1.0 * x1)) + x1) - (-3.0 * ((t_2 - ((x2 + x2) + x1)) / t_1))
	else:
		tmp = math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(2.0 * x2) - 3.0)
	t_1 = Float64(Float64(x1 * x1) - -1.0)
	t_2 = Float64(Float64(3.0 * x1) * x1)
	t_3 = Float64(Float64(x1 * x1) + 1.0)
	t_4 = Float64(Float64(Float64(t_2 + Float64(2.0 * x2)) - x1) / t_3)
	t_5 = Float64(Float64(Float64(2.0 * x2) + t_2) / t_1)
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0))) * t_3) + Float64(t_2 * t_4)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_2 - Float64(2.0 * x2)) - x1) / t_3)))) <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * t_5) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - t_5) * Float64(t_5 * Float64(x1 + x1)))) * t_1) - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(Float64(t_2 - Float64(Float64(x2 + x2) + x1)) / t_1)));
	else
		tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + Float64(Float64(-1.0 * Float64(Float64(1.0 + Float64(-2.0 * Float64(1.0 + Float64(3.0 * t_0)))) / x1)) + Float64(4.0 * t_0))) / x1))) / x1))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (2.0 * x2) - 3.0;
	t_1 = (x1 * x1) - -1.0;
	t_2 = (3.0 * x1) * x1;
	t_3 = (x1 * x1) + 1.0;
	t_4 = ((t_2 + (2.0 * x2)) - x1) / t_3;
	t_5 = ((2.0 * x2) + t_2) / t_1;
	tmp = 0.0;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_3) + (t_2 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_2 - (2.0 * x2)) - x1) / t_3)))) <= Inf)
		tmp = (((((((4.0 * t_5) - 6.0) * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_1) - (-1.0 * x1)) + x1) - (-3.0 * ((t_2 - ((x2 + x2) + x1)) / t_1));
	else
		tmp = (x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$2 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$2), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] + N[(t$95$2 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$2 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * t$95$5), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - t$95$5), $MachinePrecision] * N[(t$95$5 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(N[(t$95$2 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-1.0 * N[(N[(3.0 + N[(-1.0 * N[(N[(9.0 + N[(N[(-1.0 * N[(N[(1.0 + N[(-2.0 * N[(1.0 + N[(3.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := 2 \cdot x2 - 3\\
t_1 := x1 \cdot x1 - -1\\
t_2 := \left(3 \cdot x1\right) \cdot x1\\
t_3 := x1 \cdot x1 + 1\\
t_4 := \frac{\left(t\_2 + 2 \cdot x2\right) - x1}{t\_3}\\
t_5 := \frac{2 \cdot x2 + t\_2}{t\_1}\\
\mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_3 + t\_2 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_2 - 2 \cdot x2\right) - x1}{t\_3}\right) \leq \infty:\\
\;\;\;\;\left(\left(\left(\left(4 \cdot t\_5 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_1 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2 - \left(\left(x2 + x2\right) + x1\right)}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_0\right)}{x1} + 4 \cdot t\_0\right)}{x1}}{x1}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Applied rewrites69.8%

      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
    3. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    4. Step-by-step derivation
      1. lower-*.f6473.1%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    5. Applied rewrites73.1%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    6. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    7. Step-by-step derivation
      1. lower-*.f6473.0%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    8. Applied rewrites73.0%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    9. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    10. Step-by-step derivation
      1. lower-*.f6473.0%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    11. Applied rewrites73.0%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    12. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    13. Step-by-step derivation
      1. lower-*.f6472.8%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    14. Applied rewrites72.8%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

    if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Taylor expanded in x1 around -inf

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
    3. Applied rewrites49.1%

      \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 97.0% accurate, 0.6× speedup?

\[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := x1 \cdot x1 + 1\\ t_3 := 2 \cdot x2 - 3\\ t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\ t_5 := \frac{2 \cdot x2 + t\_1}{t\_0}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_2 + t\_1 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\ \;\;\;\;\left(\left(\left(6 \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_1 - \left(\left(x2 + x2\right) + x1\right)}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_3\right)}{x1} + 4 \cdot t\_3\right)}{x1}}{x1}\right)\\ \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (- (* x1 x1) -1.0))
       (t_1 (* (* 3.0 x1) x1))
       (t_2 (+ (* x1 x1) 1.0))
       (t_3 (- (* 2.0 x2) 3.0))
       (t_4 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
       (t_5 (/ (+ (* 2.0 x2) t_1) t_0)))
  (if (<=
       (+
        x1
        (+
         (+
          (+
           (+
            (*
             (+
              (* (* (* 2.0 x1) t_4) (- t_4 3.0))
              (* (* x1 x1) (- (* 4.0 t_4) 6.0)))
             t_2)
            (* t_1 t_4))
           (* (* x1 x1) x1))
          x1)
         (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2))))
       INFINITY)
    (-
     (+
      (-
       (* (- (* 6.0 (* x1 x1)) (* (- 3.0 t_5) (* t_5 (+ x1 x1)))) t_0)
       (* -1.0 x1))
      x1)
     (* -3.0 (/ (- t_1 (+ (+ x2 x2) x1)) t_0)))
    (*
     (pow x1 4.0)
     (+
      6.0
      (*
       -1.0
       (/
        (+
         3.0
         (*
          -1.0
          (/
           (+
            9.0
            (+
             (* -1.0 (/ (+ 1.0 (* -2.0 (+ 1.0 (* 3.0 t_3)))) x1))
             (* 4.0 t_3)))
           x1)))
        x1)))))))
double code(double x1, double x2) {
	double t_0 = (x1 * x1) - -1.0;
	double t_1 = (3.0 * x1) * x1;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = (2.0 * x2) - 3.0;
	double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	double t_5 = ((2.0 * x2) + t_1) / t_0;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= ((double) INFINITY)) {
		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_0));
	} else {
		tmp = pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)));
	}
	return tmp;
}
public static double code(double x1, double x2) {
	double t_0 = (x1 * x1) - -1.0;
	double t_1 = (3.0 * x1) * x1;
	double t_2 = (x1 * x1) + 1.0;
	double t_3 = (2.0 * x2) - 3.0;
	double t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	double t_5 = ((2.0 * x2) + t_1) / t_0;
	double tmp;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Double.POSITIVE_INFINITY) {
		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_0));
	} else {
		tmp = Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)));
	}
	return tmp;
}
def code(x1, x2):
	t_0 = (x1 * x1) - -1.0
	t_1 = (3.0 * x1) * x1
	t_2 = (x1 * x1) + 1.0
	t_3 = (2.0 * x2) - 3.0
	t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2
	t_5 = ((2.0 * x2) + t_1) / t_0
	tmp = 0
	if (x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= math.inf:
		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_0))
	else:
		tmp = math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)))
	return tmp
function code(x1, x2)
	t_0 = Float64(Float64(x1 * x1) - -1.0)
	t_1 = Float64(Float64(3.0 * x1) * x1)
	t_2 = Float64(Float64(x1 * x1) + 1.0)
	t_3 = Float64(Float64(2.0 * x2) - 3.0)
	t_4 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)
	t_5 = Float64(Float64(Float64(2.0 * x2) + t_1) / t_0)
	tmp = 0.0
	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_4) * Float64(t_4 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_4) - 6.0))) * t_2) + Float64(t_1 * t_4)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2)))) <= Inf)
		tmp = Float64(Float64(Float64(Float64(Float64(Float64(6.0 * Float64(x1 * x1)) - Float64(Float64(3.0 - t_5) * Float64(t_5 * Float64(x1 + x1)))) * t_0) - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(Float64(t_1 - Float64(Float64(x2 + x2) + x1)) / t_0)));
	else
		tmp = Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + Float64(Float64(-1.0 * Float64(Float64(1.0 + Float64(-2.0 * Float64(1.0 + Float64(3.0 * t_3)))) / x1)) + Float64(4.0 * t_3))) / x1))) / x1))));
	end
	return tmp
end
function tmp_2 = code(x1, x2)
	t_0 = (x1 * x1) - -1.0;
	t_1 = (3.0 * x1) * x1;
	t_2 = (x1 * x1) + 1.0;
	t_3 = (2.0 * x2) - 3.0;
	t_4 = ((t_1 + (2.0 * x2)) - x1) / t_2;
	t_5 = ((2.0 * x2) + t_1) / t_0;
	tmp = 0.0;
	if ((x1 + (((((((((2.0 * x1) * t_4) * (t_4 - 3.0)) + ((x1 * x1) * ((4.0 * t_4) - 6.0))) * t_2) + (t_1 * t_4)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))) <= Inf)
		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_5) * (t_5 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * ((t_1 - ((x2 + x2) + x1)) / t_0));
	else
		tmp = (x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((1.0 + (-2.0 * (1.0 + (3.0 * t_3)))) / x1)) + (4.0 * t_3))) / x1))) / x1)));
	end
	tmp_2 = tmp;
end
code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$4), $MachinePrecision] * N[(t$95$4 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$4), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$1 * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[(N[(N[(6.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - t$95$5), $MachinePrecision] * N[(t$95$5 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(N[(t$95$1 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[x1, 4.0], $MachinePrecision] * N[(6.0 + N[(-1.0 * N[(N[(3.0 + N[(-1.0 * N[(N[(9.0 + N[(N[(-1.0 * N[(N[(1.0 + N[(-2.0 * N[(1.0 + N[(3.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(4.0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_0 := x1 \cdot x1 - -1\\
t_1 := \left(3 \cdot x1\right) \cdot x1\\
t_2 := x1 \cdot x1 + 1\\
t_3 := 2 \cdot x2 - 3\\
t_4 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
t_5 := \frac{2 \cdot x2 + t\_1}{t\_0}\\
\mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_4\right) \cdot \left(t\_4 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_4 - 6\right)\right) \cdot t\_2 + t\_1 \cdot t\_4\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right) \leq \infty:\\
\;\;\;\;\left(\left(\left(6 \cdot \left(x1 \cdot x1\right) - \left(3 - t\_5\right) \cdot \left(t\_5 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_1 - \left(\left(x2 + x2\right) + x1\right)}{t\_0}\\

\mathbf{else}:\\
\;\;\;\;{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot t\_3\right)}{x1} + 4 \cdot t\_3\right)}{x1}}{x1}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

    1. Initial program 69.7%

      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
    2. Applied rewrites69.8%

      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
    3. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    4. Step-by-step derivation
      1. lower-*.f6473.1%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    5. Applied rewrites73.1%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    6. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    7. Step-by-step derivation
      1. lower-*.f6473.0%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    8. Applied rewrites73.0%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    9. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    10. Step-by-step derivation
      1. lower-*.f6473.0%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    11. Applied rewrites73.0%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    12. Taylor expanded in x1 around 0

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    13. Step-by-step derivation
      1. lower-*.f6472.8%

        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    14. Applied rewrites72.8%

      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    15. Taylor expanded in x1 around inf

      \[\leadsto \left(\left(\left(\color{blue}{6} \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
    16. Step-by-step derivation
      1. Applied rewrites71.2%

        \[\leadsto \left(\left(\left(\color{blue}{6} \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

      if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

      1. Initial program 69.7%

        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. Taylor expanded in x1 around -inf

        \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
      3. Applied rewrites49.1%

        \[\leadsto \color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{1 + -2 \cdot \left(1 + 3 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1} + 4 \cdot \left(2 \cdot x2 - 3\right)\right)}{x1}}{x1}\right)} \]
    17. Recombined 2 regimes into one program.
    18. Add Preprocessing

    Alternative 6: 96.7% accurate, 1.6× speedup?

    \[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := \frac{2 \cdot x2 + t\_1}{t\_0}\\ t_3 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\ \mathbf{if}\;x1 \leq -5 \cdot 10^{+153}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_3}{1}\\ \mathbf{elif}\;x1 \leq 5 \cdot 10^{+127}:\\ \;\;\;\;\left(\left(\left(6 \cdot \left(x1 \cdot x1\right) - \left(3 - t\_2\right) \cdot \left(t\_2 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_3}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\ \end{array} \]
    (FPCore (x1 x2)
      :precision binary64
      (let* ((t_0 (- (* x1 x1) -1.0))
           (t_1 (* (* 3.0 x1) x1))
           (t_2 (/ (+ (* 2.0 x2) t_1) t_0))
           (t_3 (- t_1 (+ (+ x2 x2) x1))))
      (if (<= x1 -5e+153)
        (- (* x1 2.0) (* -3.0 (/ t_3 1.0)))
        (if (<= x1 5e+127)
          (-
           (+
            (-
             (*
              (- (* 6.0 (* x1 x1)) (* (- 3.0 t_2) (* t_2 (+ x1 x1))))
              t_0)
             (* -1.0 x1))
            x1)
           (* -3.0 (/ t_3 t_0)))
          (-
           (+
            (-
             (*
              (-
               (* (- (* 4.0 3.0) 6.0) (* x1 x1))
               (* (- 3.0 3.0) (* 3.0 (+ x1 x1))))
              t_0)
             (- (* (* -3.0 (* x1 x1)) 3.0) (* t_0 x1)))
            x1)
           -9.0)))))
    double code(double x1, double x2) {
    	double t_0 = (x1 * x1) - -1.0;
    	double t_1 = (3.0 * x1) * x1;
    	double t_2 = ((2.0 * x2) + t_1) / t_0;
    	double t_3 = t_1 - ((x2 + x2) + x1);
    	double tmp;
    	if (x1 <= -5e+153) {
    		tmp = (x1 * 2.0) - (-3.0 * (t_3 / 1.0));
    	} else if (x1 <= 5e+127) {
    		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_2) * (t_2 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_3 / t_0));
    	} else {
    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.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(x1, x2)
    use fmin_fmax_functions
        real(8), intent (in) :: x1
        real(8), intent (in) :: x2
        real(8) :: t_0
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: t_3
        real(8) :: tmp
        t_0 = (x1 * x1) - (-1.0d0)
        t_1 = (3.0d0 * x1) * x1
        t_2 = ((2.0d0 * x2) + t_1) / t_0
        t_3 = t_1 - ((x2 + x2) + x1)
        if (x1 <= (-5d+153)) then
            tmp = (x1 * 2.0d0) - ((-3.0d0) * (t_3 / 1.0d0))
        else if (x1 <= 5d+127) then
            tmp = (((((6.0d0 * (x1 * x1)) - ((3.0d0 - t_2) * (t_2 * (x1 + x1)))) * t_0) - ((-1.0d0) * x1)) + x1) - ((-3.0d0) * (t_3 / t_0))
        else
            tmp = (((((((4.0d0 * 3.0d0) - 6.0d0) * (x1 * x1)) - ((3.0d0 - 3.0d0) * (3.0d0 * (x1 + x1)))) * t_0) - ((((-3.0d0) * (x1 * x1)) * 3.0d0) - (t_0 * x1))) + x1) - (-9.0d0)
        end if
        code = tmp
    end function
    
    public static double code(double x1, double x2) {
    	double t_0 = (x1 * x1) - -1.0;
    	double t_1 = (3.0 * x1) * x1;
    	double t_2 = ((2.0 * x2) + t_1) / t_0;
    	double t_3 = t_1 - ((x2 + x2) + x1);
    	double tmp;
    	if (x1 <= -5e+153) {
    		tmp = (x1 * 2.0) - (-3.0 * (t_3 / 1.0));
    	} else if (x1 <= 5e+127) {
    		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_2) * (t_2 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_3 / t_0));
    	} else {
    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
    	}
    	return tmp;
    }
    
    def code(x1, x2):
    	t_0 = (x1 * x1) - -1.0
    	t_1 = (3.0 * x1) * x1
    	t_2 = ((2.0 * x2) + t_1) / t_0
    	t_3 = t_1 - ((x2 + x2) + x1)
    	tmp = 0
    	if x1 <= -5e+153:
    		tmp = (x1 * 2.0) - (-3.0 * (t_3 / 1.0))
    	elif x1 <= 5e+127:
    		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_2) * (t_2 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_3 / t_0))
    	else:
    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0
    	return tmp
    
    function code(x1, x2)
    	t_0 = Float64(Float64(x1 * x1) - -1.0)
    	t_1 = Float64(Float64(3.0 * x1) * x1)
    	t_2 = Float64(Float64(Float64(2.0 * x2) + t_1) / t_0)
    	t_3 = Float64(t_1 - Float64(Float64(x2 + x2) + x1))
    	tmp = 0.0
    	if (x1 <= -5e+153)
    		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(t_3 / 1.0)));
    	elseif (x1 <= 5e+127)
    		tmp = Float64(Float64(Float64(Float64(Float64(Float64(6.0 * Float64(x1 * x1)) - Float64(Float64(3.0 - t_2) * Float64(t_2 * Float64(x1 + x1)))) * t_0) - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(t_3 / t_0)));
    	else
    		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * 3.0) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - 3.0) * Float64(3.0 * Float64(x1 + x1)))) * t_0) - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * 3.0) - Float64(t_0 * x1))) + x1) - -9.0);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x1, x2)
    	t_0 = (x1 * x1) - -1.0;
    	t_1 = (3.0 * x1) * x1;
    	t_2 = ((2.0 * x2) + t_1) / t_0;
    	t_3 = t_1 - ((x2 + x2) + x1);
    	tmp = 0.0;
    	if (x1 <= -5e+153)
    		tmp = (x1 * 2.0) - (-3.0 * (t_3 / 1.0));
    	elseif (x1 <= 5e+127)
    		tmp = (((((6.0 * (x1 * x1)) - ((3.0 - t_2) * (t_2 * (x1 + x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_3 / t_0));
    	else
    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -5e+153], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(t$95$3 / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 5e+127], N[(N[(N[(N[(N[(N[(6.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - t$95$2), $MachinePrecision] * N[(t$95$2 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(t$95$3 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * 3.0), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] - N[(t$95$0 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - -9.0), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    t_0 := x1 \cdot x1 - -1\\
    t_1 := \left(3 \cdot x1\right) \cdot x1\\
    t_2 := \frac{2 \cdot x2 + t\_1}{t\_0}\\
    t_3 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\
    \mathbf{if}\;x1 \leq -5 \cdot 10^{+153}:\\
    \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_3}{1}\\
    
    \mathbf{elif}\;x1 \leq 5 \cdot 10^{+127}:\\
    \;\;\;\;\left(\left(\left(6 \cdot \left(x1 \cdot x1\right) - \left(3 - t\_2\right) \cdot \left(t\_2 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_3}{t\_0}\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x1 < -5.0000000000000002e153

      1. Initial program 69.7%

        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
      2. Applied rewrites69.8%

        \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
      3. Taylor expanded in x1 around 0

        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
      4. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
        2. lower-+.f64N/A

          \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
        3. lower-*.f64N/A

          \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
        4. lower-*.f64N/A

          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
        5. lower--.f64N/A

          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
        6. lower-*.f6448.5%

          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
      5. Applied rewrites48.5%

        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
      6. Taylor expanded in x1 around 0

        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
      7. Step-by-step derivation
        1. Applied rewrites68.9%

          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
        2. Taylor expanded in x2 around 0

          \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
        3. Step-by-step derivation
          1. Applied rewrites63.4%

            \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

          if -5.0000000000000002e153 < x1 < 5.0000000000000004e127

          1. Initial program 69.7%

            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
          2. Applied rewrites69.8%

            \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
          3. Taylor expanded in x1 around 0

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          4. Step-by-step derivation
            1. lower-*.f6473.1%

              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          5. Applied rewrites73.1%

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          6. Taylor expanded in x1 around 0

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          7. Step-by-step derivation
            1. lower-*.f6473.0%

              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          8. Applied rewrites73.0%

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          9. Taylor expanded in x1 around 0

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          10. Step-by-step derivation
            1. lower-*.f6473.0%

              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          11. Applied rewrites73.0%

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          12. Taylor expanded in x1 around 0

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          13. Step-by-step derivation
            1. lower-*.f6472.8%

              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          14. Applied rewrites72.8%

            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          15. Taylor expanded in x1 around inf

            \[\leadsto \left(\left(\left(\color{blue}{6} \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
          16. Step-by-step derivation
            1. Applied rewrites71.2%

              \[\leadsto \left(\left(\left(\color{blue}{6} \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

            if 5.0000000000000004e127 < x1

            1. Initial program 69.7%

              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
            2. Applied rewrites69.8%

              \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
            3. Taylor expanded in x1 around inf

              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
            4. Step-by-step derivation
              1. Applied rewrites34.1%

                \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
              2. Taylor expanded in x1 around inf

                \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
              3. Step-by-step derivation
                1. Applied rewrites32.4%

                  \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                2. Taylor expanded in x1 around inf

                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                3. Step-by-step derivation
                  1. Applied rewrites16.7%

                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                  2. Taylor expanded in x1 around inf

                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                  3. Step-by-step derivation
                    1. Applied rewrites16.8%

                      \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                    2. Taylor expanded in x1 around inf

                      \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                    3. Step-by-step derivation
                      1. Applied rewrites29.1%

                        \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                    4. Recombined 3 regimes into one program.
                    5. Add Preprocessing

                    Alternative 7: 93.6% accurate, 1.7× speedup?

                    \[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\ \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\ \mathbf{elif}\;x1 \leq -28000:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + t\_1}{t\_0} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\ \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\ \end{array} \]
                    (FPCore (x1 x2)
                      :precision binary64
                      (let* ((t_0 (- (* x1 x1) -1.0))
                           (t_1 (* (* 3.0 x1) x1))
                           (t_2 (- t_1 (+ (+ x2 x2) x1))))
                      (if (<= x1 -1e+154)
                        (- (* x1 2.0) (* -3.0 (/ t_2 1.0)))
                        (if (<= x1 -28000.0)
                          (-
                           (+
                            (-
                             (*
                              (-
                               (*
                                (- (* 4.0 (/ (+ (- (+ x2 x2) x1) t_1) t_0)) 6.0)
                                (* x1 x1))
                               (+ 6.0 (* 2.0 (/ (- (* 3.0 (- 3.0 (* 2.0 x2))) 1.0) x1))))
                              t_0)
                             (* -1.0 x1))
                            x1)
                           (* -3.0 (/ t_2 t_0)))
                          (if (<= x1 2.7e+31)
                            (+
                             (* -1.0 x1)
                             (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                            (-
                             (+
                              (-
                               (*
                                (-
                                 (* (- (* 4.0 3.0) 6.0) (* x1 x1))
                                 (* (- 3.0 3.0) (* 3.0 (+ x1 x1))))
                                t_0)
                               (- (* (* -3.0 (* x1 x1)) 3.0) (* t_0 x1)))
                              x1)
                             -9.0))))))
                    double code(double x1, double x2) {
                    	double t_0 = (x1 * x1) - -1.0;
                    	double t_1 = (3.0 * x1) * x1;
                    	double t_2 = t_1 - ((x2 + x2) + x1);
                    	double tmp;
                    	if (x1 <= -1e+154) {
                    		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                    	} else if (x1 <= -28000.0) {
                    		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                    	} else if (x1 <= 2.7e+31) {
                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                    	} else {
                    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.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(x1, x2)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x1
                        real(8), intent (in) :: x2
                        real(8) :: t_0
                        real(8) :: t_1
                        real(8) :: t_2
                        real(8) :: tmp
                        t_0 = (x1 * x1) - (-1.0d0)
                        t_1 = (3.0d0 * x1) * x1
                        t_2 = t_1 - ((x2 + x2) + x1)
                        if (x1 <= (-1d+154)) then
                            tmp = (x1 * 2.0d0) - ((-3.0d0) * (t_2 / 1.0d0))
                        else if (x1 <= (-28000.0d0)) then
                            tmp = (((((((4.0d0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0d0) * (x1 * x1)) - (6.0d0 + (2.0d0 * (((3.0d0 * (3.0d0 - (2.0d0 * x2))) - 1.0d0) / x1)))) * t_0) - ((-1.0d0) * x1)) + x1) - ((-3.0d0) * (t_2 / t_0))
                        else if (x1 <= 2.7d+31) then
                            tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                        else
                            tmp = (((((((4.0d0 * 3.0d0) - 6.0d0) * (x1 * x1)) - ((3.0d0 - 3.0d0) * (3.0d0 * (x1 + x1)))) * t_0) - ((((-3.0d0) * (x1 * x1)) * 3.0d0) - (t_0 * x1))) + x1) - (-9.0d0)
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x1, double x2) {
                    	double t_0 = (x1 * x1) - -1.0;
                    	double t_1 = (3.0 * x1) * x1;
                    	double t_2 = t_1 - ((x2 + x2) + x1);
                    	double tmp;
                    	if (x1 <= -1e+154) {
                    		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                    	} else if (x1 <= -28000.0) {
                    		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                    	} else if (x1 <= 2.7e+31) {
                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                    	} else {
                    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                    	}
                    	return tmp;
                    }
                    
                    def code(x1, x2):
                    	t_0 = (x1 * x1) - -1.0
                    	t_1 = (3.0 * x1) * x1
                    	t_2 = t_1 - ((x2 + x2) + x1)
                    	tmp = 0
                    	if x1 <= -1e+154:
                    		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0))
                    	elif x1 <= -28000.0:
                    		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0))
                    	elif x1 <= 2.7e+31:
                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                    	else:
                    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0
                    	return tmp
                    
                    function code(x1, x2)
                    	t_0 = Float64(Float64(x1 * x1) - -1.0)
                    	t_1 = Float64(Float64(3.0 * x1) * x1)
                    	t_2 = Float64(t_1 - Float64(Float64(x2 + x2) + x1))
                    	tmp = 0.0
                    	if (x1 <= -1e+154)
                    		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(t_2 / 1.0)));
                    	elseif (x1 <= -28000.0)
                    		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * Float64(Float64(Float64(Float64(x2 + x2) - x1) + t_1) / t_0)) - 6.0) * Float64(x1 * x1)) - Float64(6.0 + Float64(2.0 * Float64(Float64(Float64(3.0 * Float64(3.0 - Float64(2.0 * x2))) - 1.0) / x1)))) * t_0) - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(t_2 / t_0)));
                    	elseif (x1 <= 2.7e+31)
                    		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                    	else
                    		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * 3.0) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - 3.0) * Float64(3.0 * Float64(x1 + x1)))) * t_0) - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * 3.0) - Float64(t_0 * x1))) + x1) - -9.0);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x1, x2)
                    	t_0 = (x1 * x1) - -1.0;
                    	t_1 = (3.0 * x1) * x1;
                    	t_2 = t_1 - ((x2 + x2) + x1);
                    	tmp = 0.0;
                    	if (x1 <= -1e+154)
                    		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                    	elseif (x1 <= -28000.0)
                    		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                    	elseif (x1 <= 2.7e+31)
                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                    	else
                    		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+154], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -28000.0], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * N[(N[(N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(6.0 + N[(2.0 * N[(N[(N[(3.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.7e+31], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * 3.0), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] - N[(t$95$0 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - -9.0), $MachinePrecision]]]]]]]
                    
                    \begin{array}{l}
                    t_0 := x1 \cdot x1 - -1\\
                    t_1 := \left(3 \cdot x1\right) \cdot x1\\
                    t_2 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\
                    \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\
                    \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\
                    
                    \mathbf{elif}\;x1 \leq -28000:\\
                    \;\;\;\;\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + t\_1}{t\_0} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\
                    
                    \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\
                    \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 4 regimes
                    2. if x1 < -1e154

                      1. Initial program 69.7%

                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                      2. Applied rewrites69.8%

                        \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                      3. Taylor expanded in x1 around 0

                        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                      4. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                        2. lower-+.f64N/A

                          \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                        3. lower-*.f64N/A

                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                        4. lower-*.f64N/A

                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                        5. lower--.f64N/A

                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                        6. lower-*.f6448.5%

                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                      5. Applied rewrites48.5%

                        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                      6. Taylor expanded in x1 around 0

                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                      7. Step-by-step derivation
                        1. Applied rewrites68.9%

                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                        2. Taylor expanded in x2 around 0

                          \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                        3. Step-by-step derivation
                          1. Applied rewrites63.4%

                            \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

                          if -1e154 < x1 < -28000

                          1. Initial program 69.7%

                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                          2. Applied rewrites69.8%

                            \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                          3. Taylor expanded in x1 around 0

                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                          4. Step-by-step derivation
                            1. lower-*.f6473.1%

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                          5. Applied rewrites73.1%

                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                          6. Taylor expanded in x1 around inf

                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \color{blue}{\left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                          7. Step-by-step derivation
                            1. lower-+.f64N/A

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + \color{blue}{2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                            2. lower-*.f64N/A

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \color{blue}{\frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                            3. lower-/.f64N/A

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{\color{blue}{x1}}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                            4. lower--.f64N/A

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                            5. lower-*.f64N/A

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                            6. lower--.f64N/A

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                            7. lower-*.f6424.6%

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                          8. Applied rewrites24.6%

                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \color{blue}{\left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

                          if -28000 < x1 < 2.6999999999999999e31

                          1. Initial program 69.7%

                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                          2. Taylor expanded in x1 around 0

                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                          3. Step-by-step derivation
                            1. lower-+.f64N/A

                              \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                            2. lower-*.f64N/A

                              \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                            3. lower-*.f64N/A

                              \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                            4. lower--.f64N/A

                              \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                          4. Applied rewrites54.3%

                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                          5. Taylor expanded in x2 around 0

                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                          6. Step-by-step derivation
                            1. lower-+.f64N/A

                              \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                            2. lower-*.f64N/A

                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                            3. lower-*.f64N/A

                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                            4. lower--.f64N/A

                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                            5. lower-+.f64N/A

                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                            6. lower-*.f64N/A

                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                            7. lower-*.f64N/A

                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                            8. lower-*.f6460.4%

                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                          7. Applied rewrites60.4%

                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                          if 2.6999999999999999e31 < x1

                          1. Initial program 69.7%

                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                          2. Applied rewrites69.8%

                            \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                          3. Taylor expanded in x1 around inf

                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                          4. Step-by-step derivation
                            1. Applied rewrites34.1%

                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                            2. Taylor expanded in x1 around inf

                              \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                            3. Step-by-step derivation
                              1. Applied rewrites32.4%

                                \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                              2. Taylor expanded in x1 around inf

                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                              3. Step-by-step derivation
                                1. Applied rewrites16.7%

                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                2. Taylor expanded in x1 around inf

                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                3. Step-by-step derivation
                                  1. Applied rewrites16.8%

                                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                  2. Taylor expanded in x1 around inf

                                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites29.1%

                                      \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                  4. Recombined 4 regimes into one program.
                                  5. Add Preprocessing

                                  Alternative 8: 93.6% accurate, 1.7× speedup?

                                  \[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\ \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\ \mathbf{elif}\;x1 \leq -28000:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + t\_1}{t\_0} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\ \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\ \end{array} \]
                                  (FPCore (x1 x2)
                                    :precision binary64
                                    (let* ((t_0 (- (* x1 x1) -1.0))
                                         (t_1 (* (* 3.0 x1) x1))
                                         (t_2 (- t_1 (+ (+ x2 x2) x1))))
                                    (if (<= x1 -1e+154)
                                      (- (* x1 2.0) (* -3.0 (/ t_2 1.0)))
                                      (if (<= x1 -28000.0)
                                        (-
                                         (+
                                          (-
                                           (*
                                            (-
                                             (* (- (* 4.0 (/ (+ (* 2.0 x2) t_1) t_0)) 6.0) (* x1 x1))
                                             (+ 6.0 (* 2.0 (/ (- (* 3.0 (- 3.0 (* 2.0 x2))) 1.0) x1))))
                                            t_0)
                                           (* -1.0 x1))
                                          x1)
                                         (* -3.0 (/ t_2 t_0)))
                                        (if (<= x1 2.7e+31)
                                          (+
                                           (* -1.0 x1)
                                           (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                          (-
                                           (+
                                            (-
                                             (*
                                              (-
                                               (* (- (* 4.0 3.0) 6.0) (* x1 x1))
                                               (* (- 3.0 3.0) (* 3.0 (+ x1 x1))))
                                              t_0)
                                             (- (* (* -3.0 (* x1 x1)) 3.0) (* t_0 x1)))
                                            x1)
                                           -9.0))))))
                                  double code(double x1, double x2) {
                                  	double t_0 = (x1 * x1) - -1.0;
                                  	double t_1 = (3.0 * x1) * x1;
                                  	double t_2 = t_1 - ((x2 + x2) + x1);
                                  	double tmp;
                                  	if (x1 <= -1e+154) {
                                  		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                  	} else if (x1 <= -28000.0) {
                                  		tmp = (((((((4.0 * (((2.0 * x2) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                  	} else if (x1 <= 2.7e+31) {
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                  	} else {
                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.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(x1, x2)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: x1
                                      real(8), intent (in) :: x2
                                      real(8) :: t_0
                                      real(8) :: t_1
                                      real(8) :: t_2
                                      real(8) :: tmp
                                      t_0 = (x1 * x1) - (-1.0d0)
                                      t_1 = (3.0d0 * x1) * x1
                                      t_2 = t_1 - ((x2 + x2) + x1)
                                      if (x1 <= (-1d+154)) then
                                          tmp = (x1 * 2.0d0) - ((-3.0d0) * (t_2 / 1.0d0))
                                      else if (x1 <= (-28000.0d0)) then
                                          tmp = (((((((4.0d0 * (((2.0d0 * x2) + t_1) / t_0)) - 6.0d0) * (x1 * x1)) - (6.0d0 + (2.0d0 * (((3.0d0 * (3.0d0 - (2.0d0 * x2))) - 1.0d0) / x1)))) * t_0) - ((-1.0d0) * x1)) + x1) - ((-3.0d0) * (t_2 / t_0))
                                      else if (x1 <= 2.7d+31) then
                                          tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                      else
                                          tmp = (((((((4.0d0 * 3.0d0) - 6.0d0) * (x1 * x1)) - ((3.0d0 - 3.0d0) * (3.0d0 * (x1 + x1)))) * t_0) - ((((-3.0d0) * (x1 * x1)) * 3.0d0) - (t_0 * x1))) + x1) - (-9.0d0)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x1, double x2) {
                                  	double t_0 = (x1 * x1) - -1.0;
                                  	double t_1 = (3.0 * x1) * x1;
                                  	double t_2 = t_1 - ((x2 + x2) + x1);
                                  	double tmp;
                                  	if (x1 <= -1e+154) {
                                  		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                  	} else if (x1 <= -28000.0) {
                                  		tmp = (((((((4.0 * (((2.0 * x2) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                  	} else if (x1 <= 2.7e+31) {
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                  	} else {
                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x1, x2):
                                  	t_0 = (x1 * x1) - -1.0
                                  	t_1 = (3.0 * x1) * x1
                                  	t_2 = t_1 - ((x2 + x2) + x1)
                                  	tmp = 0
                                  	if x1 <= -1e+154:
                                  		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0))
                                  	elif x1 <= -28000.0:
                                  		tmp = (((((((4.0 * (((2.0 * x2) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0))
                                  	elif x1 <= 2.7e+31:
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                  	else:
                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0
                                  	return tmp
                                  
                                  function code(x1, x2)
                                  	t_0 = Float64(Float64(x1 * x1) - -1.0)
                                  	t_1 = Float64(Float64(3.0 * x1) * x1)
                                  	t_2 = Float64(t_1 - Float64(Float64(x2 + x2) + x1))
                                  	tmp = 0.0
                                  	if (x1 <= -1e+154)
                                  		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(t_2 / 1.0)));
                                  	elseif (x1 <= -28000.0)
                                  		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * Float64(Float64(Float64(2.0 * x2) + t_1) / t_0)) - 6.0) * Float64(x1 * x1)) - Float64(6.0 + Float64(2.0 * Float64(Float64(Float64(3.0 * Float64(3.0 - Float64(2.0 * x2))) - 1.0) / x1)))) * t_0) - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(t_2 / t_0)));
                                  	elseif (x1 <= 2.7e+31)
                                  		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                  	else
                                  		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * 3.0) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - 3.0) * Float64(3.0 * Float64(x1 + x1)))) * t_0) - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * 3.0) - Float64(t_0 * x1))) + x1) - -9.0);
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x1, x2)
                                  	t_0 = (x1 * x1) - -1.0;
                                  	t_1 = (3.0 * x1) * x1;
                                  	t_2 = t_1 - ((x2 + x2) + x1);
                                  	tmp = 0.0;
                                  	if (x1 <= -1e+154)
                                  		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                  	elseif (x1 <= -28000.0)
                                  		tmp = (((((((4.0 * (((2.0 * x2) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (6.0 + (2.0 * (((3.0 * (3.0 - (2.0 * x2))) - 1.0) / x1)))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                  	elseif (x1 <= 2.7e+31)
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                  	else
                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+154], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -28000.0], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * N[(N[(N[(2.0 * x2), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(6.0 + N[(2.0 * N[(N[(N[(3.0 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.7e+31], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * 3.0), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] - N[(t$95$0 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - -9.0), $MachinePrecision]]]]]]]
                                  
                                  \begin{array}{l}
                                  t_0 := x1 \cdot x1 - -1\\
                                  t_1 := \left(3 \cdot x1\right) \cdot x1\\
                                  t_2 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\
                                  \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\
                                  \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\
                                  
                                  \mathbf{elif}\;x1 \leq -28000:\\
                                  \;\;\;\;\left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + t\_1}{t\_0} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\
                                  
                                  \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\
                                  \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 4 regimes
                                  2. if x1 < -1e154

                                    1. Initial program 69.7%

                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                    2. Applied rewrites69.8%

                                      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                    3. Taylor expanded in x1 around 0

                                      \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                    4. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                      2. lower-+.f64N/A

                                        \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                      4. lower-*.f64N/A

                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                      5. lower--.f64N/A

                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                      6. lower-*.f6448.5%

                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                    5. Applied rewrites48.5%

                                      \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                    6. Taylor expanded in x1 around 0

                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                    7. Step-by-step derivation
                                      1. Applied rewrites68.9%

                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                      2. Taylor expanded in x2 around 0

                                        \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites63.4%

                                          \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

                                        if -1e154 < x1 < -28000

                                        1. Initial program 69.7%

                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                        2. Applied rewrites69.8%

                                          \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                        3. Taylor expanded in x1 around 0

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        4. Step-by-step derivation
                                          1. lower-*.f6473.1%

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        5. Applied rewrites73.1%

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        6. Taylor expanded in x1 around 0

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        7. Step-by-step derivation
                                          1. lower-*.f6473.0%

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        8. Applied rewrites73.0%

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        9. Taylor expanded in x1 around 0

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        10. Step-by-step derivation
                                          1. lower-*.f6473.0%

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        11. Applied rewrites73.0%

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        12. Taylor expanded in x1 around 0

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        13. Step-by-step derivation
                                          1. lower-*.f6472.8%

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{2 \cdot \color{blue}{x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        14. Applied rewrites72.8%

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\color{blue}{2 \cdot x2} + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        15. Taylor expanded in x1 around inf

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \color{blue}{\left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        16. Step-by-step derivation
                                          1. lower-+.f64N/A

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + \color{blue}{2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \color{blue}{\frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                          3. lower-/.f64N/A

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{\color{blue}{x1}}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                          4. lower--.f64N/A

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                          5. lower-*.f64N/A

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                          6. lower--.f64N/A

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                          7. lower-*.f6424.6%

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                        17. Applied rewrites24.6%

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{2 \cdot x2 + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \color{blue}{\left(6 + 2 \cdot \frac{3 \cdot \left(3 - 2 \cdot x2\right) - 1}{x1}\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

                                        if -28000 < x1 < 2.6999999999999999e31

                                        1. Initial program 69.7%

                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                        2. Taylor expanded in x1 around 0

                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                        3. Step-by-step derivation
                                          1. lower-+.f64N/A

                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                          3. lower-*.f64N/A

                                            \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                          4. lower--.f64N/A

                                            \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                        4. Applied rewrites54.3%

                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                        5. Taylor expanded in x2 around 0

                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                        6. Step-by-step derivation
                                          1. lower-+.f64N/A

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                          2. lower-*.f64N/A

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                          3. lower-*.f64N/A

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                          4. lower--.f64N/A

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                          5. lower-+.f64N/A

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                          6. lower-*.f64N/A

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                          7. lower-*.f64N/A

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                          8. lower-*.f6460.4%

                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                        7. Applied rewrites60.4%

                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                        if 2.6999999999999999e31 < x1

                                        1. Initial program 69.7%

                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                        2. Applied rewrites69.8%

                                          \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                        3. Taylor expanded in x1 around inf

                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites34.1%

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                          2. Taylor expanded in x1 around inf

                                            \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites32.4%

                                              \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                            2. Taylor expanded in x1 around inf

                                              \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites16.7%

                                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                              2. Taylor expanded in x1 around inf

                                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites16.8%

                                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                2. Taylor expanded in x1 around inf

                                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites29.1%

                                                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                4. Recombined 4 regimes into one program.
                                                5. Add Preprocessing

                                                Alternative 9: 91.1% accurate, 2.0× speedup?

                                                \[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\ \mathbf{if}\;x1 \leq -4.8 \cdot 10^{+153}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\ \mathbf{elif}\;x1 \leq -5.4 \cdot 10^{+65}:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + t\_1}{t\_0} - 6\right) \cdot \left(x1 \cdot x1\right) - 12 \cdot \left(x1 \cdot x2\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\ \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\ \end{array} \]
                                                (FPCore (x1 x2)
                                                  :precision binary64
                                                  (let* ((t_0 (- (* x1 x1) -1.0))
                                                       (t_1 (* (* 3.0 x1) x1))
                                                       (t_2 (- t_1 (+ (+ x2 x2) x1))))
                                                  (if (<= x1 -4.8e+153)
                                                    (- (* x1 2.0) (* -3.0 (/ t_2 1.0)))
                                                    (if (<= x1 -5.4e+65)
                                                      (-
                                                       (+
                                                        (-
                                                         (*
                                                          (-
                                                           (*
                                                            (- (* 4.0 (/ (+ (- (+ x2 x2) x1) t_1) t_0)) 6.0)
                                                            (* x1 x1))
                                                           (* 12.0 (* x1 x2)))
                                                          t_0)
                                                         (* -1.0 x1))
                                                        x1)
                                                       (* -3.0 (/ t_2 t_0)))
                                                      (if (<= x1 2.7e+31)
                                                        (+
                                                         (* -1.0 x1)
                                                         (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                                        (-
                                                         (+
                                                          (-
                                                           (*
                                                            (-
                                                             (* (- (* 4.0 3.0) 6.0) (* x1 x1))
                                                             (* (- 3.0 3.0) (* 3.0 (+ x1 x1))))
                                                            t_0)
                                                           (- (* (* -3.0 (* x1 x1)) 3.0) (* t_0 x1)))
                                                          x1)
                                                         -9.0))))))
                                                double code(double x1, double x2) {
                                                	double t_0 = (x1 * x1) - -1.0;
                                                	double t_1 = (3.0 * x1) * x1;
                                                	double t_2 = t_1 - ((x2 + x2) + x1);
                                                	double tmp;
                                                	if (x1 <= -4.8e+153) {
                                                		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                                	} else if (x1 <= -5.4e+65) {
                                                		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (12.0 * (x1 * x2))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                                	} else if (x1 <= 2.7e+31) {
                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                	} else {
                                                		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.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(x1, x2)
                                                use fmin_fmax_functions
                                                    real(8), intent (in) :: x1
                                                    real(8), intent (in) :: x2
                                                    real(8) :: t_0
                                                    real(8) :: t_1
                                                    real(8) :: t_2
                                                    real(8) :: tmp
                                                    t_0 = (x1 * x1) - (-1.0d0)
                                                    t_1 = (3.0d0 * x1) * x1
                                                    t_2 = t_1 - ((x2 + x2) + x1)
                                                    if (x1 <= (-4.8d+153)) then
                                                        tmp = (x1 * 2.0d0) - ((-3.0d0) * (t_2 / 1.0d0))
                                                    else if (x1 <= (-5.4d+65)) then
                                                        tmp = (((((((4.0d0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0d0) * (x1 * x1)) - (12.0d0 * (x1 * x2))) * t_0) - ((-1.0d0) * x1)) + x1) - ((-3.0d0) * (t_2 / t_0))
                                                    else if (x1 <= 2.7d+31) then
                                                        tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                    else
                                                        tmp = (((((((4.0d0 * 3.0d0) - 6.0d0) * (x1 * x1)) - ((3.0d0 - 3.0d0) * (3.0d0 * (x1 + x1)))) * t_0) - ((((-3.0d0) * (x1 * x1)) * 3.0d0) - (t_0 * x1))) + x1) - (-9.0d0)
                                                    end if
                                                    code = tmp
                                                end function
                                                
                                                public static double code(double x1, double x2) {
                                                	double t_0 = (x1 * x1) - -1.0;
                                                	double t_1 = (3.0 * x1) * x1;
                                                	double t_2 = t_1 - ((x2 + x2) + x1);
                                                	double tmp;
                                                	if (x1 <= -4.8e+153) {
                                                		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                                	} else if (x1 <= -5.4e+65) {
                                                		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (12.0 * (x1 * x2))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                                	} else if (x1 <= 2.7e+31) {
                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                	} else {
                                                		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x1, x2):
                                                	t_0 = (x1 * x1) - -1.0
                                                	t_1 = (3.0 * x1) * x1
                                                	t_2 = t_1 - ((x2 + x2) + x1)
                                                	tmp = 0
                                                	if x1 <= -4.8e+153:
                                                		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0))
                                                	elif x1 <= -5.4e+65:
                                                		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (12.0 * (x1 * x2))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0))
                                                	elif x1 <= 2.7e+31:
                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                	else:
                                                		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0
                                                	return tmp
                                                
                                                function code(x1, x2)
                                                	t_0 = Float64(Float64(x1 * x1) - -1.0)
                                                	t_1 = Float64(Float64(3.0 * x1) * x1)
                                                	t_2 = Float64(t_1 - Float64(Float64(x2 + x2) + x1))
                                                	tmp = 0.0
                                                	if (x1 <= -4.8e+153)
                                                		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(t_2 / 1.0)));
                                                	elseif (x1 <= -5.4e+65)
                                                		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * Float64(Float64(Float64(Float64(x2 + x2) - x1) + t_1) / t_0)) - 6.0) * Float64(x1 * x1)) - Float64(12.0 * Float64(x1 * x2))) * t_0) - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(t_2 / t_0)));
                                                	elseif (x1 <= 2.7e+31)
                                                		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                	else
                                                		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * 3.0) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - 3.0) * Float64(3.0 * Float64(x1 + x1)))) * t_0) - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * 3.0) - Float64(t_0 * x1))) + x1) - -9.0);
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x1, x2)
                                                	t_0 = (x1 * x1) - -1.0;
                                                	t_1 = (3.0 * x1) * x1;
                                                	t_2 = t_1 - ((x2 + x2) + x1);
                                                	tmp = 0.0;
                                                	if (x1 <= -4.8e+153)
                                                		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                                	elseif (x1 <= -5.4e+65)
                                                		tmp = (((((((4.0 * ((((x2 + x2) - x1) + t_1) / t_0)) - 6.0) * (x1 * x1)) - (12.0 * (x1 * x2))) * t_0) - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                                	elseif (x1 <= 2.7e+31)
                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                	else
                                                		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -4.8e+153], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -5.4e+65], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * N[(N[(N[(N[(x2 + x2), $MachinePrecision] - x1), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(12.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.7e+31], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * 3.0), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] - N[(t$95$0 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - -9.0), $MachinePrecision]]]]]]]
                                                
                                                \begin{array}{l}
                                                t_0 := x1 \cdot x1 - -1\\
                                                t_1 := \left(3 \cdot x1\right) \cdot x1\\
                                                t_2 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\
                                                \mathbf{if}\;x1 \leq -4.8 \cdot 10^{+153}:\\
                                                \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\
                                                
                                                \mathbf{elif}\;x1 \leq -5.4 \cdot 10^{+65}:\\
                                                \;\;\;\;\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + t\_1}{t\_0} - 6\right) \cdot \left(x1 \cdot x1\right) - 12 \cdot \left(x1 \cdot x2\right)\right) \cdot t\_0 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\
                                                
                                                \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\
                                                \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\
                                                
                                                
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 4 regimes
                                                2. if x1 < -4.7999999999999998e153

                                                  1. Initial program 69.7%

                                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                  2. Applied rewrites69.8%

                                                    \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                  3. Taylor expanded in x1 around 0

                                                    \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                  4. Step-by-step derivation
                                                    1. lower-*.f64N/A

                                                      \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                    2. lower-+.f64N/A

                                                      \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                    3. lower-*.f64N/A

                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                    4. lower-*.f64N/A

                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                    5. lower--.f64N/A

                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                    6. lower-*.f6448.5%

                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                  5. Applied rewrites48.5%

                                                    \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                  6. Taylor expanded in x1 around 0

                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites68.9%

                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                    2. Taylor expanded in x2 around 0

                                                      \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites63.4%

                                                        \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

                                                      if -4.7999999999999998e153 < x1 < -5.4000000000000004e65

                                                      1. Initial program 69.7%

                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                      2. Applied rewrites69.8%

                                                        \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                      3. Taylor expanded in x1 around 0

                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      4. Step-by-step derivation
                                                        1. lower-*.f6473.1%

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      5. Applied rewrites73.1%

                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      6. Taylor expanded in x1 around 0

                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \color{blue}{4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      7. Step-by-step derivation
                                                        1. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 4 \cdot \color{blue}{\left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 4 \cdot \left(x1 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                        3. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 4 \cdot \left(x1 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                        4. lower--.f64N/A

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                        5. lower-*.f6461.4%

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      8. Applied rewrites61.4%

                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \color{blue}{4 \cdot \left(x1 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      9. Taylor expanded in x2 around 0

                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 12 \cdot \color{blue}{\left(x1 \cdot x2\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      10. Step-by-step derivation
                                                        1. lower-*.f64N/A

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 12 \cdot \left(x1 \cdot \color{blue}{x2}\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                        2. lower-*.f6453.9%

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 12 \cdot \left(x1 \cdot x2\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                      11. Applied rewrites53.9%

                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - 12 \cdot \color{blue}{\left(x1 \cdot x2\right)}\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

                                                      if -5.4000000000000004e65 < x1 < 2.6999999999999999e31

                                                      1. Initial program 69.7%

                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                      2. Taylor expanded in x1 around 0

                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                      3. Step-by-step derivation
                                                        1. lower-+.f64N/A

                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                        3. lower-*.f64N/A

                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                        4. lower--.f64N/A

                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                      4. Applied rewrites54.3%

                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                      5. Taylor expanded in x2 around 0

                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                      6. Step-by-step derivation
                                                        1. lower-+.f64N/A

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                        3. lower-*.f64N/A

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                        4. lower--.f64N/A

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                        5. lower-+.f64N/A

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                        6. lower-*.f64N/A

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                        7. lower-*.f64N/A

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                        8. lower-*.f6460.4%

                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                      7. Applied rewrites60.4%

                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                                      if 2.6999999999999999e31 < x1

                                                      1. Initial program 69.7%

                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                      2. Applied rewrites69.8%

                                                        \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                      3. Taylor expanded in x1 around inf

                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                                      4. Step-by-step derivation
                                                        1. Applied rewrites34.1%

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                                        2. Taylor expanded in x1 around inf

                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites32.4%

                                                            \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                          2. Taylor expanded in x1 around inf

                                                            \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites16.7%

                                                              \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                            2. Taylor expanded in x1 around inf

                                                              \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites16.8%

                                                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                              2. Taylor expanded in x1 around inf

                                                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites29.1%

                                                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                              4. Recombined 4 regimes into one program.
                                                              5. Add Preprocessing

                                                              Alternative 10: 91.0% accurate, 2.5× speedup?

                                                              \[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ t_1 := \left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0\\ t_2 := \left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)\\ \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\ \mathbf{elif}\;x1 \leq -1.9 \cdot 10^{+70}:\\ \;\;\;\;\left(\left(t\_1 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\ \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(t\_1 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\ \end{array} \]
                                                              (FPCore (x1 x2)
                                                                :precision binary64
                                                                (let* ((t_0 (- (* x1 x1) -1.0))
                                                                     (t_1
                                                                      (*
                                                                       (-
                                                                        (* (- (* 4.0 3.0) 6.0) (* x1 x1))
                                                                        (* (- 3.0 3.0) (* 3.0 (+ x1 x1))))
                                                                       t_0))
                                                                     (t_2 (- (* (* 3.0 x1) x1) (+ (+ x2 x2) x1))))
                                                                (if (<= x1 -1e+154)
                                                                  (- (* x1 2.0) (* -3.0 (/ t_2 1.0)))
                                                                  (if (<= x1 -1.9e+70)
                                                                    (- (+ (- t_1 (* -1.0 x1)) x1) (* -3.0 (/ t_2 t_0)))
                                                                    (if (<= x1 2.7e+31)
                                                                      (+
                                                                       (* -1.0 x1)
                                                                       (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                                                      (-
                                                                       (+ (- t_1 (- (* (* -3.0 (* x1 x1)) 3.0) (* t_0 x1))) x1)
                                                                       -9.0))))))
                                                              double code(double x1, double x2) {
                                                              	double t_0 = (x1 * x1) - -1.0;
                                                              	double t_1 = ((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0;
                                                              	double t_2 = ((3.0 * x1) * x1) - ((x2 + x2) + x1);
                                                              	double tmp;
                                                              	if (x1 <= -1e+154) {
                                                              		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                                              	} else if (x1 <= -1.9e+70) {
                                                              		tmp = ((t_1 - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                                              	} else if (x1 <= 2.7e+31) {
                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                              	} else {
                                                              		tmp = ((t_1 - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.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(x1, x2)
                                                              use fmin_fmax_functions
                                                                  real(8), intent (in) :: x1
                                                                  real(8), intent (in) :: x2
                                                                  real(8) :: t_0
                                                                  real(8) :: t_1
                                                                  real(8) :: t_2
                                                                  real(8) :: tmp
                                                                  t_0 = (x1 * x1) - (-1.0d0)
                                                                  t_1 = ((((4.0d0 * 3.0d0) - 6.0d0) * (x1 * x1)) - ((3.0d0 - 3.0d0) * (3.0d0 * (x1 + x1)))) * t_0
                                                                  t_2 = ((3.0d0 * x1) * x1) - ((x2 + x2) + x1)
                                                                  if (x1 <= (-1d+154)) then
                                                                      tmp = (x1 * 2.0d0) - ((-3.0d0) * (t_2 / 1.0d0))
                                                                  else if (x1 <= (-1.9d+70)) then
                                                                      tmp = ((t_1 - ((-1.0d0) * x1)) + x1) - ((-3.0d0) * (t_2 / t_0))
                                                                  else if (x1 <= 2.7d+31) then
                                                                      tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                                  else
                                                                      tmp = ((t_1 - ((((-3.0d0) * (x1 * x1)) * 3.0d0) - (t_0 * x1))) + x1) - (-9.0d0)
                                                                  end if
                                                                  code = tmp
                                                              end function
                                                              
                                                              public static double code(double x1, double x2) {
                                                              	double t_0 = (x1 * x1) - -1.0;
                                                              	double t_1 = ((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0;
                                                              	double t_2 = ((3.0 * x1) * x1) - ((x2 + x2) + x1);
                                                              	double tmp;
                                                              	if (x1 <= -1e+154) {
                                                              		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                                              	} else if (x1 <= -1.9e+70) {
                                                              		tmp = ((t_1 - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                                              	} else if (x1 <= 2.7e+31) {
                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                              	} else {
                                                              		tmp = ((t_1 - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(x1, x2):
                                                              	t_0 = (x1 * x1) - -1.0
                                                              	t_1 = ((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0
                                                              	t_2 = ((3.0 * x1) * x1) - ((x2 + x2) + x1)
                                                              	tmp = 0
                                                              	if x1 <= -1e+154:
                                                              		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0))
                                                              	elif x1 <= -1.9e+70:
                                                              		tmp = ((t_1 - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0))
                                                              	elif x1 <= 2.7e+31:
                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                              	else:
                                                              		tmp = ((t_1 - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0
                                                              	return tmp
                                                              
                                                              function code(x1, x2)
                                                              	t_0 = Float64(Float64(x1 * x1) - -1.0)
                                                              	t_1 = Float64(Float64(Float64(Float64(Float64(4.0 * 3.0) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - 3.0) * Float64(3.0 * Float64(x1 + x1)))) * t_0)
                                                              	t_2 = Float64(Float64(Float64(3.0 * x1) * x1) - Float64(Float64(x2 + x2) + x1))
                                                              	tmp = 0.0
                                                              	if (x1 <= -1e+154)
                                                              		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(t_2 / 1.0)));
                                                              	elseif (x1 <= -1.9e+70)
                                                              		tmp = Float64(Float64(Float64(t_1 - Float64(-1.0 * x1)) + x1) - Float64(-3.0 * Float64(t_2 / t_0)));
                                                              	elseif (x1 <= 2.7e+31)
                                                              		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                              	else
                                                              		tmp = Float64(Float64(Float64(t_1 - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * 3.0) - Float64(t_0 * x1))) + x1) - -9.0);
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(x1, x2)
                                                              	t_0 = (x1 * x1) - -1.0;
                                                              	t_1 = ((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0;
                                                              	t_2 = ((3.0 * x1) * x1) - ((x2 + x2) + x1);
                                                              	tmp = 0.0;
                                                              	if (x1 <= -1e+154)
                                                              		tmp = (x1 * 2.0) - (-3.0 * (t_2 / 1.0));
                                                              	elseif (x1 <= -1.9e+70)
                                                              		tmp = ((t_1 - (-1.0 * x1)) + x1) - (-3.0 * (t_2 / t_0));
                                                              	elseif (x1 <= 2.7e+31)
                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                              	else
                                                              		tmp = ((t_1 - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(N[(N[(4.0 * 3.0), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1e+154], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.9e+70], N[(N[(N[(t$95$1 - N[(-1.0 * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - N[(-3.0 * N[(t$95$2 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.7e+31], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t$95$1 - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] - N[(t$95$0 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - -9.0), $MachinePrecision]]]]]]]
                                                              
                                                              \begin{array}{l}
                                                              t_0 := x1 \cdot x1 - -1\\
                                                              t_1 := \left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0\\
                                                              t_2 := \left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)\\
                                                              \mathbf{if}\;x1 \leq -1 \cdot 10^{+154}:\\
                                                              \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_2}{1}\\
                                                              
                                                              \mathbf{elif}\;x1 \leq -1.9 \cdot 10^{+70}:\\
                                                              \;\;\;\;\left(\left(t\_1 - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{t\_2}{t\_0}\\
                                                              
                                                              \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\
                                                              \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;\left(\left(t\_1 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\
                                                              
                                                              
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 4 regimes
                                                              2. if x1 < -1e154

                                                                1. Initial program 69.7%

                                                                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                2. Applied rewrites69.8%

                                                                  \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                3. Taylor expanded in x1 around 0

                                                                  \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                4. Step-by-step derivation
                                                                  1. lower-*.f64N/A

                                                                    \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                  2. lower-+.f64N/A

                                                                    \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                  3. lower-*.f64N/A

                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                  4. lower-*.f64N/A

                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                  5. lower--.f64N/A

                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                  6. lower-*.f6448.5%

                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                5. Applied rewrites48.5%

                                                                  \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                6. Taylor expanded in x1 around 0

                                                                  \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                7. Step-by-step derivation
                                                                  1. Applied rewrites68.9%

                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                  2. Taylor expanded in x2 around 0

                                                                    \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites63.4%

                                                                      \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

                                                                    if -1e154 < x1 < -1.8999999999999999e70

                                                                    1. Initial program 69.7%

                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                    2. Applied rewrites69.8%

                                                                      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                    3. Taylor expanded in x1 around 0

                                                                      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                    4. Step-by-step derivation
                                                                      1. lower-*.f6473.1%

                                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot \color{blue}{x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                    5. Applied rewrites73.1%

                                                                      \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \color{blue}{-1 \cdot x1}\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                    6. Taylor expanded in x1 around inf

                                                                      \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                    7. Step-by-step derivation
                                                                      1. Applied rewrites71.2%

                                                                        \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                      2. Taylor expanded in x1 around inf

                                                                        \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites54.8%

                                                                          \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                        2. Taylor expanded in x1 around inf

                                                                          \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites54.8%

                                                                            \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - -1 \cdot x1\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]

                                                                          if -1.8999999999999999e70 < x1 < 2.6999999999999999e31

                                                                          1. Initial program 69.7%

                                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                          2. Taylor expanded in x1 around 0

                                                                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                          3. Step-by-step derivation
                                                                            1. lower-+.f64N/A

                                                                              \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                            2. lower-*.f64N/A

                                                                              \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                            3. lower-*.f64N/A

                                                                              \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                            4. lower--.f64N/A

                                                                              \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                          4. Applied rewrites54.3%

                                                                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                          5. Taylor expanded in x2 around 0

                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                          6. Step-by-step derivation
                                                                            1. lower-+.f64N/A

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                            2. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                                            3. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                                            4. lower--.f64N/A

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                            5. lower-+.f64N/A

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                            6. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                            7. lower-*.f64N/A

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                            8. lower-*.f6460.4%

                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                          7. Applied rewrites60.4%

                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                                                          if 2.6999999999999999e31 < x1

                                                                          1. Initial program 69.7%

                                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                          2. Applied rewrites69.8%

                                                                            \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                          3. Taylor expanded in x1 around inf

                                                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                                                          4. Step-by-step derivation
                                                                            1. Applied rewrites34.1%

                                                                              \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                                                            2. Taylor expanded in x1 around inf

                                                                              \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites32.4%

                                                                                \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                              2. Taylor expanded in x1 around inf

                                                                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                              3. Step-by-step derivation
                                                                                1. Applied rewrites16.7%

                                                                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                2. Taylor expanded in x1 around inf

                                                                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites16.8%

                                                                                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                  2. Taylor expanded in x1 around inf

                                                                                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites29.1%

                                                                                      \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                  4. Recombined 4 regimes into one program.
                                                                                  5. Add Preprocessing

                                                                                  Alternative 11: 87.2% accurate, 2.7× speedup?

                                                                                  \[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ \mathbf{if}\;x1 \leq -1.12 \cdot 10^{+153}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1}\\ \mathbf{elif}\;x1 \leq -1.95 \cdot 10^{+76}:\\ \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\ \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\ \end{array} \]
                                                                                  (FPCore (x1 x2)
                                                                                    :precision binary64
                                                                                    (let* ((t_0 (- (* x1 x1) -1.0)))
                                                                                    (if (<= x1 -1.12e+153)
                                                                                      (-
                                                                                       (* x1 2.0)
                                                                                       (* -3.0 (/ (- (* (* 3.0 x1) x1) (+ (+ x2 x2) x1)) 1.0)))
                                                                                      (if (<= x1 -1.95e+76)
                                                                                        (* x2 (- (+ (* -12.0 x1) (* -1.0 (/ x1 x2))) 6.0))
                                                                                        (if (<= x1 2.7e+31)
                                                                                          (+
                                                                                           (* -1.0 x1)
                                                                                           (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                                                                          (-
                                                                                           (+
                                                                                            (-
                                                                                             (*
                                                                                              (-
                                                                                               (* (- (* 4.0 3.0) 6.0) (* x1 x1))
                                                                                               (* (- 3.0 3.0) (* 3.0 (+ x1 x1))))
                                                                                              t_0)
                                                                                             (- (* (* -3.0 (* x1 x1)) 3.0) (* t_0 x1)))
                                                                                            x1)
                                                                                           -9.0))))))
                                                                                  double code(double x1, double x2) {
                                                                                  	double t_0 = (x1 * x1) - -1.0;
                                                                                  	double tmp;
                                                                                  	if (x1 <= -1.12e+153) {
                                                                                  		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0));
                                                                                  	} else if (x1 <= -1.95e+76) {
                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                  	} else if (x1 <= 2.7e+31) {
                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                  	} else {
                                                                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.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(x1, x2)
                                                                                  use fmin_fmax_functions
                                                                                      real(8), intent (in) :: x1
                                                                                      real(8), intent (in) :: x2
                                                                                      real(8) :: t_0
                                                                                      real(8) :: tmp
                                                                                      t_0 = (x1 * x1) - (-1.0d0)
                                                                                      if (x1 <= (-1.12d+153)) then
                                                                                          tmp = (x1 * 2.0d0) - ((-3.0d0) * ((((3.0d0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0d0))
                                                                                      else if (x1 <= (-1.95d+76)) then
                                                                                          tmp = x2 * ((((-12.0d0) * x1) + ((-1.0d0) * (x1 / x2))) - 6.0d0)
                                                                                      else if (x1 <= 2.7d+31) then
                                                                                          tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                                                      else
                                                                                          tmp = (((((((4.0d0 * 3.0d0) - 6.0d0) * (x1 * x1)) - ((3.0d0 - 3.0d0) * (3.0d0 * (x1 + x1)))) * t_0) - ((((-3.0d0) * (x1 * x1)) * 3.0d0) - (t_0 * x1))) + x1) - (-9.0d0)
                                                                                      end if
                                                                                      code = tmp
                                                                                  end function
                                                                                  
                                                                                  public static double code(double x1, double x2) {
                                                                                  	double t_0 = (x1 * x1) - -1.0;
                                                                                  	double tmp;
                                                                                  	if (x1 <= -1.12e+153) {
                                                                                  		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0));
                                                                                  	} else if (x1 <= -1.95e+76) {
                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                  	} else if (x1 <= 2.7e+31) {
                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                  	} else {
                                                                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  def code(x1, x2):
                                                                                  	t_0 = (x1 * x1) - -1.0
                                                                                  	tmp = 0
                                                                                  	if x1 <= -1.12e+153:
                                                                                  		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0))
                                                                                  	elif x1 <= -1.95e+76:
                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0)
                                                                                  	elif x1 <= 2.7e+31:
                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                                                  	else:
                                                                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0
                                                                                  	return tmp
                                                                                  
                                                                                  function code(x1, x2)
                                                                                  	t_0 = Float64(Float64(x1 * x1) - -1.0)
                                                                                  	tmp = 0.0
                                                                                  	if (x1 <= -1.12e+153)
                                                                                  		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(Float64(Float64(Float64(3.0 * x1) * x1) - Float64(Float64(x2 + x2) + x1)) / 1.0)));
                                                                                  	elseif (x1 <= -1.95e+76)
                                                                                  		tmp = Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(-1.0 * Float64(x1 / x2))) - 6.0));
                                                                                  	elseif (x1 <= 2.7e+31)
                                                                                  		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                                                  	else
                                                                                  		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.0 * 3.0) - 6.0) * Float64(x1 * x1)) - Float64(Float64(3.0 - 3.0) * Float64(3.0 * Float64(x1 + x1)))) * t_0) - Float64(Float64(Float64(-3.0 * Float64(x1 * x1)) * 3.0) - Float64(t_0 * x1))) + x1) - -9.0);
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  function tmp_2 = code(x1, x2)
                                                                                  	t_0 = (x1 * x1) - -1.0;
                                                                                  	tmp = 0.0;
                                                                                  	if (x1 <= -1.12e+153)
                                                                                  		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0));
                                                                                  	elseif (x1 <= -1.95e+76)
                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                  	elseif (x1 <= 2.7e+31)
                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                  	else
                                                                                  		tmp = (((((((4.0 * 3.0) - 6.0) * (x1 * x1)) - ((3.0 - 3.0) * (3.0 * (x1 + x1)))) * t_0) - (((-3.0 * (x1 * x1)) * 3.0) - (t_0 * x1))) + x1) - -9.0;
                                                                                  	end
                                                                                  	tmp_2 = tmp;
                                                                                  end
                                                                                  
                                                                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, If[LessEqual[x1, -1.12e+153], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.95e+76], N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(-1.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 2.7e+31], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(N[(N[(N[(4.0 * 3.0), $MachinePrecision] - 6.0), $MachinePrecision] * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] - N[(N[(3.0 - 3.0), $MachinePrecision] * N[(3.0 * N[(x1 + x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(N[(N[(-3.0 * N[(x1 * x1), $MachinePrecision]), $MachinePrecision] * 3.0), $MachinePrecision] - N[(t$95$0 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] - -9.0), $MachinePrecision]]]]]
                                                                                  
                                                                                  \begin{array}{l}
                                                                                  t_0 := x1 \cdot x1 - -1\\
                                                                                  \mathbf{if}\;x1 \leq -1.12 \cdot 10^{+153}:\\
                                                                                  \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1}\\
                                                                                  
                                                                                  \mathbf{elif}\;x1 \leq -1.95 \cdot 10^{+76}:\\
                                                                                  \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\
                                                                                  
                                                                                  \mathbf{elif}\;x1 \leq 2.7 \cdot 10^{+31}:\\
                                                                                  \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot t\_0 - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot 3 - t\_0 \cdot x1\right)\right) + x1\right) - -9\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 4 regimes
                                                                                  2. if x1 < -1.1200000000000001e153

                                                                                    1. Initial program 69.7%

                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                    2. Applied rewrites69.8%

                                                                                      \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                    3. Taylor expanded in x1 around 0

                                                                                      \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. lower-*.f64N/A

                                                                                        \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                      2. lower-+.f64N/A

                                                                                        \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                      3. lower-*.f64N/A

                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                      4. lower-*.f64N/A

                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                      5. lower--.f64N/A

                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                      6. lower-*.f6448.5%

                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                    5. Applied rewrites48.5%

                                                                                      \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                    6. Taylor expanded in x1 around 0

                                                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                    7. Step-by-step derivation
                                                                                      1. Applied rewrites68.9%

                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                      2. Taylor expanded in x2 around 0

                                                                                        \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites63.4%

                                                                                          \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

                                                                                        if -1.1200000000000001e153 < x1 < -1.9499999999999999e76

                                                                                        1. Initial program 69.7%

                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                        2. Taylor expanded in x1 around 0

                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                        3. Step-by-step derivation
                                                                                          1. lower-+.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                          3. lower-*.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                          4. lower--.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                        4. Applied rewrites54.3%

                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                        5. Taylor expanded in x2 around 0

                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. lower-+.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                          3. lower-*.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                          4. lower--.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                          5. lower-*.f6443.8%

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                        7. Applied rewrites43.8%

                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                        8. Taylor expanded in x2 around inf

                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]
                                                                                        9. Step-by-step derivation
                                                                                          1. lower-*.f64N/A

                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                          2. lower--.f64N/A

                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                          3. lower-+.f64N/A

                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                          4. lower-*.f64N/A

                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                          5. lower-*.f64N/A

                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                          6. lower-/.f6449.4%

                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                        10. Applied rewrites49.4%

                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]

                                                                                        if -1.9499999999999999e76 < x1 < 2.6999999999999999e31

                                                                                        1. Initial program 69.7%

                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                        2. Taylor expanded in x1 around 0

                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                        3. Step-by-step derivation
                                                                                          1. lower-+.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                          3. lower-*.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                          4. lower--.f64N/A

                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                        4. Applied rewrites54.3%

                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                        5. Taylor expanded in x2 around 0

                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. lower-+.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                          2. lower-*.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                                                          3. lower-*.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                                                          4. lower--.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                          5. lower-+.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                          6. lower-*.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                          7. lower-*.f64N/A

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                          8. lower-*.f6460.4%

                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                        7. Applied rewrites60.4%

                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                                                                        if 2.6999999999999999e31 < x1

                                                                                        1. Initial program 69.7%

                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                        2. Applied rewrites69.8%

                                                                                          \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                        3. Taylor expanded in x1 around inf

                                                                                          \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. Applied rewrites34.1%

                                                                                            \[\leadsto \left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - \color{blue}{-9} \]
                                                                                          2. Taylor expanded in x1 around inf

                                                                                            \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites32.4%

                                                                                              \[\leadsto \left(\left(\left(\left(4 \cdot \color{blue}{3} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                            2. Taylor expanded in x1 around inf

                                                                                              \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites16.7%

                                                                                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \color{blue}{3}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                              2. Taylor expanded in x1 around inf

                                                                                                \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                              3. Step-by-step derivation
                                                                                                1. Applied rewrites16.8%

                                                                                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(\color{blue}{3} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                                2. Taylor expanded in x1 around inf

                                                                                                  \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites29.1%

                                                                                                    \[\leadsto \left(\left(\left(\left(4 \cdot 3 - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - 3\right) \cdot \left(3 \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \color{blue}{3} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -9 \]
                                                                                                4. Recombined 4 regimes into one program.
                                                                                                5. Add Preprocessing

                                                                                                Alternative 12: 82.5% accurate, 3.5× speedup?

                                                                                                \[\begin{array}{l} \mathbf{if}\;x1 \leq -1.12 \cdot 10^{+153}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1}\\ \mathbf{elif}\;x1 \leq -1.95 \cdot 10^{+76}:\\ \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{+57}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right)\\ \end{array} \]
                                                                                                (FPCore (x1 x2)
                                                                                                  :precision binary64
                                                                                                  (if (<= x1 -1.12e+153)
                                                                                                  (-
                                                                                                   (* x1 2.0)
                                                                                                   (* -3.0 (/ (- (* (* 3.0 x1) x1) (+ (+ x2 x2) x1)) 1.0)))
                                                                                                  (if (<= x1 -1.95e+76)
                                                                                                    (* x2 (- (+ (* -12.0 x1) (* -1.0 (/ x1 x2))) 6.0))
                                                                                                    (if (<= x1 4e+57)
                                                                                                      (+
                                                                                                       (* -1.0 x1)
                                                                                                       (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                                                                                      (-
                                                                                                       (* x1 (+ 2.0 (* -4.0 (* x2 (- 3.0 (* 2.0 x2))))))
                                                                                                       (*
                                                                                                        -3.0
                                                                                                        (+
                                                                                                         (* -2.0 x2)
                                                                                                         (* x1 (- (* x1 (- (+ 3.0 x1) (* -2.0 x2))) 1.0)))))))))
                                                                                                double code(double x1, double x2) {
                                                                                                	double tmp;
                                                                                                	if (x1 <= -1.12e+153) {
                                                                                                		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0));
                                                                                                	} else if (x1 <= -1.95e+76) {
                                                                                                		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                	} else if (x1 <= 4e+57) {
                                                                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                	} else {
                                                                                                		tmp = (x1 * (2.0 + (-4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-3.0 * ((-2.0 * x2) + (x1 * ((x1 * ((3.0 + x1) - (-2.0 * x2))) - 1.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(x1, x2)
                                                                                                use fmin_fmax_functions
                                                                                                    real(8), intent (in) :: x1
                                                                                                    real(8), intent (in) :: x2
                                                                                                    real(8) :: tmp
                                                                                                    if (x1 <= (-1.12d+153)) then
                                                                                                        tmp = (x1 * 2.0d0) - ((-3.0d0) * ((((3.0d0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0d0))
                                                                                                    else if (x1 <= (-1.95d+76)) then
                                                                                                        tmp = x2 * ((((-12.0d0) * x1) + ((-1.0d0) * (x1 / x2))) - 6.0d0)
                                                                                                    else if (x1 <= 4d+57) then
                                                                                                        tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                                                                    else
                                                                                                        tmp = (x1 * (2.0d0 + ((-4.0d0) * (x2 * (3.0d0 - (2.0d0 * x2)))))) - ((-3.0d0) * (((-2.0d0) * x2) + (x1 * ((x1 * ((3.0d0 + x1) - ((-2.0d0) * x2))) - 1.0d0))))
                                                                                                    end if
                                                                                                    code = tmp
                                                                                                end function
                                                                                                
                                                                                                public static double code(double x1, double x2) {
                                                                                                	double tmp;
                                                                                                	if (x1 <= -1.12e+153) {
                                                                                                		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0));
                                                                                                	} else if (x1 <= -1.95e+76) {
                                                                                                		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                	} else if (x1 <= 4e+57) {
                                                                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                	} else {
                                                                                                		tmp = (x1 * (2.0 + (-4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-3.0 * ((-2.0 * x2) + (x1 * ((x1 * ((3.0 + x1) - (-2.0 * x2))) - 1.0))));
                                                                                                	}
                                                                                                	return tmp;
                                                                                                }
                                                                                                
                                                                                                def code(x1, x2):
                                                                                                	tmp = 0
                                                                                                	if x1 <= -1.12e+153:
                                                                                                		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0))
                                                                                                	elif x1 <= -1.95e+76:
                                                                                                		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0)
                                                                                                	elif x1 <= 4e+57:
                                                                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                                                                	else:
                                                                                                		tmp = (x1 * (2.0 + (-4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-3.0 * ((-2.0 * x2) + (x1 * ((x1 * ((3.0 + x1) - (-2.0 * x2))) - 1.0))))
                                                                                                	return tmp
                                                                                                
                                                                                                function code(x1, x2)
                                                                                                	tmp = 0.0
                                                                                                	if (x1 <= -1.12e+153)
                                                                                                		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(Float64(Float64(Float64(3.0 * x1) * x1) - Float64(Float64(x2 + x2) + x1)) / 1.0)));
                                                                                                	elseif (x1 <= -1.95e+76)
                                                                                                		tmp = Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(-1.0 * Float64(x1 / x2))) - 6.0));
                                                                                                	elseif (x1 <= 4e+57)
                                                                                                		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                                                                	else
                                                                                                		tmp = Float64(Float64(x1 * Float64(2.0 + Float64(-4.0 * Float64(x2 * Float64(3.0 - Float64(2.0 * x2)))))) - Float64(-3.0 * Float64(Float64(-2.0 * x2) + Float64(x1 * Float64(Float64(x1 * Float64(Float64(3.0 + x1) - Float64(-2.0 * x2))) - 1.0)))));
                                                                                                	end
                                                                                                	return tmp
                                                                                                end
                                                                                                
                                                                                                function tmp_2 = code(x1, x2)
                                                                                                	tmp = 0.0;
                                                                                                	if (x1 <= -1.12e+153)
                                                                                                		tmp = (x1 * 2.0) - (-3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0));
                                                                                                	elseif (x1 <= -1.95e+76)
                                                                                                		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                	elseif (x1 <= 4e+57)
                                                                                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                	else
                                                                                                		tmp = (x1 * (2.0 + (-4.0 * (x2 * (3.0 - (2.0 * x2)))))) - (-3.0 * ((-2.0 * x2) + (x1 * ((x1 * ((3.0 + x1) - (-2.0 * x2))) - 1.0))));
                                                                                                	end
                                                                                                	tmp_2 = tmp;
                                                                                                end
                                                                                                
                                                                                                code[x1_, x2_] := If[LessEqual[x1, -1.12e+153], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.95e+76], N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(-1.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e+57], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * N[(2.0 + N[(-4.0 * N[(x2 * N[(3.0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-3.0 * N[(N[(-2.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(N[(3.0 + x1), $MachinePrecision] - N[(-2.0 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                                                                
                                                                                                \begin{array}{l}
                                                                                                \mathbf{if}\;x1 \leq -1.12 \cdot 10^{+153}:\\
                                                                                                \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1}\\
                                                                                                
                                                                                                \mathbf{elif}\;x1 \leq -1.95 \cdot 10^{+76}:\\
                                                                                                \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\
                                                                                                
                                                                                                \mathbf{elif}\;x1 \leq 4 \cdot 10^{+57}:\\
                                                                                                \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right)\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 4 regimes
                                                                                                2. if x1 < -1.1200000000000001e153

                                                                                                  1. Initial program 69.7%

                                                                                                    \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                  2. Applied rewrites69.8%

                                                                                                    \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                  3. Taylor expanded in x1 around 0

                                                                                                    \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. lower-*.f64N/A

                                                                                                      \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                    2. lower-+.f64N/A

                                                                                                      \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                    3. lower-*.f64N/A

                                                                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                    4. lower-*.f64N/A

                                                                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                    5. lower--.f64N/A

                                                                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                    6. lower-*.f6448.5%

                                                                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                  5. Applied rewrites48.5%

                                                                                                    \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                  6. Taylor expanded in x1 around 0

                                                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                  7. Step-by-step derivation
                                                                                                    1. Applied rewrites68.9%

                                                                                                      \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                    2. Taylor expanded in x2 around 0

                                                                                                      \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                    3. Step-by-step derivation
                                                                                                      1. Applied rewrites63.4%

                                                                                                        \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

                                                                                                      if -1.1200000000000001e153 < x1 < -1.9499999999999999e76

                                                                                                      1. Initial program 69.7%

                                                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                      2. Taylor expanded in x1 around 0

                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. lower-+.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                        2. lower-*.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                        3. lower-*.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                        4. lower--.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                      4. Applied rewrites54.3%

                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                      5. Taylor expanded in x2 around 0

                                                                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                      6. Step-by-step derivation
                                                                                                        1. lower-+.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                        2. lower-*.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                        3. lower-*.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                        4. lower--.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                        5. lower-*.f6443.8%

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                      7. Applied rewrites43.8%

                                                                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                      8. Taylor expanded in x2 around inf

                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]
                                                                                                      9. Step-by-step derivation
                                                                                                        1. lower-*.f64N/A

                                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                        2. lower--.f64N/A

                                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                        3. lower-+.f64N/A

                                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                        4. lower-*.f64N/A

                                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                        5. lower-*.f64N/A

                                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                        6. lower-/.f6449.4%

                                                                                                          \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                      10. Applied rewrites49.4%

                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]

                                                                                                      if -1.9499999999999999e76 < x1 < 4.0000000000000002e57

                                                                                                      1. Initial program 69.7%

                                                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                      2. Taylor expanded in x1 around 0

                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. lower-+.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                        2. lower-*.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                        3. lower-*.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                        4. lower--.f64N/A

                                                                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                      4. Applied rewrites54.3%

                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                      5. Taylor expanded in x2 around 0

                                                                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                      6. Step-by-step derivation
                                                                                                        1. lower-+.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                        2. lower-*.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                                                                        3. lower-*.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                                                                        4. lower--.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                        5. lower-+.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                        6. lower-*.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                        7. lower-*.f64N/A

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                        8. lower-*.f6460.4%

                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                      7. Applied rewrites60.4%

                                                                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                                                                                      if 4.0000000000000002e57 < x1

                                                                                                      1. Initial program 69.7%

                                                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                      2. Applied rewrites69.8%

                                                                                                        \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                      3. Taylor expanded in x1 around 0

                                                                                                        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        2. lower-+.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        3. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        4. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        5. lower--.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        6. lower-*.f6448.5%

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                      5. Applied rewrites48.5%

                                                                                                        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                      6. Taylor expanded in x1 around 0

                                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \color{blue}{\left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right)} \]
                                                                                                      7. Step-by-step derivation
                                                                                                        1. lower-+.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + \color{blue}{x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)}\right) \]
                                                                                                        2. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + \color{blue}{x1} \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right) \]
                                                                                                        3. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \color{blue}{\left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)}\right) \]
                                                                                                        4. lower--.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - \color{blue}{1}\right)\right) \]
                                                                                                        5. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right) \]
                                                                                                        6. lower--.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right) \]
                                                                                                        7. lower-+.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right) \]
                                                                                                        8. lower-*.f6461.3%

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right) \]
                                                                                                      8. Applied rewrites61.3%

                                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \color{blue}{\left(-2 \cdot x2 + x1 \cdot \left(x1 \cdot \left(\left(3 + x1\right) - -2 \cdot x2\right) - 1\right)\right)} \]
                                                                                                    4. Recombined 4 regimes into one program.
                                                                                                    5. Add Preprocessing

                                                                                                    Alternative 13: 82.5% accurate, 3.8× speedup?

                                                                                                    \[\begin{array}{l} t_0 := -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1}\\ \mathbf{if}\;x1 \leq -1.12 \cdot 10^{+153}:\\ \;\;\;\;x1 \cdot 2 - t\_0\\ \mathbf{elif}\;x1 \leq -1.95 \cdot 10^{+76}:\\ \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\ \mathbf{elif}\;x1 \leq 4 \cdot 10^{-26}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(2 + x2 \cdot \left(8 \cdot x2 - 12\right)\right) - t\_0\\ \end{array} \]
                                                                                                    (FPCore (x1 x2)
                                                                                                      :precision binary64
                                                                                                      (let* ((t_0 (* -3.0 (/ (- (* (* 3.0 x1) x1) (+ (+ x2 x2) x1)) 1.0))))
                                                                                                      (if (<= x1 -1.12e+153)
                                                                                                        (- (* x1 2.0) t_0)
                                                                                                        (if (<= x1 -1.95e+76)
                                                                                                          (* x2 (- (+ (* -12.0 x1) (* -1.0 (/ x1 x2))) 6.0))
                                                                                                          (if (<= x1 4e-26)
                                                                                                            (+
                                                                                                             (* -1.0 x1)
                                                                                                             (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                                                                                            (- (* x1 (+ 2.0 (* x2 (- (* 8.0 x2) 12.0)))) t_0))))))
                                                                                                    double code(double x1, double x2) {
                                                                                                    	double t_0 = -3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0);
                                                                                                    	double tmp;
                                                                                                    	if (x1 <= -1.12e+153) {
                                                                                                    		tmp = (x1 * 2.0) - t_0;
                                                                                                    	} else if (x1 <= -1.95e+76) {
                                                                                                    		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                    	} else if (x1 <= 4e-26) {
                                                                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                    	} else {
                                                                                                    		tmp = (x1 * (2.0 + (x2 * ((8.0 * x2) - 12.0)))) - t_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(x1, x2)
                                                                                                    use fmin_fmax_functions
                                                                                                        real(8), intent (in) :: x1
                                                                                                        real(8), intent (in) :: x2
                                                                                                        real(8) :: t_0
                                                                                                        real(8) :: tmp
                                                                                                        t_0 = (-3.0d0) * ((((3.0d0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0d0)
                                                                                                        if (x1 <= (-1.12d+153)) then
                                                                                                            tmp = (x1 * 2.0d0) - t_0
                                                                                                        else if (x1 <= (-1.95d+76)) then
                                                                                                            tmp = x2 * ((((-12.0d0) * x1) + ((-1.0d0) * (x1 / x2))) - 6.0d0)
                                                                                                        else if (x1 <= 4d-26) then
                                                                                                            tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                                                                        else
                                                                                                            tmp = (x1 * (2.0d0 + (x2 * ((8.0d0 * x2) - 12.0d0)))) - t_0
                                                                                                        end if
                                                                                                        code = tmp
                                                                                                    end function
                                                                                                    
                                                                                                    public static double code(double x1, double x2) {
                                                                                                    	double t_0 = -3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0);
                                                                                                    	double tmp;
                                                                                                    	if (x1 <= -1.12e+153) {
                                                                                                    		tmp = (x1 * 2.0) - t_0;
                                                                                                    	} else if (x1 <= -1.95e+76) {
                                                                                                    		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                    	} else if (x1 <= 4e-26) {
                                                                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                    	} else {
                                                                                                    		tmp = (x1 * (2.0 + (x2 * ((8.0 * x2) - 12.0)))) - t_0;
                                                                                                    	}
                                                                                                    	return tmp;
                                                                                                    }
                                                                                                    
                                                                                                    def code(x1, x2):
                                                                                                    	t_0 = -3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0)
                                                                                                    	tmp = 0
                                                                                                    	if x1 <= -1.12e+153:
                                                                                                    		tmp = (x1 * 2.0) - t_0
                                                                                                    	elif x1 <= -1.95e+76:
                                                                                                    		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0)
                                                                                                    	elif x1 <= 4e-26:
                                                                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                                                                    	else:
                                                                                                    		tmp = (x1 * (2.0 + (x2 * ((8.0 * x2) - 12.0)))) - t_0
                                                                                                    	return tmp
                                                                                                    
                                                                                                    function code(x1, x2)
                                                                                                    	t_0 = Float64(-3.0 * Float64(Float64(Float64(Float64(3.0 * x1) * x1) - Float64(Float64(x2 + x2) + x1)) / 1.0))
                                                                                                    	tmp = 0.0
                                                                                                    	if (x1 <= -1.12e+153)
                                                                                                    		tmp = Float64(Float64(x1 * 2.0) - t_0);
                                                                                                    	elseif (x1 <= -1.95e+76)
                                                                                                    		tmp = Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(-1.0 * Float64(x1 / x2))) - 6.0));
                                                                                                    	elseif (x1 <= 4e-26)
                                                                                                    		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                                                                    	else
                                                                                                    		tmp = Float64(Float64(x1 * Float64(2.0 + Float64(x2 * Float64(Float64(8.0 * x2) - 12.0)))) - t_0);
                                                                                                    	end
                                                                                                    	return tmp
                                                                                                    end
                                                                                                    
                                                                                                    function tmp_2 = code(x1, x2)
                                                                                                    	t_0 = -3.0 * ((((3.0 * x1) * x1) - ((x2 + x2) + x1)) / 1.0);
                                                                                                    	tmp = 0.0;
                                                                                                    	if (x1 <= -1.12e+153)
                                                                                                    		tmp = (x1 * 2.0) - t_0;
                                                                                                    	elseif (x1 <= -1.95e+76)
                                                                                                    		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                    	elseif (x1 <= 4e-26)
                                                                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                    	else
                                                                                                    		tmp = (x1 * (2.0 + (x2 * ((8.0 * x2) - 12.0)))) - t_0;
                                                                                                    	end
                                                                                                    	tmp_2 = tmp;
                                                                                                    end
                                                                                                    
                                                                                                    code[x1_, x2_] := Block[{t$95$0 = N[(-3.0 * N[(N[(N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision] - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.12e+153], N[(N[(x1 * 2.0), $MachinePrecision] - t$95$0), $MachinePrecision], If[LessEqual[x1, -1.95e+76], N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(-1.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 4e-26], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * N[(2.0 + N[(x2 * N[(N[(8.0 * x2), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]]]]
                                                                                                    
                                                                                                    \begin{array}{l}
                                                                                                    t_0 := -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1}\\
                                                                                                    \mathbf{if}\;x1 \leq -1.12 \cdot 10^{+153}:\\
                                                                                                    \;\;\;\;x1 \cdot 2 - t\_0\\
                                                                                                    
                                                                                                    \mathbf{elif}\;x1 \leq -1.95 \cdot 10^{+76}:\\
                                                                                                    \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\
                                                                                                    
                                                                                                    \mathbf{elif}\;x1 \leq 4 \cdot 10^{-26}:\\
                                                                                                    \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                                                                    
                                                                                                    \mathbf{else}:\\
                                                                                                    \;\;\;\;x1 \cdot \left(2 + x2 \cdot \left(8 \cdot x2 - 12\right)\right) - t\_0\\
                                                                                                    
                                                                                                    
                                                                                                    \end{array}
                                                                                                    
                                                                                                    Derivation
                                                                                                    1. Split input into 4 regimes
                                                                                                    2. if x1 < -1.1200000000000001e153

                                                                                                      1. Initial program 69.7%

                                                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                      2. Applied rewrites69.8%

                                                                                                        \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                      3. Taylor expanded in x1 around 0

                                                                                                        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                      4. Step-by-step derivation
                                                                                                        1. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        2. lower-+.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        3. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        4. lower-*.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        5. lower--.f64N/A

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                        6. lower-*.f6448.5%

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                      5. Applied rewrites48.5%

                                                                                                        \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                      6. Taylor expanded in x1 around 0

                                                                                                        \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                      7. Step-by-step derivation
                                                                                                        1. Applied rewrites68.9%

                                                                                                          \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                        2. Taylor expanded in x2 around 0

                                                                                                          \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites63.4%

                                                                                                            \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]

                                                                                                          if -1.1200000000000001e153 < x1 < -1.9499999999999999e76

                                                                                                          1. Initial program 69.7%

                                                                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                          2. Taylor expanded in x1 around 0

                                                                                                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. lower-+.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                            2. lower-*.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                            3. lower-*.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                            4. lower--.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                          4. Applied rewrites54.3%

                                                                                                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                          5. Taylor expanded in x2 around 0

                                                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                          6. Step-by-step derivation
                                                                                                            1. lower-+.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                            2. lower-*.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                            3. lower-*.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                            4. lower--.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                            5. lower-*.f6443.8%

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                          7. Applied rewrites43.8%

                                                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                          8. Taylor expanded in x2 around inf

                                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]
                                                                                                          9. Step-by-step derivation
                                                                                                            1. lower-*.f64N/A

                                                                                                              \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                            2. lower--.f64N/A

                                                                                                              \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                            3. lower-+.f64N/A

                                                                                                              \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                            4. lower-*.f64N/A

                                                                                                              \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                            5. lower-*.f64N/A

                                                                                                              \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                            6. lower-/.f6449.4%

                                                                                                              \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                          10. Applied rewrites49.4%

                                                                                                            \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]

                                                                                                          if -1.9499999999999999e76 < x1 < 4.0000000000000002e-26

                                                                                                          1. Initial program 69.7%

                                                                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                          2. Taylor expanded in x1 around 0

                                                                                                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. lower-+.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                            2. lower-*.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                            3. lower-*.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                            4. lower--.f64N/A

                                                                                                              \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                          4. Applied rewrites54.3%

                                                                                                            \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                          5. Taylor expanded in x2 around 0

                                                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                          6. Step-by-step derivation
                                                                                                            1. lower-+.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                            2. lower-*.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                                                                            3. lower-*.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                                                                            4. lower--.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                            5. lower-+.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                            6. lower-*.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                            7. lower-*.f64N/A

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                            8. lower-*.f6460.4%

                                                                                                              \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                          7. Applied rewrites60.4%

                                                                                                            \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                                                                                          if 4.0000000000000002e-26 < x1

                                                                                                          1. Initial program 69.7%

                                                                                                            \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                          2. Applied rewrites69.8%

                                                                                                            \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                          3. Taylor expanded in x1 around 0

                                                                                                            \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. lower-*.f64N/A

                                                                                                              \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            2. lower-+.f64N/A

                                                                                                              \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            3. lower-*.f64N/A

                                                                                                              \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            4. lower-*.f64N/A

                                                                                                              \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            5. lower--.f64N/A

                                                                                                              \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            6. lower-*.f6448.5%

                                                                                                              \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                          5. Applied rewrites48.5%

                                                                                                            \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                          6. Taylor expanded in x1 around 0

                                                                                                            \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                          7. Step-by-step derivation
                                                                                                            1. Applied rewrites68.9%

                                                                                                              \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                            2. Taylor expanded in x2 around 0

                                                                                                              \[\leadsto x1 \cdot \left(2 + x2 \cdot \color{blue}{\left(8 \cdot x2 - 12\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. lower-*.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + x2 \cdot \left(8 \cdot x2 - \color{blue}{12}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                              2. lower--.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + x2 \cdot \left(8 \cdot x2 - 12\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                              3. lower-*.f6468.9%

                                                                                                                \[\leadsto x1 \cdot \left(2 + x2 \cdot \left(8 \cdot x2 - 12\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                            4. Applied rewrites68.9%

                                                                                                              \[\leadsto x1 \cdot \left(2 + x2 \cdot \color{blue}{\left(8 \cdot x2 - 12\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                          8. Recombined 4 regimes into one program.
                                                                                                          9. Add Preprocessing

                                                                                                          Alternative 14: 82.0% accurate, 0.4× speedup?

                                                                                                          \[\begin{array}{l} t_0 := x1 \cdot x1 - -1\\ t_1 := \left(3 \cdot x1\right) \cdot x1\\ t_2 := x1 \cdot x1 + 1\\ t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\ t_4 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_3 - 6\right)\right) \cdot t\_2 + t\_1 \cdot t\_3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right)\\ t_5 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\ \mathbf{if}\;t\_4 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;\frac{\left(\left(\left(\left(3 - \left(x2 + x2\right)\right) \cdot x2\right) \cdot -4 - -2\right) \cdot x1\right) \cdot t\_0 - -3 \cdot t\_5}{t\_0}\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_5}{1}\\ \end{array} \]
                                                                                                          (FPCore (x1 x2)
                                                                                                            :precision binary64
                                                                                                            (let* ((t_0 (- (* x1 x1) -1.0))
                                                                                                                 (t_1 (* (* 3.0 x1) x1))
                                                                                                                 (t_2 (+ (* x1 x1) 1.0))
                                                                                                                 (t_3 (/ (- (+ t_1 (* 2.0 x2)) x1) t_2))
                                                                                                                 (t_4
                                                                                                                  (+
                                                                                                                   x1
                                                                                                                   (+
                                                                                                                    (+
                                                                                                                     (+
                                                                                                                      (+
                                                                                                                       (*
                                                                                                                        (+
                                                                                                                         (* (* (* 2.0 x1) t_3) (- t_3 3.0))
                                                                                                                         (* (* x1 x1) (- (* 4.0 t_3) 6.0)))
                                                                                                                        t_2)
                                                                                                                       (* t_1 t_3))
                                                                                                                      (* (* x1 x1) x1))
                                                                                                                     x1)
                                                                                                                    (* 3.0 (/ (- (- t_1 (* 2.0 x2)) x1) t_2)))))
                                                                                                                 (t_5 (- t_1 (+ (+ x2 x2) x1))))
                                                                                                            (if (<= t_4 5e+305)
                                                                                                              (+ (* -1.0 x1) (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                                                                                              (if (<= t_4 INFINITY)
                                                                                                                (/
                                                                                                                 (-
                                                                                                                  (* (* (- (* (* (- 3.0 (+ x2 x2)) x2) -4.0) -2.0) x1) t_0)
                                                                                                                  (* -3.0 t_5))
                                                                                                                 t_0)
                                                                                                                (- (* x1 2.0) (* -3.0 (/ t_5 1.0)))))))
                                                                                                          double code(double x1, double x2) {
                                                                                                          	double t_0 = (x1 * x1) - -1.0;
                                                                                                          	double t_1 = (3.0 * x1) * x1;
                                                                                                          	double t_2 = (x1 * x1) + 1.0;
                                                                                                          	double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
                                                                                                          	double t_4 = x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)));
                                                                                                          	double t_5 = t_1 - ((x2 + x2) + x1);
                                                                                                          	double tmp;
                                                                                                          	if (t_4 <= 5e+305) {
                                                                                                          		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                          	} else if (t_4 <= ((double) INFINITY)) {
                                                                                                          		tmp = (((((((3.0 - (x2 + x2)) * x2) * -4.0) - -2.0) * x1) * t_0) - (-3.0 * t_5)) / t_0;
                                                                                                          	} else {
                                                                                                          		tmp = (x1 * 2.0) - (-3.0 * (t_5 / 1.0));
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          public static double code(double x1, double x2) {
                                                                                                          	double t_0 = (x1 * x1) - -1.0;
                                                                                                          	double t_1 = (3.0 * x1) * x1;
                                                                                                          	double t_2 = (x1 * x1) + 1.0;
                                                                                                          	double t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
                                                                                                          	double t_4 = x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)));
                                                                                                          	double t_5 = t_1 - ((x2 + x2) + x1);
                                                                                                          	double tmp;
                                                                                                          	if (t_4 <= 5e+305) {
                                                                                                          		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                          	} else if (t_4 <= Double.POSITIVE_INFINITY) {
                                                                                                          		tmp = (((((((3.0 - (x2 + x2)) * x2) * -4.0) - -2.0) * x1) * t_0) - (-3.0 * t_5)) / t_0;
                                                                                                          	} else {
                                                                                                          		tmp = (x1 * 2.0) - (-3.0 * (t_5 / 1.0));
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          def code(x1, x2):
                                                                                                          	t_0 = (x1 * x1) - -1.0
                                                                                                          	t_1 = (3.0 * x1) * x1
                                                                                                          	t_2 = (x1 * x1) + 1.0
                                                                                                          	t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2
                                                                                                          	t_4 = x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)))
                                                                                                          	t_5 = t_1 - ((x2 + x2) + x1)
                                                                                                          	tmp = 0
                                                                                                          	if t_4 <= 5e+305:
                                                                                                          		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                                                                          	elif t_4 <= math.inf:
                                                                                                          		tmp = (((((((3.0 - (x2 + x2)) * x2) * -4.0) - -2.0) * x1) * t_0) - (-3.0 * t_5)) / t_0
                                                                                                          	else:
                                                                                                          		tmp = (x1 * 2.0) - (-3.0 * (t_5 / 1.0))
                                                                                                          	return tmp
                                                                                                          
                                                                                                          function code(x1, x2)
                                                                                                          	t_0 = Float64(Float64(x1 * x1) - -1.0)
                                                                                                          	t_1 = Float64(Float64(3.0 * x1) * x1)
                                                                                                          	t_2 = Float64(Float64(x1 * x1) + 1.0)
                                                                                                          	t_3 = Float64(Float64(Float64(t_1 + Float64(2.0 * x2)) - x1) / t_2)
                                                                                                          	t_4 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_3) * Float64(t_3 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_3) - 6.0))) * t_2) + Float64(t_1 * t_3)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_1 - Float64(2.0 * x2)) - x1) / t_2))))
                                                                                                          	t_5 = Float64(t_1 - Float64(Float64(x2 + x2) + x1))
                                                                                                          	tmp = 0.0
                                                                                                          	if (t_4 <= 5e+305)
                                                                                                          		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                                                                          	elseif (t_4 <= Inf)
                                                                                                          		tmp = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(3.0 - Float64(x2 + x2)) * x2) * -4.0) - -2.0) * x1) * t_0) - Float64(-3.0 * t_5)) / t_0);
                                                                                                          	else
                                                                                                          		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(t_5 / 1.0)));
                                                                                                          	end
                                                                                                          	return tmp
                                                                                                          end
                                                                                                          
                                                                                                          function tmp_2 = code(x1, x2)
                                                                                                          	t_0 = (x1 * x1) - -1.0;
                                                                                                          	t_1 = (3.0 * x1) * x1;
                                                                                                          	t_2 = (x1 * x1) + 1.0;
                                                                                                          	t_3 = ((t_1 + (2.0 * x2)) - x1) / t_2;
                                                                                                          	t_4 = x1 + (((((((((2.0 * x1) * t_3) * (t_3 - 3.0)) + ((x1 * x1) * ((4.0 * t_3) - 6.0))) * t_2) + (t_1 * t_3)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_1 - (2.0 * x2)) - x1) / t_2)));
                                                                                                          	t_5 = t_1 - ((x2 + x2) + x1);
                                                                                                          	tmp = 0.0;
                                                                                                          	if (t_4 <= 5e+305)
                                                                                                          		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                          	elseif (t_4 <= Inf)
                                                                                                          		tmp = (((((((3.0 - (x2 + x2)) * x2) * -4.0) - -2.0) * x1) * t_0) - (-3.0 * t_5)) / t_0;
                                                                                                          	else
                                                                                                          		tmp = (x1 * 2.0) - (-3.0 * (t_5 / 1.0));
                                                                                                          	end
                                                                                                          	tmp_2 = tmp;
                                                                                                          end
                                                                                                          
                                                                                                          code[x1_, x2_] := Block[{t$95$0 = N[(N[(x1 * x1), $MachinePrecision] - -1.0), $MachinePrecision]}, Block[{t$95$1 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$1 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t$95$3 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$3), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] + N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$1 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$1 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 5e+305], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[(N[(N[(N[(N[(N[(N[(N[(3.0 - N[(x2 + x2), $MachinePrecision]), $MachinePrecision] * x2), $MachinePrecision] * -4.0), $MachinePrecision] - -2.0), $MachinePrecision] * x1), $MachinePrecision] * t$95$0), $MachinePrecision] - N[(-3.0 * t$95$5), $MachinePrecision]), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(t$95$5 / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
                                                                                                          
                                                                                                          \begin{array}{l}
                                                                                                          t_0 := x1 \cdot x1 - -1\\
                                                                                                          t_1 := \left(3 \cdot x1\right) \cdot x1\\
                                                                                                          t_2 := x1 \cdot x1 + 1\\
                                                                                                          t_3 := \frac{\left(t\_1 + 2 \cdot x2\right) - x1}{t\_2}\\
                                                                                                          t_4 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_3\right) \cdot \left(t\_3 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_3 - 6\right)\right) \cdot t\_2 + t\_1 \cdot t\_3\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_2}\right)\\
                                                                                                          t_5 := t\_1 - \left(\left(x2 + x2\right) + x1\right)\\
                                                                                                          \mathbf{if}\;t\_4 \leq 5 \cdot 10^{+305}:\\
                                                                                                          \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                                                                          
                                                                                                          \mathbf{elif}\;t\_4 \leq \infty:\\
                                                                                                          \;\;\;\;\frac{\left(\left(\left(\left(3 - \left(x2 + x2\right)\right) \cdot x2\right) \cdot -4 - -2\right) \cdot x1\right) \cdot t\_0 - -3 \cdot t\_5}{t\_0}\\
                                                                                                          
                                                                                                          \mathbf{else}:\\
                                                                                                          \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_5}{1}\\
                                                                                                          
                                                                                                          
                                                                                                          \end{array}
                                                                                                          
                                                                                                          Derivation
                                                                                                          1. Split input into 3 regimes
                                                                                                          2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 5.0000000000000001e305

                                                                                                            1. Initial program 69.7%

                                                                                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                            2. Taylor expanded in x1 around 0

                                                                                                              \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. lower-+.f64N/A

                                                                                                                \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                              2. lower-*.f64N/A

                                                                                                                \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                              3. lower-*.f64N/A

                                                                                                                \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                              4. lower--.f64N/A

                                                                                                                \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                            4. Applied rewrites54.3%

                                                                                                              \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                            5. Taylor expanded in x2 around 0

                                                                                                              \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                            6. Step-by-step derivation
                                                                                                              1. lower-+.f64N/A

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                              2. lower-*.f64N/A

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                                                                              3. lower-*.f64N/A

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                                                                              4. lower--.f64N/A

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                              5. lower-+.f64N/A

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                              6. lower-*.f64N/A

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                              7. lower-*.f64N/A

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                              8. lower-*.f6460.4%

                                                                                                                \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                            7. Applied rewrites60.4%

                                                                                                              \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                                                                                            if 5.0000000000000001e305 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                                                                                                            1. Initial program 69.7%

                                                                                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                            2. Applied rewrites69.8%

                                                                                                              \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                            3. Taylor expanded in x1 around 0

                                                                                                              \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. lower-*.f64N/A

                                                                                                                \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              2. lower-+.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              3. lower-*.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              4. lower-*.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              5. lower--.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              6. lower-*.f6448.5%

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            5. Applied rewrites48.5%

                                                                                                              \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            6. Step-by-step derivation
                                                                                                              1. lift--.f64N/A

                                                                                                                \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                            7. Applied rewrites51.0%

                                                                                                              \[\leadsto \color{blue}{\frac{\left(\left(\left(\left(3 - \left(x2 + x2\right)\right) \cdot x2\right) \cdot -4 - -2\right) \cdot x1\right) \cdot \left(x1 \cdot x1 - -1\right) - -3 \cdot \left(\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)\right)}{x1 \cdot x1 - -1}} \]

                                                                                                            if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                                                                                            1. Initial program 69.7%

                                                                                                              \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                            2. Applied rewrites69.8%

                                                                                                              \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                            3. Taylor expanded in x1 around 0

                                                                                                              \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. lower-*.f64N/A

                                                                                                                \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              2. lower-+.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              3. lower-*.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              4. lower-*.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              5. lower--.f64N/A

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                              6. lower-*.f6448.5%

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            5. Applied rewrites48.5%

                                                                                                              \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                            6. Taylor expanded in x1 around 0

                                                                                                              \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                            7. Step-by-step derivation
                                                                                                              1. Applied rewrites68.9%

                                                                                                                \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                              2. Taylor expanded in x2 around 0

                                                                                                                \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites63.4%

                                                                                                                  \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                              4. Recombined 3 regimes into one program.
                                                                                                              5. Add Preprocessing

                                                                                                              Alternative 15: 80.0% accurate, 0.9× speedup?

                                                                                                              \[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_0 - \left(\left(x2 + x2\right) + x1\right)}{1}\\ \end{array} \]
                                                                                                              (FPCore (x1 x2)
                                                                                                                :precision binary64
                                                                                                                (let* ((t_0 (* (* 3.0 x1) x1))
                                                                                                                     (t_1 (+ (* x1 x1) 1.0))
                                                                                                                     (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
                                                                                                                (if (<=
                                                                                                                     (+
                                                                                                                      x1
                                                                                                                      (+
                                                                                                                       (+
                                                                                                                        (+
                                                                                                                         (+
                                                                                                                          (*
                                                                                                                           (+
                                                                                                                            (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                                                                                                            (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                                                                                                           t_1)
                                                                                                                          (* t_0 t_2))
                                                                                                                         (* (* x1 x1) x1))
                                                                                                                        x1)
                                                                                                                       (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
                                                                                                                     INFINITY)
                                                                                                                  (+ (* -1.0 x1) (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))
                                                                                                                  (- (* x1 2.0) (* -3.0 (/ (- t_0 (+ (+ x2 x2) x1)) 1.0))))))
                                                                                                              double code(double x1, double x2) {
                                                                                                              	double t_0 = (3.0 * x1) * x1;
                                                                                                              	double t_1 = (x1 * x1) + 1.0;
                                                                                                              	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                              	double tmp;
                                                                                                              	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= ((double) INFINITY)) {
                                                                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                              	} else {
                                                                                                              		tmp = (x1 * 2.0) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / 1.0));
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              public static double code(double x1, double x2) {
                                                                                                              	double t_0 = (3.0 * x1) * x1;
                                                                                                              	double t_1 = (x1 * x1) + 1.0;
                                                                                                              	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                              	double tmp;
                                                                                                              	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= Double.POSITIVE_INFINITY) {
                                                                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                              	} else {
                                                                                                              		tmp = (x1 * 2.0) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / 1.0));
                                                                                                              	}
                                                                                                              	return tmp;
                                                                                                              }
                                                                                                              
                                                                                                              def code(x1, x2):
                                                                                                              	t_0 = (3.0 * x1) * x1
                                                                                                              	t_1 = (x1 * x1) + 1.0
                                                                                                              	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
                                                                                                              	tmp = 0
                                                                                                              	if (x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= math.inf:
                                                                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                                                                              	else:
                                                                                                              		tmp = (x1 * 2.0) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / 1.0))
                                                                                                              	return tmp
                                                                                                              
                                                                                                              function code(x1, x2)
                                                                                                              	t_0 = Float64(Float64(3.0 * x1) * x1)
                                                                                                              	t_1 = Float64(Float64(x1 * x1) + 1.0)
                                                                                                              	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                                                                                                              	tmp = 0.0
                                                                                                              	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= Inf)
                                                                                                              		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                                                                              	else
                                                                                                              		tmp = Float64(Float64(x1 * 2.0) - Float64(-3.0 * Float64(Float64(t_0 - Float64(Float64(x2 + x2) + x1)) / 1.0)));
                                                                                                              	end
                                                                                                              	return tmp
                                                                                                              end
                                                                                                              
                                                                                                              function tmp_2 = code(x1, x2)
                                                                                                              	t_0 = (3.0 * x1) * x1;
                                                                                                              	t_1 = (x1 * x1) + 1.0;
                                                                                                              	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                              	tmp = 0.0;
                                                                                                              	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= Inf)
                                                                                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                              	else
                                                                                                              		tmp = (x1 * 2.0) - (-3.0 * ((t_0 - ((x2 + x2) + x1)) / 1.0));
                                                                                                              	end
                                                                                                              	tmp_2 = tmp;
                                                                                                              end
                                                                                                              
                                                                                                              code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x1 * 2.0), $MachinePrecision] - N[(-3.0 * N[(N[(t$95$0 - N[(N[(x2 + x2), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] / 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                                              
                                                                                                              \begin{array}{l}
                                                                                                              t_0 := \left(3 \cdot x1\right) \cdot x1\\
                                                                                                              t_1 := x1 \cdot x1 + 1\\
                                                                                                              t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                                                                                              \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
                                                                                                              \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                                                                              
                                                                                                              \mathbf{else}:\\
                                                                                                              \;\;\;\;x1 \cdot 2 - -3 \cdot \frac{t\_0 - \left(\left(x2 + x2\right) + x1\right)}{1}\\
                                                                                                              
                                                                                                              
                                                                                                              \end{array}
                                                                                                              
                                                                                                              Derivation
                                                                                                              1. Split input into 2 regimes
                                                                                                              2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < +inf.0

                                                                                                                1. Initial program 69.7%

                                                                                                                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                2. Taylor expanded in x1 around 0

                                                                                                                  \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. lower-+.f64N/A

                                                                                                                    \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                  2. lower-*.f64N/A

                                                                                                                    \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                  3. lower-*.f64N/A

                                                                                                                    \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                  4. lower--.f64N/A

                                                                                                                    \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                4. Applied rewrites54.3%

                                                                                                                  \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                5. Taylor expanded in x2 around 0

                                                                                                                  \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                                6. Step-by-step derivation
                                                                                                                  1. lower-+.f64N/A

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                                  2. lower-*.f64N/A

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                                                                                  3. lower-*.f64N/A

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                                                                                  4. lower--.f64N/A

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                  5. lower-+.f64N/A

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                  6. lower-*.f64N/A

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                  7. lower-*.f64N/A

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                  8. lower-*.f6460.4%

                                                                                                                    \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                7. Applied rewrites60.4%

                                                                                                                  \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]

                                                                                                                if +inf.0 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                                                                                                1. Initial program 69.7%

                                                                                                                  \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                2. Applied rewrites69.8%

                                                                                                                  \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                                3. Taylor expanded in x1 around 0

                                                                                                                  \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                4. Step-by-step derivation
                                                                                                                  1. lower-*.f64N/A

                                                                                                                    \[\leadsto x1 \cdot \color{blue}{\left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                  2. lower-+.f64N/A

                                                                                                                    \[\leadsto x1 \cdot \left(2 + \color{blue}{-4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                  3. lower-*.f64N/A

                                                                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \color{blue}{\left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)}\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                  4. lower-*.f64N/A

                                                                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \color{blue}{\left(3 - 2 \cdot x2\right)}\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                  5. lower--.f64N/A

                                                                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - \color{blue}{2 \cdot x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                  6. lower-*.f6448.5%

                                                                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot \color{blue}{x2}\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                5. Applied rewrites48.5%

                                                                                                                  \[\leadsto \color{blue}{x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right)} - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1} \]
                                                                                                                6. Taylor expanded in x1 around 0

                                                                                                                  \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                                7. Step-by-step derivation
                                                                                                                  1. Applied rewrites68.9%

                                                                                                                    \[\leadsto x1 \cdot \left(2 + -4 \cdot \left(x2 \cdot \left(3 - 2 \cdot x2\right)\right)\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{\color{blue}{1}} \]
                                                                                                                  2. Taylor expanded in x2 around 0

                                                                                                                    \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites63.4%

                                                                                                                      \[\leadsto x1 \cdot 2 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{1} \]
                                                                                                                  4. Recombined 2 regimes into one program.
                                                                                                                  5. Add Preprocessing

                                                                                                                  Alternative 16: 69.0% accurate, 7.3× speedup?

                                                                                                                  \[\begin{array}{l} \mathbf{if}\;x1 \leq -1.95 \cdot 10^{+76}:\\ \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \end{array} \]
                                                                                                                  (FPCore (x1 x2)
                                                                                                                    :precision binary64
                                                                                                                    (if (<= x1 -1.95e+76)
                                                                                                                    (* x2 (- (+ (* -12.0 x1) (* -1.0 (/ x1 x2))) 6.0))
                                                                                                                    (+ (* -1.0 x1) (* x2 (- (+ (* -12.0 x1) (* 8.0 (* x1 x2))) 6.0)))))
                                                                                                                  double code(double x1, double x2) {
                                                                                                                  	double tmp;
                                                                                                                  	if (x1 <= -1.95e+76) {
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                                  	} else {
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.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(x1, x2)
                                                                                                                  use fmin_fmax_functions
                                                                                                                      real(8), intent (in) :: x1
                                                                                                                      real(8), intent (in) :: x2
                                                                                                                      real(8) :: tmp
                                                                                                                      if (x1 <= (-1.95d+76)) then
                                                                                                                          tmp = x2 * ((((-12.0d0) * x1) + ((-1.0d0) * (x1 / x2))) - 6.0d0)
                                                                                                                      else
                                                                                                                          tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                                                                                      end if
                                                                                                                      code = tmp
                                                                                                                  end function
                                                                                                                  
                                                                                                                  public static double code(double x1, double x2) {
                                                                                                                  	double tmp;
                                                                                                                  	if (x1 <= -1.95e+76) {
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                                  	} else {
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  def code(x1, x2):
                                                                                                                  	tmp = 0
                                                                                                                  	if x1 <= -1.95e+76:
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0)
                                                                                                                  	else:
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                                                                                  	return tmp
                                                                                                                  
                                                                                                                  function code(x1, x2)
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (x1 <= -1.95e+76)
                                                                                                                  		tmp = Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(-1.0 * Float64(x1 / x2))) - 6.0));
                                                                                                                  	else
                                                                                                                  		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                                                                                  	end
                                                                                                                  	return tmp
                                                                                                                  end
                                                                                                                  
                                                                                                                  function tmp_2 = code(x1, x2)
                                                                                                                  	tmp = 0.0;
                                                                                                                  	if (x1 <= -1.95e+76)
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                                  	else
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                                                                                  	end
                                                                                                                  	tmp_2 = tmp;
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x1_, x2_] := If[LessEqual[x1, -1.95e+76], N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(-1.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(8.0 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  \mathbf{if}\;x1 \leq -1.95 \cdot 10^{+76}:\\
                                                                                                                  \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Split input into 2 regimes
                                                                                                                  2. if x1 < -1.9499999999999999e76

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Taylor expanded in x2 around inf

                                                                                                                      \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]
                                                                                                                    9. Step-by-step derivation
                                                                                                                      1. lower-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      2. lower--.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      3. lower-+.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      4. lower-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      5. lower-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      6. lower-/.f6449.4%

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                    10. Applied rewrites49.4%

                                                                                                                      \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]

                                                                                                                    if -1.9499999999999999e76 < x1

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right)} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                      5. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                      6. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                      7. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                      8. lower-*.f6460.4%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right) \]
                                                                                                                    7. Applied rewrites60.4%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)} \]
                                                                                                                  3. Recombined 2 regimes into one program.
                                                                                                                  4. Add Preprocessing

                                                                                                                  Alternative 17: 64.5% accurate, 6.2× speedup?

                                                                                                                  \[\begin{array}{l} t_0 := -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right)\\ \mathbf{if}\;x1 \leq -1.95 \cdot 10^{+76}:\\ \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\ \mathbf{elif}\;x1 \leq -1.15 \cdot 10^{-169}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-162}:\\ \;\;\;\;\left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                                                                                  (FPCore (x1 x2)
                                                                                                                    :precision binary64
                                                                                                                    (let* ((t_0
                                                                                                                          (+ (* -6.0 x2) (* x1 (- (* x2 (- (* 8.0 x2) 12.0)) 1.0)))))
                                                                                                                    (if (<= x1 -1.95e+76)
                                                                                                                      (* x2 (- (+ (* -12.0 x1) (* -1.0 (/ x1 x2))) 6.0))
                                                                                                                      (if (<= x1 -1.15e-169)
                                                                                                                        t_0
                                                                                                                        (if (<= x1 2.6e-162)
                                                                                                                          (+ (* (- (* -12.0 x1) 6.0) x2) (- x1))
                                                                                                                          t_0)))))
                                                                                                                  double code(double x1, double x2) {
                                                                                                                  	double t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                                                                                  	double tmp;
                                                                                                                  	if (x1 <= -1.95e+76) {
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                                  	} else if (x1 <= -1.15e-169) {
                                                                                                                  		tmp = t_0;
                                                                                                                  	} else if (x1 <= 2.6e-162) {
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                  	} else {
                                                                                                                  		tmp = t_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(x1, x2)
                                                                                                                  use fmin_fmax_functions
                                                                                                                      real(8), intent (in) :: x1
                                                                                                                      real(8), intent (in) :: x2
                                                                                                                      real(8) :: t_0
                                                                                                                      real(8) :: tmp
                                                                                                                      t_0 = ((-6.0d0) * x2) + (x1 * ((x2 * ((8.0d0 * x2) - 12.0d0)) - 1.0d0))
                                                                                                                      if (x1 <= (-1.95d+76)) then
                                                                                                                          tmp = x2 * ((((-12.0d0) * x1) + ((-1.0d0) * (x1 / x2))) - 6.0d0)
                                                                                                                      else if (x1 <= (-1.15d-169)) then
                                                                                                                          tmp = t_0
                                                                                                                      else if (x1 <= 2.6d-162) then
                                                                                                                          tmp = ((((-12.0d0) * x1) - 6.0d0) * x2) + -x1
                                                                                                                      else
                                                                                                                          tmp = t_0
                                                                                                                      end if
                                                                                                                      code = tmp
                                                                                                                  end function
                                                                                                                  
                                                                                                                  public static double code(double x1, double x2) {
                                                                                                                  	double t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                                                                                  	double tmp;
                                                                                                                  	if (x1 <= -1.95e+76) {
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                                  	} else if (x1 <= -1.15e-169) {
                                                                                                                  		tmp = t_0;
                                                                                                                  	} else if (x1 <= 2.6e-162) {
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                  	} else {
                                                                                                                  		tmp = t_0;
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  def code(x1, x2):
                                                                                                                  	t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0))
                                                                                                                  	tmp = 0
                                                                                                                  	if x1 <= -1.95e+76:
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0)
                                                                                                                  	elif x1 <= -1.15e-169:
                                                                                                                  		tmp = t_0
                                                                                                                  	elif x1 <= 2.6e-162:
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1
                                                                                                                  	else:
                                                                                                                  		tmp = t_0
                                                                                                                  	return tmp
                                                                                                                  
                                                                                                                  function code(x1, x2)
                                                                                                                  	t_0 = Float64(Float64(-6.0 * x2) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(8.0 * x2) - 12.0)) - 1.0)))
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (x1 <= -1.95e+76)
                                                                                                                  		tmp = Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(-1.0 * Float64(x1 / x2))) - 6.0));
                                                                                                                  	elseif (x1 <= -1.15e-169)
                                                                                                                  		tmp = t_0;
                                                                                                                  	elseif (x1 <= 2.6e-162)
                                                                                                                  		tmp = Float64(Float64(Float64(Float64(-12.0 * x1) - 6.0) * x2) + Float64(-x1));
                                                                                                                  	else
                                                                                                                  		tmp = t_0;
                                                                                                                  	end
                                                                                                                  	return tmp
                                                                                                                  end
                                                                                                                  
                                                                                                                  function tmp_2 = code(x1, x2)
                                                                                                                  	t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                                                                                  	tmp = 0.0;
                                                                                                                  	if (x1 <= -1.95e+76)
                                                                                                                  		tmp = x2 * (((-12.0 * x1) + (-1.0 * (x1 / x2))) - 6.0);
                                                                                                                  	elseif (x1 <= -1.15e-169)
                                                                                                                  		tmp = t_0;
                                                                                                                  	elseif (x1 <= 2.6e-162)
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                  	else
                                                                                                                  		tmp = t_0;
                                                                                                                  	end
                                                                                                                  	tmp_2 = tmp;
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[(-6.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(8.0 * x2), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.95e+76], N[(x2 * N[(N[(N[(-12.0 * x1), $MachinePrecision] + N[(-1.0 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.15e-169], t$95$0, If[LessEqual[x1, 2.6e-162], N[(N[(N[(N[(-12.0 * x1), $MachinePrecision] - 6.0), $MachinePrecision] * x2), $MachinePrecision] + (-x1)), $MachinePrecision], t$95$0]]]]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  t_0 := -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right)\\
                                                                                                                  \mathbf{if}\;x1 \leq -1.95 \cdot 10^{+76}:\\
                                                                                                                  \;\;\;\;x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right)\\
                                                                                                                  
                                                                                                                  \mathbf{elif}\;x1 \leq -1.15 \cdot 10^{-169}:\\
                                                                                                                  \;\;\;\;t\_0\\
                                                                                                                  
                                                                                                                  \mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-162}:\\
                                                                                                                  \;\;\;\;\left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right)\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;t\_0\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Split input into 3 regimes
                                                                                                                  2. if x1 < -1.9499999999999999e76

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Taylor expanded in x2 around inf

                                                                                                                      \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]
                                                                                                                    9. Step-by-step derivation
                                                                                                                      1. lower-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      2. lower--.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      3. lower-+.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      4. lower-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      5. lower-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                      6. lower-/.f6449.4%

                                                                                                                        \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - 6\right) \]
                                                                                                                    10. Applied rewrites49.4%

                                                                                                                      \[\leadsto x2 \cdot \left(\left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) - \color{blue}{6}\right) \]

                                                                                                                    if -1.9499999999999999e76 < x1 < -1.15e-169 or 2.6e-162 < x1

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                      2. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                      3. lower-*.f6454.3%

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                    7. Applied rewrites54.3%

                                                                                                                      \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]

                                                                                                                    if -1.15e-169 < x1 < 2.6e-162

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Step-by-step derivation
                                                                                                                      1. lift-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lift-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. mul-1-negN/A

                                                                                                                        \[\leadsto \left(\mathsf{neg}\left(x1\right)\right) + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      4. +-commutativeN/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      5. lower-+.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      6. lift-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      7. *-commutativeN/A

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      8. lower-*.f64N/A

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      9. lower-neg.f6443.8%

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right) \]
                                                                                                                    9. Applied rewrites43.8%

                                                                                                                      \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right) \]
                                                                                                                  3. Recombined 3 regimes into one program.
                                                                                                                  4. Add Preprocessing

                                                                                                                  Alternative 18: 58.9% accurate, 6.2× speedup?

                                                                                                                  \[\begin{array}{l} t_0 := -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right)\\ \mathbf{if}\;x1 \leq -8 \cdot 10^{+92}:\\ \;\;\;\;x1 \cdot \left(-12 \cdot x2 - 1\right)\\ \mathbf{elif}\;x1 \leq -1.15 \cdot 10^{-169}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-162}:\\ \;\;\;\;\left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                                                                                  (FPCore (x1 x2)
                                                                                                                    :precision binary64
                                                                                                                    (let* ((t_0
                                                                                                                          (+ (* -6.0 x2) (* x1 (- (* x2 (- (* 8.0 x2) 12.0)) 1.0)))))
                                                                                                                    (if (<= x1 -8e+92)
                                                                                                                      (* x1 (- (* -12.0 x2) 1.0))
                                                                                                                      (if (<= x1 -1.15e-169)
                                                                                                                        t_0
                                                                                                                        (if (<= x1 2.6e-162)
                                                                                                                          (+ (* (- (* -12.0 x1) 6.0) x2) (- x1))
                                                                                                                          t_0)))))
                                                                                                                  double code(double x1, double x2) {
                                                                                                                  	double t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                                                                                  	double tmp;
                                                                                                                  	if (x1 <= -8e+92) {
                                                                                                                  		tmp = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                  	} else if (x1 <= -1.15e-169) {
                                                                                                                  		tmp = t_0;
                                                                                                                  	} else if (x1 <= 2.6e-162) {
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                  	} else {
                                                                                                                  		tmp = t_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(x1, x2)
                                                                                                                  use fmin_fmax_functions
                                                                                                                      real(8), intent (in) :: x1
                                                                                                                      real(8), intent (in) :: x2
                                                                                                                      real(8) :: t_0
                                                                                                                      real(8) :: tmp
                                                                                                                      t_0 = ((-6.0d0) * x2) + (x1 * ((x2 * ((8.0d0 * x2) - 12.0d0)) - 1.0d0))
                                                                                                                      if (x1 <= (-8d+92)) then
                                                                                                                          tmp = x1 * (((-12.0d0) * x2) - 1.0d0)
                                                                                                                      else if (x1 <= (-1.15d-169)) then
                                                                                                                          tmp = t_0
                                                                                                                      else if (x1 <= 2.6d-162) then
                                                                                                                          tmp = ((((-12.0d0) * x1) - 6.0d0) * x2) + -x1
                                                                                                                      else
                                                                                                                          tmp = t_0
                                                                                                                      end if
                                                                                                                      code = tmp
                                                                                                                  end function
                                                                                                                  
                                                                                                                  public static double code(double x1, double x2) {
                                                                                                                  	double t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                                                                                  	double tmp;
                                                                                                                  	if (x1 <= -8e+92) {
                                                                                                                  		tmp = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                  	} else if (x1 <= -1.15e-169) {
                                                                                                                  		tmp = t_0;
                                                                                                                  	} else if (x1 <= 2.6e-162) {
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                  	} else {
                                                                                                                  		tmp = t_0;
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  def code(x1, x2):
                                                                                                                  	t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0))
                                                                                                                  	tmp = 0
                                                                                                                  	if x1 <= -8e+92:
                                                                                                                  		tmp = x1 * ((-12.0 * x2) - 1.0)
                                                                                                                  	elif x1 <= -1.15e-169:
                                                                                                                  		tmp = t_0
                                                                                                                  	elif x1 <= 2.6e-162:
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1
                                                                                                                  	else:
                                                                                                                  		tmp = t_0
                                                                                                                  	return tmp
                                                                                                                  
                                                                                                                  function code(x1, x2)
                                                                                                                  	t_0 = Float64(Float64(-6.0 * x2) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(8.0 * x2) - 12.0)) - 1.0)))
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (x1 <= -8e+92)
                                                                                                                  		tmp = Float64(x1 * Float64(Float64(-12.0 * x2) - 1.0));
                                                                                                                  	elseif (x1 <= -1.15e-169)
                                                                                                                  		tmp = t_0;
                                                                                                                  	elseif (x1 <= 2.6e-162)
                                                                                                                  		tmp = Float64(Float64(Float64(Float64(-12.0 * x1) - 6.0) * x2) + Float64(-x1));
                                                                                                                  	else
                                                                                                                  		tmp = t_0;
                                                                                                                  	end
                                                                                                                  	return tmp
                                                                                                                  end
                                                                                                                  
                                                                                                                  function tmp_2 = code(x1, x2)
                                                                                                                  	t_0 = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                                                                                  	tmp = 0.0;
                                                                                                                  	if (x1 <= -8e+92)
                                                                                                                  		tmp = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                  	elseif (x1 <= -1.15e-169)
                                                                                                                  		tmp = t_0;
                                                                                                                  	elseif (x1 <= 2.6e-162)
                                                                                                                  		tmp = (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                  	else
                                                                                                                  		tmp = t_0;
                                                                                                                  	end
                                                                                                                  	tmp_2 = tmp;
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[(-6.0 * x2), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(8.0 * x2), $MachinePrecision] - 12.0), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -8e+92], N[(x1 * N[(N[(-12.0 * x2), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, -1.15e-169], t$95$0, If[LessEqual[x1, 2.6e-162], N[(N[(N[(N[(-12.0 * x1), $MachinePrecision] - 6.0), $MachinePrecision] * x2), $MachinePrecision] + (-x1)), $MachinePrecision], t$95$0]]]]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  t_0 := -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right)\\
                                                                                                                  \mathbf{if}\;x1 \leq -8 \cdot 10^{+92}:\\
                                                                                                                  \;\;\;\;x1 \cdot \left(-12 \cdot x2 - 1\right)\\
                                                                                                                  
                                                                                                                  \mathbf{elif}\;x1 \leq -1.15 \cdot 10^{-169}:\\
                                                                                                                  \;\;\;\;t\_0\\
                                                                                                                  
                                                                                                                  \mathbf{elif}\;x1 \leq 2.6 \cdot 10^{-162}:\\
                                                                                                                  \;\;\;\;\left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right)\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;t\_0\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Split input into 3 regimes
                                                                                                                  2. if x1 < -8.0000000000000003e92

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Taylor expanded in x1 around inf

                                                                                                                      \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                                                                                    9. Step-by-step derivation
                                                                                                                      1. lower-*.f64N/A

                                                                                                                        \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                      2. lower--.f64N/A

                                                                                                                        \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                      3. lower-*.f6420.2%

                                                                                                                        \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                    10. Applied rewrites20.2%

                                                                                                                      \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]

                                                                                                                    if -8.0000000000000003e92 < x1 < -1.15e-169 or 2.6e-162 < x1

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                      2. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                      3. lower-*.f6454.3%

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]
                                                                                                                    7. Applied rewrites54.3%

                                                                                                                      \[\leadsto -6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right) \]

                                                                                                                    if -1.15e-169 < x1 < 2.6e-162

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Step-by-step derivation
                                                                                                                      1. lift-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lift-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. mul-1-negN/A

                                                                                                                        \[\leadsto \left(\mathsf{neg}\left(x1\right)\right) + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      4. +-commutativeN/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      5. lower-+.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      6. lift-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      7. *-commutativeN/A

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      8. lower-*.f64N/A

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      9. lower-neg.f6443.8%

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right) \]
                                                                                                                    9. Applied rewrites43.8%

                                                                                                                      \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right) \]
                                                                                                                  3. Recombined 3 regimes into one program.
                                                                                                                  4. Add Preprocessing

                                                                                                                  Alternative 19: 53.7% accurate, 0.5× speedup?

                                                                                                                  \[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ t_4 := x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\ \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+306}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq 10^{+231}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;t\_4\\ \end{array} \]
                                                                                                                  (FPCore (x1 x2)
                                                                                                                    :precision binary64
                                                                                                                    (let* ((t_0 (* (* 3.0 x1) x1))
                                                                                                                         (t_1 (+ (* x1 x1) 1.0))
                                                                                                                         (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1))
                                                                                                                         (t_3
                                                                                                                          (+
                                                                                                                           x1
                                                                                                                           (+
                                                                                                                            (+
                                                                                                                             (+
                                                                                                                              (+
                                                                                                                               (*
                                                                                                                                (+
                                                                                                                                 (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                                                                                                                 (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                                                                                                                t_1)
                                                                                                                               (* t_0 t_2))
                                                                                                                              (* (* x1 x1) x1))
                                                                                                                             x1)
                                                                                                                            (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1)))))
                                                                                                                         (t_4 (* x1 (- (* 4.0 (* x2 (- (* 2.0 x2) 3.0))) 1.0))))
                                                                                                                    (if (<= t_3 -2e+306)
                                                                                                                      t_4
                                                                                                                      (if (<= t_3 1e+231) (+ (* -1.0 x1) (* x2 -6.0)) t_4))))
                                                                                                                  double code(double x1, double x2) {
                                                                                                                  	double t_0 = (3.0 * x1) * x1;
                                                                                                                  	double t_1 = (x1 * x1) + 1.0;
                                                                                                                  	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                                  	double t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                                                                                                                  	double t_4 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                                                                                  	double tmp;
                                                                                                                  	if (t_3 <= -2e+306) {
                                                                                                                  		tmp = t_4;
                                                                                                                  	} else if (t_3 <= 1e+231) {
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                                                                                  	} else {
                                                                                                                  		tmp = t_4;
                                                                                                                  	}
                                                                                                                  	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(x1, x2)
                                                                                                                  use fmin_fmax_functions
                                                                                                                      real(8), intent (in) :: x1
                                                                                                                      real(8), intent (in) :: x2
                                                                                                                      real(8) :: t_0
                                                                                                                      real(8) :: t_1
                                                                                                                      real(8) :: t_2
                                                                                                                      real(8) :: t_3
                                                                                                                      real(8) :: t_4
                                                                                                                      real(8) :: tmp
                                                                                                                      t_0 = (3.0d0 * x1) * x1
                                                                                                                      t_1 = (x1 * x1) + 1.0d0
                                                                                                                      t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
                                                                                                                      t_3 = x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))
                                                                                                                      t_4 = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 1.0d0)
                                                                                                                      if (t_3 <= (-2d+306)) then
                                                                                                                          tmp = t_4
                                                                                                                      else if (t_3 <= 1d+231) then
                                                                                                                          tmp = ((-1.0d0) * x1) + (x2 * (-6.0d0))
                                                                                                                      else
                                                                                                                          tmp = t_4
                                                                                                                      end if
                                                                                                                      code = tmp
                                                                                                                  end function
                                                                                                                  
                                                                                                                  public static double code(double x1, double x2) {
                                                                                                                  	double t_0 = (3.0 * x1) * x1;
                                                                                                                  	double t_1 = (x1 * x1) + 1.0;
                                                                                                                  	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                                  	double t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                                                                                                                  	double t_4 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                                                                                  	double tmp;
                                                                                                                  	if (t_3 <= -2e+306) {
                                                                                                                  		tmp = t_4;
                                                                                                                  	} else if (t_3 <= 1e+231) {
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                                                                                  	} else {
                                                                                                                  		tmp = t_4;
                                                                                                                  	}
                                                                                                                  	return tmp;
                                                                                                                  }
                                                                                                                  
                                                                                                                  def code(x1, x2):
                                                                                                                  	t_0 = (3.0 * x1) * x1
                                                                                                                  	t_1 = (x1 * x1) + 1.0
                                                                                                                  	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
                                                                                                                  	t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))
                                                                                                                  	t_4 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0)
                                                                                                                  	tmp = 0
                                                                                                                  	if t_3 <= -2e+306:
                                                                                                                  		tmp = t_4
                                                                                                                  	elif t_3 <= 1e+231:
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * -6.0)
                                                                                                                  	else:
                                                                                                                  		tmp = t_4
                                                                                                                  	return tmp
                                                                                                                  
                                                                                                                  function code(x1, x2)
                                                                                                                  	t_0 = Float64(Float64(3.0 * x1) * x1)
                                                                                                                  	t_1 = Float64(Float64(x1 * x1) + 1.0)
                                                                                                                  	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                                                                                                                  	t_3 = Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1))))
                                                                                                                  	t_4 = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 1.0))
                                                                                                                  	tmp = 0.0
                                                                                                                  	if (t_3 <= -2e+306)
                                                                                                                  		tmp = t_4;
                                                                                                                  	elseif (t_3 <= 1e+231)
                                                                                                                  		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * -6.0));
                                                                                                                  	else
                                                                                                                  		tmp = t_4;
                                                                                                                  	end
                                                                                                                  	return tmp
                                                                                                                  end
                                                                                                                  
                                                                                                                  function tmp_2 = code(x1, x2)
                                                                                                                  	t_0 = (3.0 * x1) * x1;
                                                                                                                  	t_1 = (x1 * x1) + 1.0;
                                                                                                                  	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                                  	t_3 = x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)));
                                                                                                                  	t_4 = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                                                                                  	tmp = 0.0;
                                                                                                                  	if (t_3 <= -2e+306)
                                                                                                                  		tmp = t_4;
                                                                                                                  	elseif (t_3 <= 1e+231)
                                                                                                                  		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                                                                                  	else
                                                                                                                  		tmp = t_4;
                                                                                                                  	end
                                                                                                                  	tmp_2 = tmp;
                                                                                                                  end
                                                                                                                  
                                                                                                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(x1 * N[(N[(4.0 * N[(x2 * N[(N[(2.0 * x2), $MachinePrecision] - 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+306], t$95$4, If[LessEqual[t$95$3, 1e+231], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]
                                                                                                                  
                                                                                                                  \begin{array}{l}
                                                                                                                  t_0 := \left(3 \cdot x1\right) \cdot x1\\
                                                                                                                  t_1 := x1 \cdot x1 + 1\\
                                                                                                                  t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                                                                                                  t_3 := x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
                                                                                                                  t_4 := x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\
                                                                                                                  \mathbf{if}\;t\_3 \leq -2 \cdot 10^{+306}:\\
                                                                                                                  \;\;\;\;t\_4\\
                                                                                                                  
                                                                                                                  \mathbf{elif}\;t\_3 \leq 10^{+231}:\\
                                                                                                                  \;\;\;\;-1 \cdot x1 + x2 \cdot -6\\
                                                                                                                  
                                                                                                                  \mathbf{else}:\\
                                                                                                                  \;\;\;\;t\_4\\
                                                                                                                  
                                                                                                                  
                                                                                                                  \end{array}
                                                                                                                  
                                                                                                                  Derivation
                                                                                                                  1. Split input into 2 regimes
                                                                                                                  2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < -2e306 or 1.0000000000000001e231 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Taylor expanded in x1 around inf

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

                                                                                                                        \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                      2. lower--.f64N/A

                                                                                                                        \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      4. lower-*.f64N/A

                                                                                                                        \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      5. lower--.f64N/A

                                                                                                                        \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      6. lower-*.f6433.4%

                                                                                                                        \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                    10. Applied rewrites33.4%

                                                                                                                      \[\leadsto x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]

                                                                                                                    if -2e306 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1.0000000000000001e231

                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + x2 \cdot -6 \]
                                                                                                                    9. Step-by-step derivation
                                                                                                                      1. Applied rewrites37.9%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot -6 \]
                                                                                                                    10. Recombined 2 regimes into one program.
                                                                                                                    11. Add Preprocessing

                                                                                                                    Alternative 20: 43.8% accurate, 15.7× speedup?

                                                                                                                    \[\left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right) \]
                                                                                                                    (FPCore (x1 x2)
                                                                                                                      :precision binary64
                                                                                                                      (+ (* (- (* -12.0 x1) 6.0) x2) (- x1)))
                                                                                                                    double code(double x1, double x2) {
                                                                                                                    	return (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                    }
                                                                                                                    
                                                                                                                    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(x1, x2)
                                                                                                                    use fmin_fmax_functions
                                                                                                                        real(8), intent (in) :: x1
                                                                                                                        real(8), intent (in) :: x2
                                                                                                                        code = ((((-12.0d0) * x1) - 6.0d0) * x2) + -x1
                                                                                                                    end function
                                                                                                                    
                                                                                                                    public static double code(double x1, double x2) {
                                                                                                                    	return (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                    }
                                                                                                                    
                                                                                                                    def code(x1, x2):
                                                                                                                    	return (((-12.0 * x1) - 6.0) * x2) + -x1
                                                                                                                    
                                                                                                                    function code(x1, x2)
                                                                                                                    	return Float64(Float64(Float64(Float64(-12.0 * x1) - 6.0) * x2) + Float64(-x1))
                                                                                                                    end
                                                                                                                    
                                                                                                                    function tmp = code(x1, x2)
                                                                                                                    	tmp = (((-12.0 * x1) - 6.0) * x2) + -x1;
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[x1_, x2_] := N[(N[(N[(N[(-12.0 * x1), $MachinePrecision] - 6.0), $MachinePrecision] * x2), $MachinePrecision] + (-x1)), $MachinePrecision]
                                                                                                                    
                                                                                                                    \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right)
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Initial program 69.7%

                                                                                                                      \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                    2. Taylor expanded in x1 around 0

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                    4. Applied rewrites54.3%

                                                                                                                      \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                    5. Taylor expanded in x2 around 0

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. lower-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. lower-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                      4. lower--.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      5. lower-*.f6443.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                    7. Applied rewrites43.8%

                                                                                                                      \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                    8. Step-by-step derivation
                                                                                                                      1. lift-+.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      2. lift-*.f64N/A

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      3. mul-1-negN/A

                                                                                                                        \[\leadsto \left(\mathsf{neg}\left(x1\right)\right) + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                      4. +-commutativeN/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      5. lower-+.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      6. lift-*.f64N/A

                                                                                                                        \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      7. *-commutativeN/A

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      8. lower-*.f64N/A

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(\mathsf{neg}\left(x1\right)\right) \]
                                                                                                                      9. lower-neg.f6443.8%

                                                                                                                        \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right) \]
                                                                                                                    9. Applied rewrites43.8%

                                                                                                                      \[\leadsto \left(-12 \cdot x1 - 6\right) \cdot x2 + \left(-x1\right) \]
                                                                                                                    10. Add Preprocessing

                                                                                                                    Alternative 21: 43.2% accurate, 0.9× speedup?

                                                                                                                    \[\begin{array}{l} t_0 := \left(3 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\ \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq 10^{+308}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(-12 \cdot x2 - 1\right)\\ \end{array} \]
                                                                                                                    (FPCore (x1 x2)
                                                                                                                      :precision binary64
                                                                                                                      (let* ((t_0 (* (* 3.0 x1) x1))
                                                                                                                           (t_1 (+ (* x1 x1) 1.0))
                                                                                                                           (t_2 (/ (- (+ t_0 (* 2.0 x2)) x1) t_1)))
                                                                                                                      (if (<=
                                                                                                                           (+
                                                                                                                            x1
                                                                                                                            (+
                                                                                                                             (+
                                                                                                                              (+
                                                                                                                               (+
                                                                                                                                (*
                                                                                                                                 (+
                                                                                                                                  (* (* (* 2.0 x1) t_2) (- t_2 3.0))
                                                                                                                                  (* (* x1 x1) (- (* 4.0 t_2) 6.0)))
                                                                                                                                 t_1)
                                                                                                                                (* t_0 t_2))
                                                                                                                               (* (* x1 x1) x1))
                                                                                                                              x1)
                                                                                                                             (* 3.0 (/ (- (- t_0 (* 2.0 x2)) x1) t_1))))
                                                                                                                           1e+308)
                                                                                                                        (+ (* -1.0 x1) (* x2 -6.0))
                                                                                                                        (* x1 (- (* -12.0 x2) 1.0)))))
                                                                                                                    double code(double x1, double x2) {
                                                                                                                    	double t_0 = (3.0 * x1) * x1;
                                                                                                                    	double t_1 = (x1 * x1) + 1.0;
                                                                                                                    	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                                    	double tmp;
                                                                                                                    	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= 1e+308) {
                                                                                                                    		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                                                                                    	} else {
                                                                                                                    		tmp = x1 * ((-12.0 * x2) - 1.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(x1, x2)
                                                                                                                    use fmin_fmax_functions
                                                                                                                        real(8), intent (in) :: x1
                                                                                                                        real(8), intent (in) :: x2
                                                                                                                        real(8) :: t_0
                                                                                                                        real(8) :: t_1
                                                                                                                        real(8) :: t_2
                                                                                                                        real(8) :: tmp
                                                                                                                        t_0 = (3.0d0 * x1) * x1
                                                                                                                        t_1 = (x1 * x1) + 1.0d0
                                                                                                                        t_2 = ((t_0 + (2.0d0 * x2)) - x1) / t_1
                                                                                                                        if ((x1 + (((((((((2.0d0 * x1) * t_2) * (t_2 - 3.0d0)) + ((x1 * x1) * ((4.0d0 * t_2) - 6.0d0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0d0 * (((t_0 - (2.0d0 * x2)) - x1) / t_1)))) <= 1d+308) then
                                                                                                                            tmp = ((-1.0d0) * x1) + (x2 * (-6.0d0))
                                                                                                                        else
                                                                                                                            tmp = x1 * (((-12.0d0) * x2) - 1.0d0)
                                                                                                                        end if
                                                                                                                        code = tmp
                                                                                                                    end function
                                                                                                                    
                                                                                                                    public static double code(double x1, double x2) {
                                                                                                                    	double t_0 = (3.0 * x1) * x1;
                                                                                                                    	double t_1 = (x1 * x1) + 1.0;
                                                                                                                    	double t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                                    	double tmp;
                                                                                                                    	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= 1e+308) {
                                                                                                                    		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                                                                                    	} else {
                                                                                                                    		tmp = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                    	}
                                                                                                                    	return tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    def code(x1, x2):
                                                                                                                    	t_0 = (3.0 * x1) * x1
                                                                                                                    	t_1 = (x1 * x1) + 1.0
                                                                                                                    	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1
                                                                                                                    	tmp = 0
                                                                                                                    	if (x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= 1e+308:
                                                                                                                    		tmp = (-1.0 * x1) + (x2 * -6.0)
                                                                                                                    	else:
                                                                                                                    		tmp = x1 * ((-12.0 * x2) - 1.0)
                                                                                                                    	return tmp
                                                                                                                    
                                                                                                                    function code(x1, x2)
                                                                                                                    	t_0 = Float64(Float64(3.0 * x1) * x1)
                                                                                                                    	t_1 = Float64(Float64(x1 * x1) + 1.0)
                                                                                                                    	t_2 = Float64(Float64(Float64(t_0 + Float64(2.0 * x2)) - x1) / t_1)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (Float64(x1 + Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(2.0 * x1) * t_2) * Float64(t_2 - 3.0)) + Float64(Float64(x1 * x1) * Float64(Float64(4.0 * t_2) - 6.0))) * t_1) + Float64(t_0 * t_2)) + Float64(Float64(x1 * x1) * x1)) + x1) + Float64(3.0 * Float64(Float64(Float64(t_0 - Float64(2.0 * x2)) - x1) / t_1)))) <= 1e+308)
                                                                                                                    		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * -6.0));
                                                                                                                    	else
                                                                                                                    		tmp = Float64(x1 * Float64(Float64(-12.0 * x2) - 1.0));
                                                                                                                    	end
                                                                                                                    	return tmp
                                                                                                                    end
                                                                                                                    
                                                                                                                    function tmp_2 = code(x1, x2)
                                                                                                                    	t_0 = (3.0 * x1) * x1;
                                                                                                                    	t_1 = (x1 * x1) + 1.0;
                                                                                                                    	t_2 = ((t_0 + (2.0 * x2)) - x1) / t_1;
                                                                                                                    	tmp = 0.0;
                                                                                                                    	if ((x1 + (((((((((2.0 * x1) * t_2) * (t_2 - 3.0)) + ((x1 * x1) * ((4.0 * t_2) - 6.0))) * t_1) + (t_0 * t_2)) + ((x1 * x1) * x1)) + x1) + (3.0 * (((t_0 - (2.0 * x2)) - x1) / t_1)))) <= 1e+308)
                                                                                                                    		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                                                                                    	else
                                                                                                                    		tmp = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                    	end
                                                                                                                    	tmp_2 = tmp;
                                                                                                                    end
                                                                                                                    
                                                                                                                    code[x1_, x2_] := Block[{t$95$0 = N[(N[(3.0 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2.0 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4.0 * t$95$2), $MachinePrecision] - 6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] + N[(t$95$0 * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(3.0 * N[(N[(N[(t$95$0 - N[(2.0 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1e+308], N[(N[(-1.0 * x1), $MachinePrecision] + N[(x2 * -6.0), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(-12.0 * x2), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    t_0 := \left(3 \cdot x1\right) \cdot x1\\
                                                                                                                    t_1 := x1 \cdot x1 + 1\\
                                                                                                                    t_2 := \frac{\left(t\_0 + 2 \cdot x2\right) - x1}{t\_1}\\
                                                                                                                    \mathbf{if}\;x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot t\_2\right) \cdot \left(t\_2 - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot t\_2 - 6\right)\right) \cdot t\_1 + t\_0 \cdot t\_2\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq 10^{+308}:\\
                                                                                                                    \;\;\;\;-1 \cdot x1 + x2 \cdot -6\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;x1 \cdot \left(-12 \cdot x2 - 1\right)\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 2 regimes
                                                                                                                    2. if (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))))) < 1e308

                                                                                                                      1. Initial program 69.7%

                                                                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                      2. Taylor expanded in x1 around 0

                                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. lower-+.f64N/A

                                                                                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                        2. lower-*.f64N/A

                                                                                                                          \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                        4. lower--.f64N/A

                                                                                                                          \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                      4. Applied rewrites54.3%

                                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                      5. Taylor expanded in x2 around 0

                                                                                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      6. Step-by-step derivation
                                                                                                                        1. lower-+.f64N/A

                                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                        2. lower-*.f64N/A

                                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                        3. lower-*.f64N/A

                                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                        4. lower--.f64N/A

                                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                        5. lower-*.f6443.8%

                                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                      7. Applied rewrites43.8%

                                                                                                                        \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                      8. Taylor expanded in x1 around 0

                                                                                                                        \[\leadsto -1 \cdot x1 + x2 \cdot -6 \]
                                                                                                                      9. Step-by-step derivation
                                                                                                                        1. Applied rewrites37.9%

                                                                                                                          \[\leadsto -1 \cdot x1 + x2 \cdot -6 \]

                                                                                                                        if 1e308 < (+.f64 x1 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 (+.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) (-.f64 (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) #s(literal 3 binary64))) (*.f64 (*.f64 x1 x1) (-.f64 (*.f64 #s(literal 4 binary64) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64)))) #s(literal 6 binary64)))) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))) (*.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (/.f64 (-.f64 (+.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))) (*.f64 (*.f64 x1 x1) x1)) x1) (*.f64 #s(literal 3 binary64) (/.f64 (-.f64 (-.f64 (*.f64 (*.f64 #s(literal 3 binary64) x1) x1) (*.f64 #s(literal 2 binary64) x2)) x1) (+.f64 (*.f64 x1 x1) #s(literal 1 binary64))))))

                                                                                                                        1. Initial program 69.7%

                                                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                        2. Taylor expanded in x1 around 0

                                                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. lower-+.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                          2. lower-*.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                          3. lower-*.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                          4. lower--.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                        4. Applied rewrites54.3%

                                                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                        5. Taylor expanded in x2 around 0

                                                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                        6. Step-by-step derivation
                                                                                                                          1. lower-+.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                          2. lower-*.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                          3. lower-*.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                          4. lower--.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                          5. lower-*.f6443.8%

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                        7. Applied rewrites43.8%

                                                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                        8. Taylor expanded in x1 around inf

                                                                                                                          \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                                                                                        9. Step-by-step derivation
                                                                                                                          1. lower-*.f64N/A

                                                                                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                          2. lower--.f64N/A

                                                                                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                          3. lower-*.f6420.2%

                                                                                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                        10. Applied rewrites20.2%

                                                                                                                          \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                                                                                      10. Recombined 2 regimes into one program.
                                                                                                                      11. Add Preprocessing

                                                                                                                      Alternative 22: 35.2% accurate, 11.4× speedup?

                                                                                                                      \[\begin{array}{l} t_0 := x1 \cdot \left(-12 \cdot x2 - 1\right)\\ \mathbf{if}\;x1 \leq -1.9 \cdot 10^{-122}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 1.5 \cdot 10^{-131}:\\ \;\;\;\;-6 \cdot x2\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                                                                                      (FPCore (x1 x2)
                                                                                                                        :precision binary64
                                                                                                                        (let* ((t_0 (* x1 (- (* -12.0 x2) 1.0))))
                                                                                                                        (if (<= x1 -1.9e-122) t_0 (if (<= x1 1.5e-131) (* -6.0 x2) t_0))))
                                                                                                                      double code(double x1, double x2) {
                                                                                                                      	double t_0 = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                      	double tmp;
                                                                                                                      	if (x1 <= -1.9e-122) {
                                                                                                                      		tmp = t_0;
                                                                                                                      	} else if (x1 <= 1.5e-131) {
                                                                                                                      		tmp = -6.0 * x2;
                                                                                                                      	} else {
                                                                                                                      		tmp = t_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(x1, x2)
                                                                                                                      use fmin_fmax_functions
                                                                                                                          real(8), intent (in) :: x1
                                                                                                                          real(8), intent (in) :: x2
                                                                                                                          real(8) :: t_0
                                                                                                                          real(8) :: tmp
                                                                                                                          t_0 = x1 * (((-12.0d0) * x2) - 1.0d0)
                                                                                                                          if (x1 <= (-1.9d-122)) then
                                                                                                                              tmp = t_0
                                                                                                                          else if (x1 <= 1.5d-131) then
                                                                                                                              tmp = (-6.0d0) * x2
                                                                                                                          else
                                                                                                                              tmp = t_0
                                                                                                                          end if
                                                                                                                          code = tmp
                                                                                                                      end function
                                                                                                                      
                                                                                                                      public static double code(double x1, double x2) {
                                                                                                                      	double t_0 = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                      	double tmp;
                                                                                                                      	if (x1 <= -1.9e-122) {
                                                                                                                      		tmp = t_0;
                                                                                                                      	} else if (x1 <= 1.5e-131) {
                                                                                                                      		tmp = -6.0 * x2;
                                                                                                                      	} else {
                                                                                                                      		tmp = t_0;
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      def code(x1, x2):
                                                                                                                      	t_0 = x1 * ((-12.0 * x2) - 1.0)
                                                                                                                      	tmp = 0
                                                                                                                      	if x1 <= -1.9e-122:
                                                                                                                      		tmp = t_0
                                                                                                                      	elif x1 <= 1.5e-131:
                                                                                                                      		tmp = -6.0 * x2
                                                                                                                      	else:
                                                                                                                      		tmp = t_0
                                                                                                                      	return tmp
                                                                                                                      
                                                                                                                      function code(x1, x2)
                                                                                                                      	t_0 = Float64(x1 * Float64(Float64(-12.0 * x2) - 1.0))
                                                                                                                      	tmp = 0.0
                                                                                                                      	if (x1 <= -1.9e-122)
                                                                                                                      		tmp = t_0;
                                                                                                                      	elseif (x1 <= 1.5e-131)
                                                                                                                      		tmp = Float64(-6.0 * x2);
                                                                                                                      	else
                                                                                                                      		tmp = t_0;
                                                                                                                      	end
                                                                                                                      	return tmp
                                                                                                                      end
                                                                                                                      
                                                                                                                      function tmp_2 = code(x1, x2)
                                                                                                                      	t_0 = x1 * ((-12.0 * x2) - 1.0);
                                                                                                                      	tmp = 0.0;
                                                                                                                      	if (x1 <= -1.9e-122)
                                                                                                                      		tmp = t_0;
                                                                                                                      	elseif (x1 <= 1.5e-131)
                                                                                                                      		tmp = -6.0 * x2;
                                                                                                                      	else
                                                                                                                      		tmp = t_0;
                                                                                                                      	end
                                                                                                                      	tmp_2 = tmp;
                                                                                                                      end
                                                                                                                      
                                                                                                                      code[x1_, x2_] := Block[{t$95$0 = N[(x1 * N[(N[(-12.0 * x2), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1.9e-122], t$95$0, If[LessEqual[x1, 1.5e-131], N[(-6.0 * x2), $MachinePrecision], t$95$0]]]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      t_0 := x1 \cdot \left(-12 \cdot x2 - 1\right)\\
                                                                                                                      \mathbf{if}\;x1 \leq -1.9 \cdot 10^{-122}:\\
                                                                                                                      \;\;\;\;t\_0\\
                                                                                                                      
                                                                                                                      \mathbf{elif}\;x1 \leq 1.5 \cdot 10^{-131}:\\
                                                                                                                      \;\;\;\;-6 \cdot x2\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;t\_0\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 2 regimes
                                                                                                                      2. if x1 < -1.9e-122 or 1.5e-131 < x1

                                                                                                                        1. Initial program 69.7%

                                                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                        2. Taylor expanded in x1 around 0

                                                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. lower-+.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                          2. lower-*.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + \color{blue}{x1} \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                                                                                          3. lower-*.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \color{blue}{\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                          4. lower--.f64N/A

                                                                                                                            \[\leadsto -6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - \color{blue}{1}\right) \]
                                                                                                                        4. Applied rewrites54.3%

                                                                                                                          \[\leadsto \color{blue}{-6 \cdot x2 + x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)} \]
                                                                                                                        5. Taylor expanded in x2 around 0

                                                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                        6. Step-by-step derivation
                                                                                                                          1. lower-+.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \color{blue}{\left(-12 \cdot x1 - 6\right)} \]
                                                                                                                          2. lower-*.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(\color{blue}{-12 \cdot x1} - 6\right) \]
                                                                                                                          3. lower-*.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - \color{blue}{6}\right) \]
                                                                                                                          4. lower--.f64N/A

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                          5. lower-*.f6443.8%

                                                                                                                            \[\leadsto -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                                                                                        7. Applied rewrites43.8%

                                                                                                                          \[\leadsto -1 \cdot x1 + \color{blue}{x2 \cdot \left(-12 \cdot x1 - 6\right)} \]
                                                                                                                        8. Taylor expanded in x1 around inf

                                                                                                                          \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                                                                                        9. Step-by-step derivation
                                                                                                                          1. lower-*.f64N/A

                                                                                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                          2. lower--.f64N/A

                                                                                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                          3. lower-*.f6420.2%

                                                                                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                                                                                        10. Applied rewrites20.2%

                                                                                                                          \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]

                                                                                                                        if -1.9e-122 < x1 < 1.5e-131

                                                                                                                        1. Initial program 69.7%

                                                                                                                          \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                        2. Applied rewrites69.8%

                                                                                                                          \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                                        3. Taylor expanded in x1 around 0

                                                                                                                          \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                                        4. Step-by-step derivation
                                                                                                                          1. lower-*.f6425.7%

                                                                                                                            \[\leadsto -6 \cdot \color{blue}{x2} \]
                                                                                                                        5. Applied rewrites25.7%

                                                                                                                          \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                                      3. Recombined 2 regimes into one program.
                                                                                                                      4. Add Preprocessing

                                                                                                                      Alternative 23: 25.7% accurate, 49.7× speedup?

                                                                                                                      \[-6 \cdot x2 \]
                                                                                                                      (FPCore (x1 x2)
                                                                                                                        :precision binary64
                                                                                                                        (* -6.0 x2))
                                                                                                                      double code(double x1, double x2) {
                                                                                                                      	return -6.0 * x2;
                                                                                                                      }
                                                                                                                      
                                                                                                                      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(x1, x2)
                                                                                                                      use fmin_fmax_functions
                                                                                                                          real(8), intent (in) :: x1
                                                                                                                          real(8), intent (in) :: x2
                                                                                                                          code = (-6.0d0) * x2
                                                                                                                      end function
                                                                                                                      
                                                                                                                      public static double code(double x1, double x2) {
                                                                                                                      	return -6.0 * x2;
                                                                                                                      }
                                                                                                                      
                                                                                                                      def code(x1, x2):
                                                                                                                      	return -6.0 * x2
                                                                                                                      
                                                                                                                      function code(x1, x2)
                                                                                                                      	return Float64(-6.0 * x2)
                                                                                                                      end
                                                                                                                      
                                                                                                                      function tmp = code(x1, x2)
                                                                                                                      	tmp = -6.0 * x2;
                                                                                                                      end
                                                                                                                      
                                                                                                                      code[x1_, x2_] := N[(-6.0 * x2), $MachinePrecision]
                                                                                                                      
                                                                                                                      -6 \cdot x2
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Initial program 69.7%

                                                                                                                        \[x1 + \left(\left(\left(\left(\left(\left(\left(2 \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \cdot \left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 3\right) + \left(x1 \cdot x1\right) \cdot \left(4 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1} - 6\right)\right) \cdot \left(x1 \cdot x1 + 1\right) + \left(\left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 + 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) + \left(x1 \cdot x1\right) \cdot x1\right) + x1\right) + 3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}\right) \]
                                                                                                                      2. Applied rewrites69.8%

                                                                                                                        \[\leadsto \color{blue}{\left(\left(\left(\left(4 \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - 6\right) \cdot \left(x1 \cdot x1\right) - \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right) \cdot \left(\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} \cdot \left(x1 + x1\right)\right)\right) \cdot \left(x1 \cdot x1 - -1\right) - \left(\left(-3 \cdot \left(x1 \cdot x1\right)\right) \cdot \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1} - \left(x1 \cdot x1 - -1\right) \cdot x1\right)\right) + x1\right) - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}} \]
                                                                                                                      3. Taylor expanded in x1 around 0

                                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                                      4. Step-by-step derivation
                                                                                                                        1. lower-*.f6425.7%

                                                                                                                          \[\leadsto -6 \cdot \color{blue}{x2} \]
                                                                                                                      5. Applied rewrites25.7%

                                                                                                                        \[\leadsto \color{blue}{-6 \cdot x2} \]
                                                                                                                      6. Add Preprocessing

                                                                                                                      Reproduce

                                                                                                                      ?
                                                                                                                      herbie shell --seed 2025258 
                                                                                                                      (FPCore (x1 x2)
                                                                                                                        :name "Rosa's FloatVsDoubleBenchmark"
                                                                                                                        :precision binary64
                                                                                                                        (+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2.0 x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) (- (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)) 3.0)) (* (* x1 x1) (- (* 4.0 (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))) 6.0))) (+ (* x1 x1) 1.0)) (* (* (* 3.0 x1) x1) (/ (- (+ (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0)))) (* (* x1 x1) x1)) x1) (* 3.0 (/ (- (- (* (* 3.0 x1) x1) (* 2.0 x2)) x1) (+ (* x1 x1) 1.0))))))