Rosa's FloatVsDoubleBenchmark

Percentage Accurate: 70.9% → 99.3%
Time: 35.5s
Alternatives: 27
Speedup: 7.3×

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 x1) x1))
       (t_1 (+ (* x1 x1) 1))
       (t_2 (/ (- (+ t_0 (* 2 x2)) x1) t_1)))
  (+
   x1
   (+
    (+
     (+
      (+
       (*
        (+
         (* (* (* 2 x1) t_2) (- t_2 3))
         (* (* x1 x1) (- (* 4 t_2) 6)))
        t_1)
       (* t_0 t_2))
      (* (* x1 x1) x1))
     x1)
    (* 3 (/ (- (- t_0 (* 2 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 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4 * t$95$2), $MachinePrecision] - 6), $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 * N[(N[(N[(t$95$0 - N[(2 * 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 27 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: 70.9% 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 x1) x1))
       (t_1 (+ (* x1 x1) 1))
       (t_2 (/ (- (+ t_0 (* 2 x2)) x1) t_1)))
  (+
   x1
   (+
    (+
     (+
      (+
       (*
        (+
         (* (* (* 2 x1) t_2) (- t_2 3))
         (* (* x1 x1) (- (* 4 t_2) 6)))
        t_1)
       (* t_0 t_2))
      (* (* x1 x1) x1))
     x1)
    (* 3 (/ (- (- t_0 (* 2 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 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4 * t$95$2), $MachinePrecision] - 6), $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 * N[(N[(N[(t$95$0 - N[(2 * 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.3% accurate, 0.5× speedup?

\[\begin{array}{l} t_0 := \left(x1 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot x1 - -1\\ t_3 := \left(3 \cdot x1\right) \cdot x1\\ t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\ t_5 := t\_3 \cdot t\_4\\ t_6 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_1}\\ t_7 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_3}{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\_1 + t\_5\right) + t\_0\right) + x1\right) + t\_6\right) \leq \infty:\\ \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(\left(4 \cdot t\_7 - 6\right) \cdot x1\right), x1, \left(3 + \left(\left(x1 - t\_3\right) - \left(x2 + x2\right)\right) \cdot \frac{1}{t\_2}\right), \left(t\_7 \cdot \left(x1 + x1\right)\right)\right) + t\_5\right) + t\_0\right) + x1\right) + t\_6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\ \end{array} \]
(FPCore (x1 x2)
  :precision binary64
  (let* ((t_0 (* (* x1 x1) x1))
       (t_1 (+ (* x1 x1) 1))
       (t_2 (- (* x1 x1) -1))
       (t_3 (* (* 3 x1) x1))
       (t_4 (/ (- (+ t_3 (* 2 x2)) x1) t_1))
       (t_5 (* t_3 t_4))
       (t_6 (* 3 (/ (- (- t_3 (* 2 x2)) x1) t_1)))
       (t_7 (/ (+ (- (+ x2 x2) x1) t_3) t_2)))
  (if (<=
       (+
        x1
        (+
         (+
          (+
           (+
            (*
             (+
              (* (* (* 2 x1) t_4) (- t_4 3))
              (* (* x1 x1) (- (* 4 t_4) 6)))
             t_1)
            t_5)
           t_0)
          x1)
         t_6))
       INFINITY)
    (+
     x1
     (+
      (+
       (+
        (+
         (134-z0z1z2z3z4
          t_2
          (* (- (* 4 t_7) 6) x1)
          x1
          (+ 3 (* (- (- x1 t_3) (+ x2 x2)) (/ 1 t_2)))
          (* t_7 (+ x1 x1)))
         t_5)
        t_0)
       x1)
      t_6))
    (+ x1 (+ (+ (* (pow x1 4) 6) x1) 9)))))
\begin{array}{l}
t_0 := \left(x1 \cdot x1\right) \cdot x1\\
t_1 := x1 \cdot x1 + 1\\
t_2 := x1 \cdot x1 - -1\\
t_3 := \left(3 \cdot x1\right) \cdot x1\\
t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\
t_5 := t\_3 \cdot t\_4\\
t_6 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_1}\\
t_7 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_3}{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\_1 + t\_5\right) + t\_0\right) + x1\right) + t\_6\right) \leq \infty:\\
\;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(\left(4 \cdot t\_7 - 6\right) \cdot x1\right), x1, \left(3 + \left(\left(x1 - t\_3\right) - \left(x2 + x2\right)\right) \cdot \frac{1}{t\_2}\right), \left(t\_7 \cdot \left(x1 + x1\right)\right)\right) + t\_5\right) + t\_0\right) + x1\right) + t\_6\right)\\

\mathbf{else}:\\
\;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\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 70.9%

      \[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. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\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. *-commutativeN/A

        \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1 + 1\right) \cdot \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)} + \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) \]
      3. lift-+.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot x1 + 1\right) \cdot \color{blue}{\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)} + \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) \]
    3. Applied rewrites70.9%

      \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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)} + \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) \]
    4. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \color{blue}{\left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right)}, \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) + \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. lift-/.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \color{blue}{\frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}}\right), \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) + \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) \]
      3. mult-flipN/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \color{blue}{\left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{1}{x1 \cdot x1 - -1}}\right), \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) + \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) \]
      4. metadata-evalN/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{x1 \cdot x1 - -1}\right), \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) + \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) \]
      5. lift--.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{x1 \cdot x1 - -1}}\right), \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) + \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) \]
      6. sub-negate-revN/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\color{blue}{\mathsf{neg}\left(\left(-1 - x1 \cdot x1\right)\right)}}\right), \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) + \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) \]
      7. lift--.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \frac{\mathsf{neg}\left(-1\right)}{\mathsf{neg}\left(\color{blue}{\left(-1 - x1 \cdot x1\right)}\right)}\right), \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) + \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) \]
      8. frac-2negN/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{\frac{-1}{-1 - x1 \cdot x1}}\right), \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) + \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) \]
      9. lift-/.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \color{blue}{\frac{-1}{-1 - x1 \cdot x1}}\right), \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) + \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) \]
      10. fp-cancel-sub-sign-invN/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \color{blue}{\left(3 + \left(\mathsf{neg}\left(\left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right)\right)\right) \cdot \frac{-1}{-1 - x1 \cdot x1}\right)}, \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) + \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) \]
      11. lower-+.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \color{blue}{\left(3 + \left(\mathsf{neg}\left(\left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right)\right)\right) \cdot \frac{-1}{-1 - x1 \cdot x1}\right)}, \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) + \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) \]
      12. lower-*.f64N/A

        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 + \color{blue}{\left(\mathsf{neg}\left(\left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right)\right)\right) \cdot \frac{-1}{-1 - x1 \cdot x1}}\right), \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) + \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) \]
    5. Applied rewrites70.9%

      \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \color{blue}{\left(3 + \left(\left(x1 - \left(3 \cdot x1\right) \cdot x1\right) - \left(x2 + x2\right)\right) \cdot \frac{1}{x1 \cdot x1 - -1}\right)}, \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) + \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) \]

    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 70.9%

      \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
      3. lower--.f64N/A

        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
      4. lower-*.f64N/A

        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
      5. lower-/.f6456.4%

        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
    4. Applied rewrites56.4%

      \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
    5. Taylor expanded in x1 around inf

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

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

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

          \[\leadsto x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right) \]
      4. Recombined 2 regimes into one program.
      5. Add Preprocessing

      Alternative 2: 99.3% accurate, 0.5× speedup?

      \[\begin{array}{l} t_0 := \left(x1 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot x1 - -1\\ t_3 := \left(3 \cdot x1\right) \cdot x1\\ t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\ t_5 := t\_3 \cdot t\_4\\ t_6 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_1}\\ t_7 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_3}{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\_1 + t\_5\right) + t\_0\right) + x1\right) + t\_6\right) \leq \infty:\\ \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(\left(4 \cdot t\_7 - 6\right) \cdot x1\right), x1, \left(3 - t\_7\right), \left(t\_7 \cdot \left(x1 + x1\right)\right)\right) + t\_5\right) + t\_0\right) + x1\right) + t\_6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\ \end{array} \]
      (FPCore (x1 x2)
        :precision binary64
        (let* ((t_0 (* (* x1 x1) x1))
             (t_1 (+ (* x1 x1) 1))
             (t_2 (- (* x1 x1) -1))
             (t_3 (* (* 3 x1) x1))
             (t_4 (/ (- (+ t_3 (* 2 x2)) x1) t_1))
             (t_5 (* t_3 t_4))
             (t_6 (* 3 (/ (- (- t_3 (* 2 x2)) x1) t_1)))
             (t_7 (/ (+ (- (+ x2 x2) x1) t_3) t_2)))
        (if (<=
             (+
              x1
              (+
               (+
                (+
                 (+
                  (*
                   (+
                    (* (* (* 2 x1) t_4) (- t_4 3))
                    (* (* x1 x1) (- (* 4 t_4) 6)))
                   t_1)
                  t_5)
                 t_0)
                x1)
               t_6))
             INFINITY)
          (+
           x1
           (+
            (+
             (+
              (+
               (134-z0z1z2z3z4
                t_2
                (* (- (* 4 t_7) 6) x1)
                x1
                (- 3 t_7)
                (* t_7 (+ x1 x1)))
               t_5)
              t_0)
             x1)
            t_6))
          (+ x1 (+ (+ (* (pow x1 4) 6) x1) 9)))))
      \begin{array}{l}
      t_0 := \left(x1 \cdot x1\right) \cdot x1\\
      t_1 := x1 \cdot x1 + 1\\
      t_2 := x1 \cdot x1 - -1\\
      t_3 := \left(3 \cdot x1\right) \cdot x1\\
      t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\
      t_5 := t\_3 \cdot t\_4\\
      t_6 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{t\_1}\\
      t_7 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_3}{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\_1 + t\_5\right) + t\_0\right) + x1\right) + t\_6\right) \leq \infty:\\
      \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(\left(4 \cdot t\_7 - 6\right) \cdot x1\right), x1, \left(3 - t\_7\right), \left(t\_7 \cdot \left(x1 + x1\right)\right)\right) + t\_5\right) + t\_0\right) + x1\right) + t\_6\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\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 70.9%

          \[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. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\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. *-commutativeN/A

            \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1 + 1\right) \cdot \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)} + \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) \]
          3. lift-+.f64N/A

            \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot x1 + 1\right) \cdot \color{blue}{\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)} + \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) \]
        3. Applied rewrites70.9%

          \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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)} + \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) \]

        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 70.9%

          \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
        3. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
          3. lower--.f64N/A

            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
          4. lower-*.f64N/A

            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
          5. lower-/.f6456.4%

            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
        4. Applied rewrites56.4%

          \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
        5. Taylor expanded in x1 around inf

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

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

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

              \[\leadsto x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right) \]
          4. Recombined 2 regimes into one program.
          5. Add Preprocessing

          Alternative 3: 99.3% accurate, 0.5× speedup?

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

              \[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 rewrites70.9%

              \[\leadsto \color{blue}{\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\right) \cdot x1\right)\right) + \left(\left(x1 - -3 \cdot \frac{\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)}{x1 \cdot x1 - -1}\right) + x1\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 70.9%

              \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
            3. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
              3. lower--.f64N/A

                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
              4. lower-*.f64N/A

                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
              5. lower-/.f6456.4%

                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
            4. Applied rewrites56.4%

              \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
            5. Taylor expanded in x1 around inf

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

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

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

                  \[\leadsto x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right) \]
              4. Recombined 2 regimes into one program.
              5. Add Preprocessing

              Alternative 4: 98.5% accurate, 0.4× 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 := t\_0 \cdot t\_2\\ t_4 := x1 \cdot x1 - -1\\ t_5 := \left(x1 \cdot x1\right) \cdot x1\\ t_6 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_4}\\ t_7 := 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\_3\right) + t\_5\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\ t_8 := \left(x2 + x2\right) - \left(x1 - t\_0\right)\\ \mathbf{if}\;t\_7 \leq 1000000000000000046753818885456127989189605431330410286841364872744016439394555894610368258180303336939076888134044950289326168184662430331474313277416979816387389279864637935586997520238352311022660078293728671385192933261062303434752638026781377548741967884639283445760:\\ \;\;\;\;\left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(\frac{-4}{-1 - x1 \cdot x1} \cdot t\_8 - 6\right) + \left(\frac{t\_8}{t\_4} - 3\right) \cdot \frac{\left(x1 + x1\right) \cdot t\_8}{t\_4}\right) \cdot t\_4 + \left(\frac{t\_0 \cdot t\_8}{t\_4} + t\_5\right)\right) + \left(x1 + \frac{3 \cdot \left(\left(\left(t\_0 - x2\right) - x2\right) - x1\right)}{t\_4}\right)\right) + x1\\ \mathbf{elif}\;t\_7 \leq \infty:\\ \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_4, \left(6 \cdot x1\right), x1, \left(3 - t\_6\right), \left(t\_6 \cdot \left(x1 + x1\right)\right)\right) + t\_3\right) + t\_5\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + -1 \cdot x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\ \end{array} \]
              (FPCore (x1 x2)
                :precision binary64
                (let* ((t_0 (* (* 3 x1) x1))
                     (t_1 (+ (* x1 x1) 1))
                     (t_2 (/ (- (+ t_0 (* 2 x2)) x1) t_1))
                     (t_3 (* t_0 t_2))
                     (t_4 (- (* x1 x1) -1))
                     (t_5 (* (* x1 x1) x1))
                     (t_6 (/ (+ (- (+ x2 x2) x1) t_0) t_4))
                     (t_7
                      (+
                       x1
                       (+
                        (+
                         (+
                          (+
                           (*
                            (+
                             (* (* (* 2 x1) t_2) (- t_2 3))
                             (* (* x1 x1) (- (* 4 t_2) 6)))
                            t_1)
                           t_3)
                          t_5)
                         x1)
                        (* 3 (/ (- (- t_0 (* 2 x2)) x1) t_1)))))
                     (t_8 (- (+ x2 x2) (- x1 t_0))))
                (if (<=
                     t_7
                     1000000000000000046753818885456127989189605431330410286841364872744016439394555894610368258180303336939076888134044950289326168184662430331474313277416979816387389279864637935586997520238352311022660078293728671385192933261062303434752638026781377548741967884639283445760)
                  (+
                   (+
                    (+
                     (*
                      (+
                       (* (* x1 x1) (- (* (/ -4 (- -1 (* x1 x1))) t_8) 6))
                       (* (- (/ t_8 t_4) 3) (/ (* (+ x1 x1) t_8) t_4)))
                      t_4)
                     (+ (/ (* t_0 t_8) t_4) t_5))
                    (+ x1 (/ (* 3 (- (- (- t_0 x2) x2) x1)) t_4)))
                   x1)
                  (if (<= t_7 INFINITY)
                    (+
                     x1
                     (+
                      (+
                       (+
                        (+
                         (134-z0z1z2z3z4
                          t_4
                          (* 6 x1)
                          x1
                          (- 3 t_6)
                          (* t_6 (+ x1 x1)))
                         t_3)
                        t_5)
                       x1)
                      (* 3 (+ (* -2 x2) (* -1 x1)))))
                    (+ x1 (+ (+ (* (pow x1 4) 6) x1) 9))))))
              \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 := t\_0 \cdot t\_2\\
              t_4 := x1 \cdot x1 - -1\\
              t_5 := \left(x1 \cdot x1\right) \cdot x1\\
              t_6 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_4}\\
              t_7 := 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\_3\right) + t\_5\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right)\\
              t_8 := \left(x2 + x2\right) - \left(x1 - t\_0\right)\\
              \mathbf{if}\;t\_7 \leq 1000000000000000046753818885456127989189605431330410286841364872744016439394555894610368258180303336939076888134044950289326168184662430331474313277416979816387389279864637935586997520238352311022660078293728671385192933261062303434752638026781377548741967884639283445760:\\
              \;\;\;\;\left(\left(\left(\left(x1 \cdot x1\right) \cdot \left(\frac{-4}{-1 - x1 \cdot x1} \cdot t\_8 - 6\right) + \left(\frac{t\_8}{t\_4} - 3\right) \cdot \frac{\left(x1 + x1\right) \cdot t\_8}{t\_4}\right) \cdot t\_4 + \left(\frac{t\_0 \cdot t\_8}{t\_4} + t\_5\right)\right) + \left(x1 + \frac{3 \cdot \left(\left(\left(t\_0 - x2\right) - x2\right) - x1\right)}{t\_4}\right)\right) + x1\\
              
              \mathbf{elif}\;t\_7 \leq \infty:\\
              \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_4, \left(6 \cdot x1\right), x1, \left(3 - t\_6\right), \left(t\_6 \cdot \left(x1 + x1\right)\right)\right) + t\_3\right) + t\_5\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + -1 \cdot x1\right)\right)\\
              
              \mathbf{else}:\\
              \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\
              
              
              \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)))))) < 1e270

                1. Initial program 70.9%

                  \[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. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto 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) + \color{blue}{3 \cdot \frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}}\right) \]
                  2. lift-/.f64N/A

                    \[\leadsto 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 \color{blue}{\frac{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}{x1 \cdot x1 + 1}}\right) \]
                  3. lift--.f64N/A

                    \[\leadsto 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{\color{blue}{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) - x1}}{x1 \cdot x1 + 1}\right) \]
                  4. div-subN/A

                    \[\leadsto 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 \color{blue}{\left(\frac{\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2}{x1 \cdot x1 + 1} - \frac{x1}{x1 \cdot x1 + 1}\right)}\right) \]
                  5. mult-flipN/A

                    \[\leadsto 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 \left(\color{blue}{\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) \cdot \frac{1}{x1 \cdot x1 + 1}} - \frac{x1}{x1 \cdot x1 + 1}\right)\right) \]
                  6. mult-flipN/A

                    \[\leadsto 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 \left(\left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right) \cdot \frac{1}{x1 \cdot x1 + 1} - \color{blue}{x1 \cdot \frac{1}{x1 \cdot x1 + 1}}\right)\right) \]
                  7. lower-134-z0z1z2z3z4N/A

                    \[\leadsto 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) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(3, \left(\left(3 \cdot x1\right) \cdot x1 - 2 \cdot x2\right), \left(\frac{1}{x1 \cdot x1 + 1}\right), x1, \left(\frac{1}{x1 \cdot x1 + 1}\right)\right)}\right) \]
                3. Applied rewrites70.9%

                  \[\leadsto 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) + \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(3, \left(\left(\left(3 \cdot x1\right) \cdot x1 - x2\right) - x2\right), \left(\frac{-1}{-1 - x1 \cdot x1}\right), x1, \left(\frac{-1}{-1 - x1 \cdot x1}\right)\right)}\right) \]
                4. Applied rewrites66.5%

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

                if 1e270 < (+.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 70.9%

                  \[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. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\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. *-commutativeN/A

                    \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1 + 1\right) \cdot \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)} + \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) \]
                  3. lift-+.f64N/A

                    \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot x1 + 1\right) \cdot \color{blue}{\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)} + \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) \]
                3. Applied rewrites70.9%

                  \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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)} + \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) \]
                4. Taylor expanded in x1 around inf

                  \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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) \]
                5. Step-by-step derivation
                  1. Applied rewrites68.7%

                    \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                  3. Step-by-step derivation
                    1. lower-+.f64N/A

                      \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + \color{blue}{-1 \cdot x1}\right)\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + \color{blue}{-1} \cdot x1\right)\right) \]
                    3. lower-*.f6468.7%

                      \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + -1 \cdot \color{blue}{x1}\right)\right) \]
                  4. Applied rewrites68.7%

                    \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\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 70.9%

                    \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                  3. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                    3. lower--.f64N/A

                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                    4. lower-*.f64N/A

                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                    5. lower-/.f6456.4%

                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                  4. Applied rewrites56.4%

                    \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                  5. Taylor expanded in x1 around inf

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

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

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

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

                    Alternative 5: 97.8% accurate, 0.4× speedup?

                    \[\begin{array}{l} t_0 := \left(x1 \cdot x1\right) \cdot x1\\ 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 := t\_1 \cdot t\_4\\ t_6 := 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\_5\right) + t\_0\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right)\\ t_7 := \left(\left(x2 + x2\right) - x1\right) + t\_1\\ t_8 := \frac{t\_7}{t\_2}\\ t_9 := 3 - t\_8\\ t_10 := t\_8 \cdot \left(x1 + x1\right)\\ \mathbf{if}\;t\_6 \leq 49999999999999999737683287595902466157897305225341087810970847365954154269153922568421376:\\ \;\;\;\;\left(\frac{\left(t\_1 - \left(\left(x2 + x2\right) + x1\right)\right) \cdot 3 + \left(\left(\left(\left(4 \cdot t\_8 - 6\right) \cdot \left(x1 \cdot x1\right) - t\_9 \cdot t\_10\right) \cdot t\_2\right) \cdot t\_2 + t\_7 \cdot t\_1\right)}{t\_2} + t\_2 \cdot x1\right) + x1\\ \mathbf{elif}\;t\_6 \leq \infty:\\ \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(6 \cdot x1\right), x1, t\_9, t\_10\right) + t\_5\right) + t\_0\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + -1 \cdot x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\ \end{array} \]
                    (FPCore (x1 x2)
                      :precision binary64
                      (let* ((t_0 (* (* x1 x1) x1))
                           (t_1 (* (* 3 x1) x1))
                           (t_2 (- (* x1 x1) -1))
                           (t_3 (+ (* x1 x1) 1))
                           (t_4 (/ (- (+ t_1 (* 2 x2)) x1) t_3))
                           (t_5 (* t_1 t_4))
                           (t_6
                            (+
                             x1
                             (+
                              (+
                               (+
                                (+
                                 (*
                                  (+
                                   (* (* (* 2 x1) t_4) (- t_4 3))
                                   (* (* x1 x1) (- (* 4 t_4) 6)))
                                  t_3)
                                 t_5)
                                t_0)
                               x1)
                              (* 3 (/ (- (- t_1 (* 2 x2)) x1) t_3)))))
                           (t_7 (+ (- (+ x2 x2) x1) t_1))
                           (t_8 (/ t_7 t_2))
                           (t_9 (- 3 t_8))
                           (t_10 (* t_8 (+ x1 x1))))
                      (if (<=
                           t_6
                           49999999999999999737683287595902466157897305225341087810970847365954154269153922568421376)
                        (+
                         (+
                          (/
                           (+
                            (* (- t_1 (+ (+ x2 x2) x1)) 3)
                            (+
                             (*
                              (* (- (* (- (* 4 t_8) 6) (* x1 x1)) (* t_9 t_10)) t_2)
                              t_2)
                             (* t_7 t_1)))
                           t_2)
                          (* t_2 x1))
                         x1)
                        (if (<= t_6 INFINITY)
                          (+
                           x1
                           (+
                            (+
                             (+ (+ (134-z0z1z2z3z4 t_2 (* 6 x1) x1 t_9 t_10) t_5) t_0)
                             x1)
                            (* 3 (+ (* -2 x2) (* -1 x1)))))
                          (+ x1 (+ (+ (* (pow x1 4) 6) x1) 9))))))
                    \begin{array}{l}
                    t_0 := \left(x1 \cdot x1\right) \cdot x1\\
                    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 := t\_1 \cdot t\_4\\
                    t_6 := 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\_5\right) + t\_0\right) + x1\right) + 3 \cdot \frac{\left(t\_1 - 2 \cdot x2\right) - x1}{t\_3}\right)\\
                    t_7 := \left(\left(x2 + x2\right) - x1\right) + t\_1\\
                    t_8 := \frac{t\_7}{t\_2}\\
                    t_9 := 3 - t\_8\\
                    t_10 := t\_8 \cdot \left(x1 + x1\right)\\
                    \mathbf{if}\;t\_6 \leq 49999999999999999737683287595902466157897305225341087810970847365954154269153922568421376:\\
                    \;\;\;\;\left(\frac{\left(t\_1 - \left(\left(x2 + x2\right) + x1\right)\right) \cdot 3 + \left(\left(\left(\left(4 \cdot t\_8 - 6\right) \cdot \left(x1 \cdot x1\right) - t\_9 \cdot t\_10\right) \cdot t\_2\right) \cdot t\_2 + t\_7 \cdot t\_1\right)}{t\_2} + t\_2 \cdot x1\right) + x1\\
                    
                    \mathbf{elif}\;t\_6 \leq \infty:\\
                    \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(6 \cdot x1\right), x1, t\_9, t\_10\right) + t\_5\right) + t\_0\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + -1 \cdot x1\right)\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\
                    
                    
                    \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)))))) < 5e88

                      1. Initial program 70.9%

                        \[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 rewrites66.4%

                        \[\leadsto \color{blue}{\left(\frac{\left(\left(3 \cdot x1\right) \cdot x1 - \left(\left(x2 + x2\right) + x1\right)\right) \cdot 3 + \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)\right) \cdot \left(x1 \cdot x1 - -1\right) + \left(\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1\right) \cdot \left(\left(3 \cdot x1\right) \cdot x1\right)\right)}{x1 \cdot x1 - -1} + \left(x1 \cdot x1 - -1\right) \cdot x1\right) + x1} \]

                      if 5e88 < (+.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 70.9%

                        \[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. Step-by-step derivation
                        1. lift-*.f64N/A

                          \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\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. *-commutativeN/A

                          \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1 + 1\right) \cdot \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)} + \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) \]
                        3. lift-+.f64N/A

                          \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot x1 + 1\right) \cdot \color{blue}{\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)} + \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) \]
                      3. Applied rewrites70.9%

                        \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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)} + \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) \]
                      4. Taylor expanded in x1 around inf

                        \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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) \]
                      5. Step-by-step derivation
                        1. Applied rewrites68.7%

                          \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                        3. Step-by-step derivation
                          1. lower-+.f64N/A

                            \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + \color{blue}{-1 \cdot x1}\right)\right) \]
                          2. lower-*.f64N/A

                            \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + \color{blue}{-1} \cdot x1\right)\right) \]
                          3. lower-*.f6468.7%

                            \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + -1 \cdot \color{blue}{x1}\right)\right) \]
                        4. Applied rewrites68.7%

                          \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\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 70.9%

                          \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                        3. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                          3. lower--.f64N/A

                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                          4. lower-*.f64N/A

                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                          5. lower-/.f6456.4%

                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                        4. Applied rewrites56.4%

                          \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                        5. Taylor expanded in x1 around inf

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

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

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

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

                          Alternative 6: 97.1% accurate, 0.6× 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 := t\_0 \cdot t\_2\\ t_4 := x1 \cdot x1 - -1\\ t_5 := \left(x1 \cdot x1\right) \cdot x1\\ t_6 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_4}\\ \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\_3\right) + t\_5\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\ \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_4, \left(6 \cdot x1\right), x1, \left(3 - t\_6\right), \left(t\_6 \cdot \left(x1 + x1\right)\right)\right) + t\_3\right) + t\_5\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + -1 \cdot x1\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\ \end{array} \]
                          (FPCore (x1 x2)
                            :precision binary64
                            (let* ((t_0 (* (* 3 x1) x1))
                                 (t_1 (+ (* x1 x1) 1))
                                 (t_2 (/ (- (+ t_0 (* 2 x2)) x1) t_1))
                                 (t_3 (* t_0 t_2))
                                 (t_4 (- (* x1 x1) -1))
                                 (t_5 (* (* x1 x1) x1))
                                 (t_6 (/ (+ (- (+ x2 x2) x1) t_0) t_4)))
                            (if (<=
                                 (+
                                  x1
                                  (+
                                   (+
                                    (+
                                     (+
                                      (*
                                       (+
                                        (* (* (* 2 x1) t_2) (- t_2 3))
                                        (* (* x1 x1) (- (* 4 t_2) 6)))
                                       t_1)
                                      t_3)
                                     t_5)
                                    x1)
                                   (* 3 (/ (- (- t_0 (* 2 x2)) x1) t_1))))
                                 INFINITY)
                              (+
                               x1
                               (+
                                (+
                                 (+
                                  (+
                                   (134-z0z1z2z3z4 t_4 (* 6 x1) x1 (- 3 t_6) (* t_6 (+ x1 x1)))
                                   t_3)
                                  t_5)
                                 x1)
                                (* 3 (+ (* -2 x2) (* -1 x1)))))
                              (+ x1 (+ (+ (* (pow x1 4) 6) x1) 9)))))
                          \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 := t\_0 \cdot t\_2\\
                          t_4 := x1 \cdot x1 - -1\\
                          t_5 := \left(x1 \cdot x1\right) \cdot x1\\
                          t_6 := \frac{\left(\left(x2 + x2\right) - x1\right) + t\_0}{t\_4}\\
                          \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\_3\right) + t\_5\right) + x1\right) + 3 \cdot \frac{\left(t\_0 - 2 \cdot x2\right) - x1}{t\_1}\right) \leq \infty:\\
                          \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_4, \left(6 \cdot x1\right), x1, \left(3 - t\_6\right), \left(t\_6 \cdot \left(x1 + x1\right)\right)\right) + t\_3\right) + t\_5\right) + x1\right) + 3 \cdot \left(-2 \cdot x2 + -1 \cdot x1\right)\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\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 70.9%

                              \[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. Step-by-step derivation
                              1. lift-*.f64N/A

                                \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\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. *-commutativeN/A

                                \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1 + 1\right) \cdot \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)} + \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) \]
                              3. lift-+.f64N/A

                                \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot x1 + 1\right) \cdot \color{blue}{\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)} + \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) \]
                            3. Applied rewrites70.9%

                              \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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)} + \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) \]
                            4. Taylor expanded in x1 around inf

                              \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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) \]
                            5. Step-by-step derivation
                              1. Applied rewrites68.7%

                                \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\right) \]
                              3. Step-by-step derivation
                                1. lower-+.f64N/A

                                  \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + \color{blue}{-1 \cdot x1}\right)\right) \]
                                2. lower-*.f64N/A

                                  \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + \color{blue}{-1} \cdot x1\right)\right) \]
                                3. lower-*.f6468.7%

                                  \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \left(-2 \cdot x2 + -1 \cdot \color{blue}{x1}\right)\right) \]
                              4. Applied rewrites68.7%

                                \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 \color{blue}{\left(-2 \cdot x2 + -1 \cdot x1\right)}\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 70.9%

                                \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                              3. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                  \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                3. lower--.f64N/A

                                  \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                4. lower-*.f64N/A

                                  \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                5. lower-/.f6456.4%

                                  \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                              4. Applied rewrites56.4%

                                \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                              5. Taylor expanded in x1 around inf

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

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

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

                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right) \]
                                4. Recombined 2 regimes into one program.
                                5. Add Preprocessing

                                Alternative 7: 95.5% accurate, 1.3× speedup?

                                \[\begin{array}{l} t_0 := 2 \cdot x2 - 3\\ t_1 := x1 + \left({x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{2 + -2 \cdot \left(1 + 3 \cdot t\_0\right)}{x1} + 4 \cdot t\_0\right)}{x1}}{x1}\right) + 9\right)\\ \mathbf{if}\;x1 \leq -1350:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                (FPCore (x1 x2)
                                  :precision binary64
                                  (let* ((t_0 (- (* 2 x2) 3))
                                       (t_1
                                        (+
                                         x1
                                         (+
                                          (*
                                           (pow x1 4)
                                           (+
                                            6
                                            (*
                                             -1
                                             (/
                                              (+
                                               3
                                               (*
                                                -1
                                                (/
                                                 (+
                                                  9
                                                  (+
                                                   (* -1 (/ (+ 2 (* -2 (+ 1 (* 3 t_0)))) x1))
                                                   (* 4 t_0)))
                                                 x1)))
                                              x1))))
                                          9))))
                                  (if (<= x1 -1350)
                                    t_1
                                    (if (<= x1 7148113328562451/4611686018427387904)
                                      (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                      t_1))))
                                double code(double x1, double x2) {
                                	double t_0 = (2.0 * x2) - 3.0;
                                	double t_1 = x1 + ((pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((2.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)))) + 9.0);
                                	double tmp;
                                	if (x1 <= -1350.0) {
                                		tmp = t_1;
                                	} else if (x1 <= 0.00155) {
                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(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) :: tmp
                                    t_0 = (2.0d0 * x2) - 3.0d0
                                    t_1 = x1 + (((x1 ** 4.0d0) * (6.0d0 + ((-1.0d0) * ((3.0d0 + ((-1.0d0) * ((9.0d0 + (((-1.0d0) * ((2.0d0 + ((-2.0d0) * (1.0d0 + (3.0d0 * t_0)))) / x1)) + (4.0d0 * t_0))) / x1))) / x1)))) + 9.0d0)
                                    if (x1 <= (-1350.0d0)) then
                                        tmp = t_1
                                    else if (x1 <= 0.00155d0) then
                                        tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                    else
                                        tmp = t_1
                                    end if
                                    code = tmp
                                end function
                                
                                public static double code(double x1, double x2) {
                                	double t_0 = (2.0 * x2) - 3.0;
                                	double t_1 = x1 + ((Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((2.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)))) + 9.0);
                                	double tmp;
                                	if (x1 <= -1350.0) {
                                		tmp = t_1;
                                	} else if (x1 <= 0.00155) {
                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                	} else {
                                		tmp = t_1;
                                	}
                                	return tmp;
                                }
                                
                                def code(x1, x2):
                                	t_0 = (2.0 * x2) - 3.0
                                	t_1 = x1 + ((math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((2.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)))) + 9.0)
                                	tmp = 0
                                	if x1 <= -1350.0:
                                		tmp = t_1
                                	elif x1 <= 0.00155:
                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                	else:
                                		tmp = t_1
                                	return tmp
                                
                                function code(x1, x2)
                                	t_0 = Float64(Float64(2.0 * x2) - 3.0)
                                	t_1 = Float64(x1 + Float64(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(2.0 + Float64(-2.0 * Float64(1.0 + Float64(3.0 * t_0)))) / x1)) + Float64(4.0 * t_0))) / x1))) / x1)))) + 9.0))
                                	tmp = 0.0
                                	if (x1 <= -1350.0)
                                		tmp = t_1;
                                	elseif (x1 <= 0.00155)
                                		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                	else
                                		tmp = t_1;
                                	end
                                	return tmp
                                end
                                
                                function tmp_2 = code(x1, x2)
                                	t_0 = (2.0 * x2) - 3.0;
                                	t_1 = x1 + (((x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + ((-1.0 * ((2.0 + (-2.0 * (1.0 + (3.0 * t_0)))) / x1)) + (4.0 * t_0))) / x1))) / x1)))) + 9.0);
                                	tmp = 0.0;
                                	if (x1 <= -1350.0)
                                		tmp = t_1;
                                	elseif (x1 <= 0.00155)
                                		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                	else
                                		tmp = t_1;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x1_, x2_] := Block[{t$95$0 = N[(N[(2 * x2), $MachinePrecision] - 3), $MachinePrecision]}, Block[{t$95$1 = N[(x1 + N[(N[(N[Power[x1, 4], $MachinePrecision] * N[(6 + N[(-1 * N[(N[(3 + N[(-1 * N[(N[(9 + N[(N[(-1 * N[(N[(2 + N[(-2 * N[(1 + N[(3 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + N[(4 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 9), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1350], t$95$1, If[LessEqual[x1, 7148113328562451/4611686018427387904], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                
                                \begin{array}{l}
                                t_0 := 2 \cdot x2 - 3\\
                                t_1 := x1 + \left({x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{2 + -2 \cdot \left(1 + 3 \cdot t\_0\right)}{x1} + 4 \cdot t\_0\right)}{x1}}{x1}\right) + 9\right)\\
                                \mathbf{if}\;x1 \leq -1350:\\
                                \;\;\;\;t\_1\\
                                
                                \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\
                                \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;t\_1\\
                                
                                
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if x1 < -1350 or 0.0015499999999999999 < x1

                                  1. Initial program 70.9%

                                    \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                  3. Step-by-step derivation
                                    1. lower-*.f64N/A

                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                    3. lower--.f64N/A

                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                    4. lower-*.f64N/A

                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                    5. lower-/.f6456.4%

                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                  4. Applied rewrites56.4%

                                    \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                  5. Taylor expanded in x1 around inf

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

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

                                      \[\leadsto x1 + \left(\color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{2 + -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)} + 9\right) \]
                                    3. Applied rewrites47.6%

                                      \[\leadsto x1 + \left(\color{blue}{{x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + \left(-1 \cdot \frac{2 + -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)} + 9\right) \]

                                    if -1350 < x1 < 0.0015499999999999999

                                    1. Initial program 70.9%

                                      \[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 rewrites55.0%

                                      \[\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-*.f6444.7%

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

                                      \[\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.3%

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

                                      \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                    11. 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)} \]
                                    12. 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.7%

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

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

                                  Alternative 8: 95.4% accurate, 1.4× speedup?

                                  \[\begin{array}{l} t_0 := 2 \cdot x2 - 3\\ t_1 := 4 \cdot t\_0\\ \mathbf{if}\;x1 \leq -1350:\\ \;\;\;\;{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} + t\_1\right)}{x1}}{x1}\right)\\ \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + t\_1}{x1}}{x1}\right) + x1\right) + 9\right)\\ \end{array} \]
                                  (FPCore (x1 x2)
                                    :precision binary64
                                    (let* ((t_0 (- (* 2 x2) 3)) (t_1 (* 4 t_0)))
                                    (if (<= x1 -1350)
                                      (*
                                       (pow x1 4)
                                       (+
                                        6
                                        (*
                                         -1
                                         (/
                                          (+
                                           3
                                           (*
                                            -1
                                            (/
                                             (+ 9 (+ (* -1 (/ (+ 1 (* -2 (+ 1 (* 3 t_0)))) x1)) t_1))
                                             x1)))
                                          x1))))
                                      (if (<= x1 7148113328562451/4611686018427387904)
                                        (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                        (+
                                         x1
                                         (+
                                          (+
                                           (*
                                            (pow x1 4)
                                            (+ 6 (* -1 (/ (+ 3 (* -1 (/ (+ 9 t_1) x1))) x1))))
                                           x1)
                                          9))))))
                                  double code(double x1, double x2) {
                                  	double t_0 = (2.0 * x2) - 3.0;
                                  	double t_1 = 4.0 * t_0;
                                  	double tmp;
                                  	if (x1 <= -1350.0) {
                                  		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)) + t_1)) / x1))) / x1)));
                                  	} else if (x1 <= 0.00155) {
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                  	} else {
                                  		tmp = x1 + (((pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + t_1) / x1))) / 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) :: tmp
                                      t_0 = (2.0d0 * x2) - 3.0d0
                                      t_1 = 4.0d0 * t_0
                                      if (x1 <= (-1350.0d0)) then
                                          tmp = (x1 ** 4.0d0) * (6.0d0 + ((-1.0d0) * ((3.0d0 + ((-1.0d0) * ((9.0d0 + (((-1.0d0) * ((1.0d0 + ((-2.0d0) * (1.0d0 + (3.0d0 * t_0)))) / x1)) + t_1)) / x1))) / x1)))
                                      else if (x1 <= 0.00155d0) then
                                          tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                      else
                                          tmp = x1 + ((((x1 ** 4.0d0) * (6.0d0 + ((-1.0d0) * ((3.0d0 + ((-1.0d0) * ((9.0d0 + t_1) / x1))) / x1)))) + x1) + 9.0d0)
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x1, double x2) {
                                  	double t_0 = (2.0 * x2) - 3.0;
                                  	double t_1 = 4.0 * t_0;
                                  	double tmp;
                                  	if (x1 <= -1350.0) {
                                  		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)) + t_1)) / x1))) / x1)));
                                  	} else if (x1 <= 0.00155) {
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                  	} else {
                                  		tmp = x1 + (((Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + t_1) / x1))) / x1)))) + x1) + 9.0);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x1, x2):
                                  	t_0 = (2.0 * x2) - 3.0
                                  	t_1 = 4.0 * t_0
                                  	tmp = 0
                                  	if x1 <= -1350.0:
                                  		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)) + t_1)) / x1))) / x1)))
                                  	elif x1 <= 0.00155:
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                  	else:
                                  		tmp = x1 + (((math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + t_1) / x1))) / x1)))) + x1) + 9.0)
                                  	return tmp
                                  
                                  function code(x1, x2)
                                  	t_0 = Float64(Float64(2.0 * x2) - 3.0)
                                  	t_1 = Float64(4.0 * t_0)
                                  	tmp = 0.0
                                  	if (x1 <= -1350.0)
                                  		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)) + t_1)) / x1))) / x1))));
                                  	elseif (x1 <= 0.00155)
                                  		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(x1 + Float64(Float64(Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + t_1) / x1))) / x1)))) + x1) + 9.0));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x1, x2)
                                  	t_0 = (2.0 * x2) - 3.0;
                                  	t_1 = 4.0 * t_0;
                                  	tmp = 0.0;
                                  	if (x1 <= -1350.0)
                                  		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)) + t_1)) / x1))) / x1)));
                                  	elseif (x1 <= 0.00155)
                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                  	else
                                  		tmp = x1 + ((((x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + t_1) / x1))) / x1)))) + x1) + 9.0);
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x1_, x2_] := Block[{t$95$0 = N[(N[(2 * x2), $MachinePrecision] - 3), $MachinePrecision]}, Block[{t$95$1 = N[(4 * t$95$0), $MachinePrecision]}, If[LessEqual[x1, -1350], N[(N[Power[x1, 4], $MachinePrecision] * N[(6 + N[(-1 * N[(N[(3 + N[(-1 * N[(N[(9 + N[(N[(-1 * N[(N[(1 + N[(-2 * N[(1 + N[(3 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7148113328562451/4611686018427387904], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[Power[x1, 4], $MachinePrecision] * N[(6 + N[(-1 * N[(N[(3 + N[(-1 * N[(N[(9 + t$95$1), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + 9), $MachinePrecision]), $MachinePrecision]]]]]
                                  
                                  \begin{array}{l}
                                  t_0 := 2 \cdot x2 - 3\\
                                  t_1 := 4 \cdot t\_0\\
                                  \mathbf{if}\;x1 \leq -1350:\\
                                  \;\;\;\;{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} + t\_1\right)}{x1}}{x1}\right)\\
                                  
                                  \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\
                                  \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;x1 + \left(\left({x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + t\_1}{x1}}{x1}\right) + x1\right) + 9\right)\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if x1 < -1350

                                    1. Initial program 70.9%

                                      \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                    3. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                      3. lower--.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                      4. lower-*.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                      5. lower-/.f6456.4%

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                    4. Applied rewrites56.4%

                                      \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                    5. Taylor expanded in x1 around 0

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

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

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

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

                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right) + x1\right) + \color{blue}{\left(-6 \cdot x2 + -3 \cdot x1\right)}\right) \]
                                    8. 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)} \]
                                    9. Applied rewrites48.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)} \]

                                    if -1350 < x1 < 0.0015499999999999999

                                    1. Initial program 70.9%

                                      \[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 rewrites55.0%

                                      \[\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-*.f6444.7%

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

                                      \[\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.3%

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

                                      \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                    11. 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)} \]
                                    12. 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.7%

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

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

                                    if 0.0015499999999999999 < x1

                                    1. Initial program 70.9%

                                      \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                    3. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                      3. lower--.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                      4. lower-*.f64N/A

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                      5. lower-/.f6456.4%

                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                    4. Applied rewrites56.4%

                                      \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                    5. Taylor expanded in x1 around inf

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

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

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

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

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

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

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

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

                                    Alternative 9: 95.4% accurate, 1.6× speedup?

                                    \[\begin{array}{l} t_0 := {x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) + x1\\ \mathbf{if}\;x1 \leq -1350:\\ \;\;\;\;x1 + \left(t\_0 + \left(-6 \cdot x2 + -3 \cdot x1\right)\right)\\ \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(t\_0 + 9\right)\\ \end{array} \]
                                    (FPCore (x1 x2)
                                      :precision binary64
                                      (let* ((t_0
                                            (+
                                             (*
                                              (pow x1 4)
                                              (+
                                               6
                                               (*
                                                -1
                                                (/ (+ 3 (* -1 (/ (+ 9 (* 4 (- (* 2 x2) 3))) x1))) x1))))
                                             x1)))
                                      (if (<= x1 -1350)
                                        (+ x1 (+ t_0 (+ (* -6 x2) (* -3 x1))))
                                        (if (<= x1 7148113328562451/4611686018427387904)
                                          (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                          (+ x1 (+ t_0 9))))))
                                    double code(double x1, double x2) {
                                    	double t_0 = (pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1;
                                    	double tmp;
                                    	if (x1 <= -1350.0) {
                                    		tmp = x1 + (t_0 + ((-6.0 * x2) + (-3.0 * x1)));
                                    	} else if (x1 <= 0.00155) {
                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                    	} else {
                                    		tmp = x1 + (t_0 + 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 ** 4.0d0) * (6.0d0 + ((-1.0d0) * ((3.0d0 + ((-1.0d0) * ((9.0d0 + (4.0d0 * ((2.0d0 * x2) - 3.0d0))) / x1))) / x1)))) + x1
                                        if (x1 <= (-1350.0d0)) then
                                            tmp = x1 + (t_0 + (((-6.0d0) * x2) + ((-3.0d0) * x1)))
                                        else if (x1 <= 0.00155d0) then
                                            tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                        else
                                            tmp = x1 + (t_0 + 9.0d0)
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x1, double x2) {
                                    	double t_0 = (Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1;
                                    	double tmp;
                                    	if (x1 <= -1350.0) {
                                    		tmp = x1 + (t_0 + ((-6.0 * x2) + (-3.0 * x1)));
                                    	} else if (x1 <= 0.00155) {
                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                    	} else {
                                    		tmp = x1 + (t_0 + 9.0);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x1, x2):
                                    	t_0 = (math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1
                                    	tmp = 0
                                    	if x1 <= -1350.0:
                                    		tmp = x1 + (t_0 + ((-6.0 * x2) + (-3.0 * x1)))
                                    	elif x1 <= 0.00155:
                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                    	else:
                                    		tmp = x1 + (t_0 + 9.0)
                                    	return tmp
                                    
                                    function code(x1, x2)
                                    	t_0 = Float64(Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0))) / x1))) / x1)))) + x1)
                                    	tmp = 0.0
                                    	if (x1 <= -1350.0)
                                    		tmp = Float64(x1 + Float64(t_0 + Float64(Float64(-6.0 * x2) + Float64(-3.0 * x1))));
                                    	elseif (x1 <= 0.00155)
                                    		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(x1 + Float64(t_0 + 9.0));
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x1, x2)
                                    	t_0 = ((x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1;
                                    	tmp = 0.0;
                                    	if (x1 <= -1350.0)
                                    		tmp = x1 + (t_0 + ((-6.0 * x2) + (-3.0 * x1)));
                                    	elseif (x1 <= 0.00155)
                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                    	else
                                    		tmp = x1 + (t_0 + 9.0);
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x1_, x2_] := Block[{t$95$0 = N[(N[(N[Power[x1, 4], $MachinePrecision] * N[(6 + N[(-1 * N[(N[(3 + N[(-1 * N[(N[(9 + N[(4 * N[(N[(2 * x2), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision]}, If[LessEqual[x1, -1350], N[(x1 + N[(t$95$0 + N[(N[(-6 * x2), $MachinePrecision] + N[(-3 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 7148113328562451/4611686018427387904], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(t$95$0 + 9), $MachinePrecision]), $MachinePrecision]]]]
                                    
                                    \begin{array}{l}
                                    t_0 := {x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) + x1\\
                                    \mathbf{if}\;x1 \leq -1350:\\
                                    \;\;\;\;x1 + \left(t\_0 + \left(-6 \cdot x2 + -3 \cdot x1\right)\right)\\
                                    
                                    \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\
                                    \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x1 + \left(t\_0 + 9\right)\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if x1 < -1350

                                      1. Initial program 70.9%

                                        \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                      3. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                        3. lower--.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                        4. lower-*.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                        5. lower-/.f6456.4%

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                      4. Applied rewrites56.4%

                                        \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                      5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

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

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

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

                                      if -1350 < x1 < 0.0015499999999999999

                                      1. Initial program 70.9%

                                        \[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 rewrites55.0%

                                        \[\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-*.f6444.7%

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

                                        \[\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.3%

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

                                        \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                      11. 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)} \]
                                      12. 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.7%

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

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

                                      if 0.0015499999999999999 < x1

                                      1. Initial program 70.9%

                                        \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                      3. Step-by-step derivation
                                        1. lower-*.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                        3. lower--.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                        4. lower-*.f64N/A

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                        5. lower-/.f6456.4%

                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                      4. Applied rewrites56.4%

                                        \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                      5. Taylor expanded in x1 around inf

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

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

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

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

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

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

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

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

                                      Alternative 10: 95.4% accurate, 1.6× speedup?

                                      \[\begin{array}{l} t_0 := x1 + \left(\left({x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) + x1\right) + 9\right)\\ \mathbf{if}\;x1 \leq -1350:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                      (FPCore (x1 x2)
                                        :precision binary64
                                        (let* ((t_0
                                              (+
                                               x1
                                               (+
                                                (+
                                                 (*
                                                  (pow x1 4)
                                                  (+
                                                   6
                                                   (*
                                                    -1
                                                    (/ (+ 3 (* -1 (/ (+ 9 (* 4 (- (* 2 x2) 3))) x1))) x1))))
                                                 x1)
                                                9))))
                                        (if (<= x1 -1350)
                                          t_0
                                          (if (<= x1 7148113328562451/4611686018427387904)
                                            (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                            t_0))))
                                      double code(double x1, double x2) {
                                      	double t_0 = x1 + (((pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1) + 9.0);
                                      	double tmp;
                                      	if (x1 <= -1350.0) {
                                      		tmp = t_0;
                                      	} else if (x1 <= 0.00155) {
                                      		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                      	} 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 + ((((x1 ** 4.0d0) * (6.0d0 + ((-1.0d0) * ((3.0d0 + ((-1.0d0) * ((9.0d0 + (4.0d0 * ((2.0d0 * x2) - 3.0d0))) / x1))) / x1)))) + x1) + 9.0d0)
                                          if (x1 <= (-1350.0d0)) then
                                              tmp = t_0
                                          else if (x1 <= 0.00155d0) then
                                              tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                          else
                                              tmp = t_0
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x1, double x2) {
                                      	double t_0 = x1 + (((Math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1) + 9.0);
                                      	double tmp;
                                      	if (x1 <= -1350.0) {
                                      		tmp = t_0;
                                      	} else if (x1 <= 0.00155) {
                                      		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                      	} else {
                                      		tmp = t_0;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x1, x2):
                                      	t_0 = x1 + (((math.pow(x1, 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1) + 9.0)
                                      	tmp = 0
                                      	if x1 <= -1350.0:
                                      		tmp = t_0
                                      	elif x1 <= 0.00155:
                                      		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                      	else:
                                      		tmp = t_0
                                      	return tmp
                                      
                                      function code(x1, x2)
                                      	t_0 = Float64(x1 + Float64(Float64(Float64((x1 ^ 4.0) * Float64(6.0 + Float64(-1.0 * Float64(Float64(3.0 + Float64(-1.0 * Float64(Float64(9.0 + Float64(4.0 * Float64(Float64(2.0 * x2) - 3.0))) / x1))) / x1)))) + x1) + 9.0))
                                      	tmp = 0.0
                                      	if (x1 <= -1350.0)
                                      		tmp = t_0;
                                      	elseif (x1 <= 0.00155)
                                      		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                      	else
                                      		tmp = t_0;
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x1, x2)
                                      	t_0 = x1 + ((((x1 ^ 4.0) * (6.0 + (-1.0 * ((3.0 + (-1.0 * ((9.0 + (4.0 * ((2.0 * x2) - 3.0))) / x1))) / x1)))) + x1) + 9.0);
                                      	tmp = 0.0;
                                      	if (x1 <= -1350.0)
                                      		tmp = t_0;
                                      	elseif (x1 <= 0.00155)
                                      		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                      	else
                                      		tmp = t_0;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(N[Power[x1, 4], $MachinePrecision] * N[(6 + N[(-1 * N[(N[(3 + N[(-1 * N[(N[(9 + N[(4 * N[(N[(2 * x2), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + 9), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -1350], t$95$0, If[LessEqual[x1, 7148113328562451/4611686018427387904], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                      
                                      \begin{array}{l}
                                      t_0 := x1 + \left(\left({x1}^{4} \cdot \left(6 + -1 \cdot \frac{3 + -1 \cdot \frac{9 + 4 \cdot \left(2 \cdot x2 - 3\right)}{x1}}{x1}\right) + x1\right) + 9\right)\\
                                      \mathbf{if}\;x1 \leq -1350:\\
                                      \;\;\;\;t\_0\\
                                      
                                      \mathbf{elif}\;x1 \leq \frac{7148113328562451}{4611686018427387904}:\\
                                      \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_0\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if x1 < -1350 or 0.0015499999999999999 < x1

                                        1. Initial program 70.9%

                                          \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                        3. Step-by-step derivation
                                          1. lower-*.f64N/A

                                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                          3. lower--.f64N/A

                                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                          4. lower-*.f64N/A

                                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                          5. lower-/.f6456.4%

                                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                        4. Applied rewrites56.4%

                                          \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                        5. Taylor expanded in x1 around inf

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

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

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

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

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

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

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

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

                                          if -1350 < x1 < 0.0015499999999999999

                                          1. Initial program 70.9%

                                            \[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 rewrites55.0%

                                            \[\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-*.f6444.7%

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

                                            \[\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.3%

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

                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                          11. 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)} \]
                                          12. 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.7%

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

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

                                        Alternative 11: 94.2% accurate, 0.6× speedup?

                                        \[\begin{array}{l} t_0 := \left(x1 \cdot x1\right) \cdot x1\\ t_1 := x1 \cdot x1 + 1\\ t_2 := x1 \cdot x1 - -1\\ t_3 := \left(3 \cdot x1\right) \cdot x1\\ t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\ t_5 := t\_3 \cdot t\_4\\ t_6 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{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\_1 + t\_5\right) + t\_0\right) + x1\right) + t\_6\right) \leq \infty:\\ \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(6 \cdot x1\right), x1, \left(3 - 2 \cdot x2\right), \left(\frac{\left(\left(x2 + x2\right) - x1\right) + t\_3}{t\_2} \cdot \left(x1 + x1\right)\right)\right) + t\_5\right) + t\_0\right) + x1\right) + t\_6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\ \end{array} \]
                                        (FPCore (x1 x2)
                                          :precision binary64
                                          (let* ((t_0 (* (* x1 x1) x1))
                                               (t_1 (+ (* x1 x1) 1))
                                               (t_2 (- (* x1 x1) -1))
                                               (t_3 (* (* 3 x1) x1))
                                               (t_4 (/ (- (+ t_3 (* 2 x2)) x1) t_1))
                                               (t_5 (* t_3 t_4))
                                               (t_6 (* 3 (/ (- (- t_3 (* 2 x2)) x1) t_1))))
                                          (if (<=
                                               (+
                                                x1
                                                (+
                                                 (+
                                                  (+
                                                   (+
                                                    (*
                                                     (+
                                                      (* (* (* 2 x1) t_4) (- t_4 3))
                                                      (* (* x1 x1) (- (* 4 t_4) 6)))
                                                     t_1)
                                                    t_5)
                                                   t_0)
                                                  x1)
                                                 t_6))
                                               INFINITY)
                                            (+
                                             x1
                                             (+
                                              (+
                                               (+
                                                (+
                                                 (134-z0z1z2z3z4
                                                  t_2
                                                  (* 6 x1)
                                                  x1
                                                  (- 3 (* 2 x2))
                                                  (* (/ (+ (- (+ x2 x2) x1) t_3) t_2) (+ x1 x1)))
                                                 t_5)
                                                t_0)
                                               x1)
                                              t_6))
                                            (+ x1 (+ (+ (* (pow x1 4) 6) x1) 9)))))
                                        \begin{array}{l}
                                        t_0 := \left(x1 \cdot x1\right) \cdot x1\\
                                        t_1 := x1 \cdot x1 + 1\\
                                        t_2 := x1 \cdot x1 - -1\\
                                        t_3 := \left(3 \cdot x1\right) \cdot x1\\
                                        t_4 := \frac{\left(t\_3 + 2 \cdot x2\right) - x1}{t\_1}\\
                                        t_5 := t\_3 \cdot t\_4\\
                                        t_6 := 3 \cdot \frac{\left(t\_3 - 2 \cdot x2\right) - x1}{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\_1 + t\_5\right) + t\_0\right) + x1\right) + t\_6\right) \leq \infty:\\
                                        \;\;\;\;x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(t\_2, \left(6 \cdot x1\right), x1, \left(3 - 2 \cdot x2\right), \left(\frac{\left(\left(x2 + x2\right) - x1\right) + t\_3}{t\_2} \cdot \left(x1 + x1\right)\right)\right) + t\_5\right) + t\_0\right) + x1\right) + t\_6\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\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 70.9%

                                            \[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. Step-by-step derivation
                                            1. lift-*.f64N/A

                                              \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\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. *-commutativeN/A

                                              \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\left(x1 \cdot x1 + 1\right) \cdot \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)} + \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) \]
                                            3. lift-+.f64N/A

                                              \[\leadsto x1 + \left(\left(\left(\left(\left(x1 \cdot x1 + 1\right) \cdot \color{blue}{\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)} + \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) \]
                                          3. Applied rewrites70.9%

                                            \[\leadsto x1 + \left(\left(\left(\left(\color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \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 x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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)} + \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) \]
                                          4. Taylor expanded in x1 around inf

                                            \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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) \]
                                          5. Step-by-step derivation
                                            1. Applied rewrites68.7%

                                              \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(\color{blue}{6} \cdot x1\right), x1, \left(3 - \frac{\left(\left(x2 + x2\right) - x1\right) + \left(3 \cdot x1\right) \cdot x1}{x1 \cdot x1 - -1}\right), \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) + \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 x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \color{blue}{\left(3 - 2 \cdot x2\right)}, \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) + \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) \]
                                            3. Step-by-step derivation
                                              1. lower--.f64N/A

                                                \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - \color{blue}{2 \cdot x2}\right), \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) + \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. lower-*.f6465.8%

                                                \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \left(3 - 2 \cdot \color{blue}{x2}\right), \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) + \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) \]
                                            4. Applied rewrites65.8%

                                              \[\leadsto x1 + \left(\left(\left(\left(\mathsf{134\_z0z1z2z3z4}\left(\left(x1 \cdot x1 - -1\right), \left(6 \cdot x1\right), x1, \color{blue}{\left(3 - 2 \cdot x2\right)}, \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) + \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) \]

                                            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 70.9%

                                              \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                            3. Step-by-step derivation
                                              1. lower-*.f64N/A

                                                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                              3. lower--.f64N/A

                                                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                              4. lower-*.f64N/A

                                                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                              5. lower-/.f6456.4%

                                                \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                            4. Applied rewrites56.4%

                                              \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                            5. Taylor expanded in x1 around inf

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

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

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

                                                  \[\leadsto x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right) \]
                                              4. Recombined 2 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 12: 93.1% accurate, 2.0× speedup?

                                              \[\begin{array}{l} \mathbf{if}\;x1 \leq -31:\\ \;\;\;\;x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right) + x1\right) + -6 \cdot x2\right)\\ \mathbf{elif}\;x1 \leq 300000000000000000:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right)\\ \end{array} \]
                                              (FPCore (x1 x2)
                                                :precision binary64
                                                (if (<= x1 -31)
                                                (+ x1 (+ (+ (* (pow x1 4) (- 6 (* 3 (/ 1 x1)))) x1) (* -6 x2)))
                                                (if (<= x1 300000000000000000)
                                                  (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                                  (+
                                                   x1
                                                   (+
                                                    (+ (* (pow x1 3) (- (* 6 x1) 3)) x1)
                                                    (+ (* -6 x2) (* -3 x1)))))))
                                              double code(double x1, double x2) {
                                              	double tmp;
                                              	if (x1 <= -31.0) {
                                              		tmp = x1 + (((pow(x1, 4.0) * (6.0 - (3.0 * (1.0 / x1)))) + x1) + (-6.0 * x2));
                                              	} else if (x1 <= 3e+17) {
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	} else {
                                              		tmp = x1 + (((pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)));
                                              	}
                                              	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 <= (-31.0d0)) then
                                                      tmp = x1 + ((((x1 ** 4.0d0) * (6.0d0 - (3.0d0 * (1.0d0 / x1)))) + x1) + ((-6.0d0) * x2))
                                                  else if (x1 <= 3d+17) then
                                                      tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                  else
                                                      tmp = x1 + ((((x1 ** 3.0d0) * ((6.0d0 * x1) - 3.0d0)) + x1) + (((-6.0d0) * x2) + ((-3.0d0) * x1)))
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x1, double x2) {
                                              	double tmp;
                                              	if (x1 <= -31.0) {
                                              		tmp = x1 + (((Math.pow(x1, 4.0) * (6.0 - (3.0 * (1.0 / x1)))) + x1) + (-6.0 * x2));
                                              	} else if (x1 <= 3e+17) {
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	} else {
                                              		tmp = x1 + (((Math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x1, x2):
                                              	tmp = 0
                                              	if x1 <= -31.0:
                                              		tmp = x1 + (((math.pow(x1, 4.0) * (6.0 - (3.0 * (1.0 / x1)))) + x1) + (-6.0 * x2))
                                              	elif x1 <= 3e+17:
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                              	else:
                                              		tmp = x1 + (((math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)))
                                              	return tmp
                                              
                                              function code(x1, x2)
                                              	tmp = 0.0
                                              	if (x1 <= -31.0)
                                              		tmp = Float64(x1 + Float64(Float64(Float64((x1 ^ 4.0) * Float64(6.0 - Float64(3.0 * Float64(1.0 / x1)))) + x1) + Float64(-6.0 * x2)));
                                              	elseif (x1 <= 3e+17)
                                              		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(x1 + Float64(Float64(Float64((x1 ^ 3.0) * Float64(Float64(6.0 * x1) - 3.0)) + x1) + Float64(Float64(-6.0 * x2) + Float64(-3.0 * x1))));
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x1, x2)
                                              	tmp = 0.0;
                                              	if (x1 <= -31.0)
                                              		tmp = x1 + ((((x1 ^ 4.0) * (6.0 - (3.0 * (1.0 / x1)))) + x1) + (-6.0 * x2));
                                              	elseif (x1 <= 3e+17)
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	else
                                              		tmp = x1 + ((((x1 ^ 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)));
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x1_, x2_] := If[LessEqual[x1, -31], N[(x1 + N[(N[(N[(N[Power[x1, 4], $MachinePrecision] * N[(6 - N[(3 * N[(1 / x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(-6 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 300000000000000000], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[Power[x1, 3], $MachinePrecision] * N[(N[(6 * x1), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(N[(-6 * x2), $MachinePrecision] + N[(-3 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              \mathbf{if}\;x1 \leq -31:\\
                                              \;\;\;\;x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{x1}\right) + x1\right) + -6 \cdot x2\right)\\
                                              
                                              \mathbf{elif}\;x1 \leq 300000000000000000:\\
                                              \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right)\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if x1 < -31

                                                1. Initial program 70.9%

                                                  \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                                  3. lower--.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                                  5. lower-/.f6456.4%

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                                4. Applied rewrites56.4%

                                                  \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                5. Taylor expanded in x1 around 0

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

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

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

                                                if -31 < x1 < 3e17

                                                1. Initial program 70.9%

                                                  \[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 rewrites55.0%

                                                  \[\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-*.f6444.7%

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

                                                  \[\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.3%

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

                                                  \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                11. 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)} \]
                                                12. 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.7%

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

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

                                                if 3e17 < x1

                                                1. Initial program 70.9%

                                                  \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                                  3. lower--.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                                  5. lower-/.f6456.4%

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                                4. Applied rewrites56.4%

                                                  \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

                                                    \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right) \]
                                                  4. lower-*.f6481.0%

                                                    \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right) \]
                                                10. Applied rewrites81.0%

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

                                              Alternative 13: 93.1% accurate, 2.0× speedup?

                                              \[\begin{array}{l} t_0 := x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right)\\ \mathbf{if}\;x1 \leq -31:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 300000000000000000:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                              (FPCore (x1 x2)
                                                :precision binary64
                                                (let* ((t_0
                                                      (+
                                                       x1
                                                       (+
                                                        (+ (* (pow x1 3) (- (* 6 x1) 3)) x1)
                                                        (+ (* -6 x2) (* -3 x1))))))
                                                (if (<= x1 -31)
                                                  t_0
                                                  (if (<= x1 300000000000000000)
                                                    (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                                    t_0))))
                                              double code(double x1, double x2) {
                                              	double t_0 = x1 + (((pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)));
                                              	double tmp;
                                              	if (x1 <= -31.0) {
                                              		tmp = t_0;
                                              	} else if (x1 <= 3e+17) {
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	} 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 + ((((x1 ** 3.0d0) * ((6.0d0 * x1) - 3.0d0)) + x1) + (((-6.0d0) * x2) + ((-3.0d0) * x1)))
                                                  if (x1 <= (-31.0d0)) then
                                                      tmp = t_0
                                                  else if (x1 <= 3d+17) then
                                                      tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                  else
                                                      tmp = t_0
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x1, double x2) {
                                              	double t_0 = x1 + (((Math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)));
                                              	double tmp;
                                              	if (x1 <= -31.0) {
                                              		tmp = t_0;
                                              	} else if (x1 <= 3e+17) {
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	} else {
                                              		tmp = t_0;
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x1, x2):
                                              	t_0 = x1 + (((math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)))
                                              	tmp = 0
                                              	if x1 <= -31.0:
                                              		tmp = t_0
                                              	elif x1 <= 3e+17:
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                              	else:
                                              		tmp = t_0
                                              	return tmp
                                              
                                              function code(x1, x2)
                                              	t_0 = Float64(x1 + Float64(Float64(Float64((x1 ^ 3.0) * Float64(Float64(6.0 * x1) - 3.0)) + x1) + Float64(Float64(-6.0 * x2) + Float64(-3.0 * x1))))
                                              	tmp = 0.0
                                              	if (x1 <= -31.0)
                                              		tmp = t_0;
                                              	elseif (x1 <= 3e+17)
                                              		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                              	else
                                              		tmp = t_0;
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x1, x2)
                                              	t_0 = x1 + ((((x1 ^ 3.0) * ((6.0 * x1) - 3.0)) + x1) + ((-6.0 * x2) + (-3.0 * x1)));
                                              	tmp = 0.0;
                                              	if (x1 <= -31.0)
                                              		tmp = t_0;
                                              	elseif (x1 <= 3e+17)
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	else
                                              		tmp = t_0;
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(N[Power[x1, 3], $MachinePrecision] * N[(N[(6 * x1), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + N[(N[(-6 * x2), $MachinePrecision] + N[(-3 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -31], t$95$0, If[LessEqual[x1, 300000000000000000], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                              
                                              \begin{array}{l}
                                              t_0 := x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right)\\
                                              \mathbf{if}\;x1 \leq -31:\\
                                              \;\;\;\;t\_0\\
                                              
                                              \mathbf{elif}\;x1 \leq 300000000000000000:\\
                                              \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;t\_0\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if x1 < -31 or 3e17 < x1

                                                1. Initial program 70.9%

                                                  \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                                  3. lower--.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                                  5. lower-/.f6456.4%

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                                4. Applied rewrites56.4%

                                                  \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                5. Taylor expanded in x1 around 0

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

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

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

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

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

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

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

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

                                                    \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right) \]
                                                  4. lower-*.f6481.0%

                                                    \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + \left(-6 \cdot x2 + -3 \cdot x1\right)\right) \]
                                                10. Applied rewrites81.0%

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

                                                if -31 < x1 < 3e17

                                                1. Initial program 70.9%

                                                  \[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 rewrites55.0%

                                                  \[\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-*.f6444.7%

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

                                                  \[\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.3%

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

                                                  \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                11. 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)} \]
                                                12. 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.7%

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

                                                  \[\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 14: 93.0% accurate, 2.2× speedup?

                                              \[\begin{array}{l} \mathbf{if}\;x1 \leq -850:\\ \;\;\;\;\left(9 + \left(\left(6 - \frac{3}{x1}\right) \cdot {x1}^{4} + x1\right)\right) + x1\\ \mathbf{elif}\;x1 \leq 300000000000000000:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right)\\ \end{array} \]
                                              (FPCore (x1 x2)
                                                :precision binary64
                                                (if (<= x1 -850)
                                                (+ (+ 9 (+ (* (- 6 (/ 3 x1)) (pow x1 4)) x1)) x1)
                                                (if (<= x1 300000000000000000)
                                                  (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                                  (+ x1 (+ (+ (* (pow x1 3) (- (* 6 x1) 3)) x1) 9)))))
                                              double code(double x1, double x2) {
                                              	double tmp;
                                              	if (x1 <= -850.0) {
                                              		tmp = (9.0 + (((6.0 - (3.0 / x1)) * pow(x1, 4.0)) + x1)) + x1;
                                              	} else if (x1 <= 3e+17) {
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	} else {
                                              		tmp = x1 + (((pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + 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) :: tmp
                                                  if (x1 <= (-850.0d0)) then
                                                      tmp = (9.0d0 + (((6.0d0 - (3.0d0 / x1)) * (x1 ** 4.0d0)) + x1)) + x1
                                                  else if (x1 <= 3d+17) then
                                                      tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                  else
                                                      tmp = x1 + ((((x1 ** 3.0d0) * ((6.0d0 * x1) - 3.0d0)) + x1) + 9.0d0)
                                                  end if
                                                  code = tmp
                                              end function
                                              
                                              public static double code(double x1, double x2) {
                                              	double tmp;
                                              	if (x1 <= -850.0) {
                                              		tmp = (9.0 + (((6.0 - (3.0 / x1)) * Math.pow(x1, 4.0)) + x1)) + x1;
                                              	} else if (x1 <= 3e+17) {
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	} else {
                                              		tmp = x1 + (((Math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + 9.0);
                                              	}
                                              	return tmp;
                                              }
                                              
                                              def code(x1, x2):
                                              	tmp = 0
                                              	if x1 <= -850.0:
                                              		tmp = (9.0 + (((6.0 - (3.0 / x1)) * math.pow(x1, 4.0)) + x1)) + x1
                                              	elif x1 <= 3e+17:
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                              	else:
                                              		tmp = x1 + (((math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + 9.0)
                                              	return tmp
                                              
                                              function code(x1, x2)
                                              	tmp = 0.0
                                              	if (x1 <= -850.0)
                                              		tmp = Float64(Float64(9.0 + Float64(Float64(Float64(6.0 - Float64(3.0 / x1)) * (x1 ^ 4.0)) + x1)) + x1);
                                              	elseif (x1 <= 3e+17)
                                              		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(x1 + Float64(Float64(Float64((x1 ^ 3.0) * Float64(Float64(6.0 * x1) - 3.0)) + x1) + 9.0));
                                              	end
                                              	return tmp
                                              end
                                              
                                              function tmp_2 = code(x1, x2)
                                              	tmp = 0.0;
                                              	if (x1 <= -850.0)
                                              		tmp = (9.0 + (((6.0 - (3.0 / x1)) * (x1 ^ 4.0)) + x1)) + x1;
                                              	elseif (x1 <= 3e+17)
                                              		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                              	else
                                              		tmp = x1 + ((((x1 ^ 3.0) * ((6.0 * x1) - 3.0)) + x1) + 9.0);
                                              	end
                                              	tmp_2 = tmp;
                                              end
                                              
                                              code[x1_, x2_] := If[LessEqual[x1, -850], N[(N[(9 + N[(N[(N[(6 - N[(3 / x1), $MachinePrecision]), $MachinePrecision] * N[Power[x1, 4], $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision], If[LessEqual[x1, 300000000000000000], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 + N[(N[(N[(N[Power[x1, 3], $MachinePrecision] * N[(N[(6 * x1), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + 9), $MachinePrecision]), $MachinePrecision]]]
                                              
                                              \begin{array}{l}
                                              \mathbf{if}\;x1 \leq -850:\\
                                              \;\;\;\;\left(9 + \left(\left(6 - \frac{3}{x1}\right) \cdot {x1}^{4} + x1\right)\right) + x1\\
                                              
                                              \mathbf{elif}\;x1 \leq 300000000000000000:\\
                                              \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right)\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if x1 < -850

                                                1. Initial program 70.9%

                                                  \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                                  3. lower--.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                                  4. lower-*.f64N/A

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                                  5. lower-/.f6456.4%

                                                    \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                                4. Applied rewrites56.4%

                                                  \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                5. Taylor expanded in x1 around inf

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

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

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

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

                                                  if -850 < x1 < 3e17

                                                  1. Initial program 70.9%

                                                    \[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 rewrites55.0%

                                                    \[\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-*.f6444.7%

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

                                                    \[\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.3%

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

                                                    \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                  11. 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)} \]
                                                  12. 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.7%

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

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

                                                  if 3e17 < x1

                                                  1. Initial program 70.9%

                                                    \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                  3. Step-by-step derivation
                                                    1. lower-*.f64N/A

                                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                                    3. lower--.f64N/A

                                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                                    4. lower-*.f64N/A

                                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                                    5. lower-/.f6456.4%

                                                      \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                                  4. Applied rewrites56.4%

                                                    \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                  5. Taylor expanded in x1 around inf

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

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

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

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

                                                        \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right) \]
                                                      3. lower--.f64N/A

                                                        \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right) \]
                                                      4. lower-*.f6446.0%

                                                        \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right) \]
                                                    4. Applied rewrites46.0%

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

                                                  Alternative 15: 93.0% accurate, 2.2× speedup?

                                                  \[\begin{array}{l} t_0 := x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right)\\ \mathbf{if}\;x1 \leq -850:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 300000000000000000:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                  (FPCore (x1 x2)
                                                    :precision binary64
                                                    (let* ((t_0 (+ x1 (+ (+ (* (pow x1 3) (- (* 6 x1) 3)) x1) 9))))
                                                    (if (<= x1 -850)
                                                      t_0
                                                      (if (<= x1 300000000000000000)
                                                        (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                                        t_0))))
                                                  double code(double x1, double x2) {
                                                  	double t_0 = x1 + (((pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + 9.0);
                                                  	double tmp;
                                                  	if (x1 <= -850.0) {
                                                  		tmp = t_0;
                                                  	} else if (x1 <= 3e+17) {
                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                  	} 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 + ((((x1 ** 3.0d0) * ((6.0d0 * x1) - 3.0d0)) + x1) + 9.0d0)
                                                      if (x1 <= (-850.0d0)) then
                                                          tmp = t_0
                                                      else if (x1 <= 3d+17) then
                                                          tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                      else
                                                          tmp = t_0
                                                      end if
                                                      code = tmp
                                                  end function
                                                  
                                                  public static double code(double x1, double x2) {
                                                  	double t_0 = x1 + (((Math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + 9.0);
                                                  	double tmp;
                                                  	if (x1 <= -850.0) {
                                                  		tmp = t_0;
                                                  	} else if (x1 <= 3e+17) {
                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                  	} else {
                                                  		tmp = t_0;
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(x1, x2):
                                                  	t_0 = x1 + (((math.pow(x1, 3.0) * ((6.0 * x1) - 3.0)) + x1) + 9.0)
                                                  	tmp = 0
                                                  	if x1 <= -850.0:
                                                  		tmp = t_0
                                                  	elif x1 <= 3e+17:
                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                  	else:
                                                  		tmp = t_0
                                                  	return tmp
                                                  
                                                  function code(x1, x2)
                                                  	t_0 = Float64(x1 + Float64(Float64(Float64((x1 ^ 3.0) * Float64(Float64(6.0 * x1) - 3.0)) + x1) + 9.0))
                                                  	tmp = 0.0
                                                  	if (x1 <= -850.0)
                                                  		tmp = t_0;
                                                  	elseif (x1 <= 3e+17)
                                                  		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                  	else
                                                  		tmp = t_0;
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(x1, x2)
                                                  	t_0 = x1 + ((((x1 ^ 3.0) * ((6.0 * x1) - 3.0)) + x1) + 9.0);
                                                  	tmp = 0.0;
                                                  	if (x1 <= -850.0)
                                                  		tmp = t_0;
                                                  	elseif (x1 <= 3e+17)
                                                  		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                  	else
                                                  		tmp = t_0;
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(N[Power[x1, 3], $MachinePrecision] * N[(N[(6 * x1), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision] + x1), $MachinePrecision] + 9), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -850], t$95$0, If[LessEqual[x1, 300000000000000000], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                                  
                                                  \begin{array}{l}
                                                  t_0 := x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right)\\
                                                  \mathbf{if}\;x1 \leq -850:\\
                                                  \;\;\;\;t\_0\\
                                                  
                                                  \mathbf{elif}\;x1 \leq 300000000000000000:\\
                                                  \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;t\_0\\
                                                  
                                                  
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if x1 < -850 or 3e17 < x1

                                                    1. Initial program 70.9%

                                                      \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                    3. Step-by-step derivation
                                                      1. lower-*.f64N/A

                                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                                      3. lower--.f64N/A

                                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                                      4. lower-*.f64N/A

                                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                                      5. lower-/.f6456.4%

                                                        \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                                    4. Applied rewrites56.4%

                                                      \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                    5. Taylor expanded in x1 around inf

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

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

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

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

                                                          \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right) \]
                                                        3. lower--.f64N/A

                                                          \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right) \]
                                                        4. lower-*.f6446.0%

                                                          \[\leadsto x1 + \left(\left({x1}^{3} \cdot \left(6 \cdot x1 - 3\right) + x1\right) + 9\right) \]
                                                      4. Applied rewrites46.0%

                                                        \[\leadsto x1 + \left(\left({x1}^{3} \cdot \color{blue}{\left(6 \cdot x1 - 3\right)} + x1\right) + 9\right) \]

                                                      if -850 < x1 < 3e17

                                                      1. Initial program 70.9%

                                                        \[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 rewrites55.0%

                                                        \[\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-*.f6444.7%

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

                                                        \[\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.3%

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

                                                        \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                      11. 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)} \]
                                                      12. 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.7%

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

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

                                                    Alternative 16: 93.0% accurate, 2.3× speedup?

                                                    \[\begin{array}{l} t_0 := x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\ \mathbf{if}\;x1 \leq -850:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x1 \leq 300000000000000000:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                    (FPCore (x1 x2)
                                                      :precision binary64
                                                      (let* ((t_0 (+ x1 (+ (+ (* (pow x1 4) 6) x1) 9))))
                                                      (if (<= x1 -850)
                                                        t_0
                                                        (if (<= x1 300000000000000000)
                                                          (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))
                                                          t_0))))
                                                    double code(double x1, double x2) {
                                                    	double t_0 = x1 + (((pow(x1, 4.0) * 6.0) + x1) + 9.0);
                                                    	double tmp;
                                                    	if (x1 <= -850.0) {
                                                    		tmp = t_0;
                                                    	} else if (x1 <= 3e+17) {
                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                    	} 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 + ((((x1 ** 4.0d0) * 6.0d0) + x1) + 9.0d0)
                                                        if (x1 <= (-850.0d0)) then
                                                            tmp = t_0
                                                        else if (x1 <= 3d+17) then
                                                            tmp = ((-1.0d0) * x1) + (x2 * ((((-12.0d0) * x1) + (8.0d0 * (x1 * x2))) - 6.0d0))
                                                        else
                                                            tmp = t_0
                                                        end if
                                                        code = tmp
                                                    end function
                                                    
                                                    public static double code(double x1, double x2) {
                                                    	double t_0 = x1 + (((Math.pow(x1, 4.0) * 6.0) + x1) + 9.0);
                                                    	double tmp;
                                                    	if (x1 <= -850.0) {
                                                    		tmp = t_0;
                                                    	} else if (x1 <= 3e+17) {
                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                    	} else {
                                                    		tmp = t_0;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    def code(x1, x2):
                                                    	t_0 = x1 + (((math.pow(x1, 4.0) * 6.0) + x1) + 9.0)
                                                    	tmp = 0
                                                    	if x1 <= -850.0:
                                                    		tmp = t_0
                                                    	elif x1 <= 3e+17:
                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0))
                                                    	else:
                                                    		tmp = t_0
                                                    	return tmp
                                                    
                                                    function code(x1, x2)
                                                    	t_0 = Float64(x1 + Float64(Float64(Float64((x1 ^ 4.0) * 6.0) + x1) + 9.0))
                                                    	tmp = 0.0
                                                    	if (x1 <= -850.0)
                                                    		tmp = t_0;
                                                    	elseif (x1 <= 3e+17)
                                                    		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(Float64(-12.0 * x1) + Float64(8.0 * Float64(x1 * x2))) - 6.0)));
                                                    	else
                                                    		tmp = t_0;
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    function tmp_2 = code(x1, x2)
                                                    	t_0 = x1 + ((((x1 ^ 4.0) * 6.0) + x1) + 9.0);
                                                    	tmp = 0.0;
                                                    	if (x1 <= -850.0)
                                                    		tmp = t_0;
                                                    	elseif (x1 <= 3e+17)
                                                    		tmp = (-1.0 * x1) + (x2 * (((-12.0 * x1) + (8.0 * (x1 * x2))) - 6.0));
                                                    	else
                                                    		tmp = t_0;
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    code[x1_, x2_] := Block[{t$95$0 = N[(x1 + N[(N[(N[(N[Power[x1, 4], $MachinePrecision] * 6), $MachinePrecision] + x1), $MachinePrecision] + 9), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x1, -850], t$95$0, If[LessEqual[x1, 300000000000000000], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                                                    
                                                    \begin{array}{l}
                                                    t_0 := x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right)\\
                                                    \mathbf{if}\;x1 \leq -850:\\
                                                    \;\;\;\;t\_0\\
                                                    
                                                    \mathbf{elif}\;x1 \leq 300000000000000000:\\
                                                    \;\;\;\;-1 \cdot x1 + x2 \cdot \left(\left(-12 \cdot x1 + 8 \cdot \left(x1 \cdot x2\right)\right) - 6\right)\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;t\_0\\
                                                    
                                                    
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if x1 < -850 or 3e17 < x1

                                                      1. Initial program 70.9%

                                                        \[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 x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                      3. Step-by-step derivation
                                                        1. lower-*.f64N/A

                                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \color{blue}{\left(6 - 3 \cdot \frac{1}{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. lower-pow.f64N/A

                                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(\color{blue}{6} - 3 \cdot \frac{1}{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) \]
                                                        3. lower--.f64N/A

                                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - \color{blue}{3 \cdot \frac{1}{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) \]
                                                        4. lower-*.f64N/A

                                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \color{blue}{\frac{1}{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) \]
                                                        5. lower-/.f6456.4%

                                                          \[\leadsto x1 + \left(\left({x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{\color{blue}{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) \]
                                                      4. Applied rewrites56.4%

                                                        \[\leadsto x1 + \left(\left(\color{blue}{{x1}^{4} \cdot \left(6 - 3 \cdot \frac{1}{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) \]
                                                      5. Taylor expanded in x1 around inf

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

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

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

                                                            \[\leadsto x1 + \left(\left({x1}^{4} \cdot 6 + x1\right) + 9\right) \]

                                                          if -850 < x1 < 3e17

                                                          1. Initial program 70.9%

                                                            \[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 rewrites55.0%

                                                            \[\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-*.f6444.7%

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

                                                            \[\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.3%

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

                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                          11. 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)} \]
                                                          12. 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.7%

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

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

                                                        Alternative 17: 76.5% accurate, 7.3× speedup?

                                                        \[\begin{array}{l} \mathbf{if}\;x1 \leq -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024:\\ \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x1 \cdot \left(9 + -19 \cdot x1\right) - 1\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
                                                             -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024)
                                                          (+ (* -6 x2) (* x1 (- (* x1 (+ 9 (* -19 x1))) 1)))
                                                          (+ (* -1 x1) (* x2 (- (+ (* -12 x1) (* 8 (* x1 x2))) 6)))))
                                                        double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if (x1 <= -1.05e+85) {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.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.05d+85)) then
                                                                tmp = ((-6.0d0) * x2) + (x1 * ((x1 * (9.0d0 + ((-19.0d0) * x1))) - 1.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.05e+85) {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.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.05e+85:
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.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.05e+85)
                                                        		tmp = Float64(Float64(-6.0 * x2) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(-19.0 * x1))) - 1.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.05e+85)
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.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, -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024], N[(N[(-6 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9 + N[(-19 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(N[(-12 * x1), $MachinePrecision] + N[(8 * N[(x1 * x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        \mathbf{if}\;x1 \leq -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024:\\
                                                        \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x1 \cdot \left(9 + -19 \cdot x1\right) - 1\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.05e85

                                                          1. Initial program 70.9%

                                                            \[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(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(\left(2 \cdot \left(-2 \cdot x2 + -1 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(3 \cdot \left(3 - -2 \cdot x2\right) + \left(6 \cdot x2 + \left(8 \cdot x2 + x1 \cdot \left(\left(2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + -2 \cdot x2\right)\right) + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 2 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 3\right)\right)\right)\right)\right) - 6\right)\right) - 1\right)} \]
                                                          3. Applied rewrites50.5%

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

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

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

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

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

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

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

                                                          if -1.05e85 < x1

                                                          1. Initial program 70.9%

                                                            \[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 rewrites55.0%

                                                            \[\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-*.f6444.7%

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

                                                            \[\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.3%

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

                                                            \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                          11. 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)} \]
                                                          12. 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.7%

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

                                                            \[\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 18: 70.8% accurate, 8.3× speedup?

                                                        \[\begin{array}{l} \mathbf{if}\;x1 \leq -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024:\\ \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x1 \cdot \left(9 + -19 \cdot x1\right) - 1\right)\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right)\\ \end{array} \]
                                                        (FPCore (x1 x2)
                                                          :precision binary64
                                                          (if (<=
                                                             x1
                                                             -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024)
                                                          (+ (* -6 x2) (* x1 (- (* x1 (+ 9 (* -19 x1))) 1)))
                                                          (+ (* -6 x2) (* x1 (- (* x2 (- (* 8 x2) 12)) 1)))))
                                                        double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if (x1 <= -1.05e+85) {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0));
                                                        	} else {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 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.05d+85)) then
                                                                tmp = ((-6.0d0) * x2) + (x1 * ((x1 * (9.0d0 + ((-19.0d0) * x1))) - 1.0d0))
                                                            else
                                                                tmp = ((-6.0d0) * x2) + (x1 * ((x2 * ((8.0d0 * x2) - 12.0d0)) - 1.0d0))
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if (x1 <= -1.05e+85) {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0));
                                                        	} else {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(x1, x2):
                                                        	tmp = 0
                                                        	if x1 <= -1.05e+85:
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0))
                                                        	else:
                                                        		tmp = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0))
                                                        	return tmp
                                                        
                                                        function code(x1, x2)
                                                        	tmp = 0.0
                                                        	if (x1 <= -1.05e+85)
                                                        		tmp = Float64(Float64(-6.0 * x2) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(-19.0 * x1))) - 1.0)));
                                                        	else
                                                        		tmp = Float64(Float64(-6.0 * x2) + Float64(x1 * Float64(Float64(x2 * Float64(Float64(8.0 * x2) - 12.0)) - 1.0)));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(x1, x2)
                                                        	tmp = 0.0;
                                                        	if (x1 <= -1.05e+85)
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0));
                                                        	else
                                                        		tmp = (-6.0 * x2) + (x1 * ((x2 * ((8.0 * x2) - 12.0)) - 1.0));
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[x1_, x2_] := If[LessEqual[x1, -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024], N[(N[(-6 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9 + N[(-19 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-6 * x2), $MachinePrecision] + N[(x1 * N[(N[(x2 * N[(N[(8 * x2), $MachinePrecision] - 12), $MachinePrecision]), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        \mathbf{if}\;x1 \leq -10500000000000000498709617261614356196923244486430150744980861873802189582763267457024:\\
                                                        \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x1 \cdot \left(9 + -19 \cdot x1\right) - 1\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x2 \cdot \left(8 \cdot x2 - 12\right) - 1\right)\\
                                                        
                                                        
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if x1 < -1.05e85

                                                          1. Initial program 70.9%

                                                            \[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(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(\left(2 \cdot \left(-2 \cdot x2 + -1 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(3 \cdot \left(3 - -2 \cdot x2\right) + \left(6 \cdot x2 + \left(8 \cdot x2 + x1 \cdot \left(\left(2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + -2 \cdot x2\right)\right) + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 2 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 3\right)\right)\right)\right)\right) - 6\right)\right) - 1\right)} \]
                                                          3. Applied rewrites50.5%

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

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

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

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

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

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

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

                                                          if -1.05e85 < x1

                                                          1. Initial program 70.9%

                                                            \[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 rewrites55.0%

                                                            \[\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-*.f6455.0%

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

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

                                                        Alternative 19: 64.5% accurate, 8.3× speedup?

                                                        \[\begin{array}{l} \mathbf{if}\;x1 \leq \frac{3389627864620585}{65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032}:\\ \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x1 \cdot \left(9 + -19 \cdot x1\right) - 1\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\ \end{array} \]
                                                        (FPCore (x1 x2)
                                                          :precision binary64
                                                          (if (<=
                                                             x1
                                                             3389627864620585/65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032)
                                                          (+ (* -6 x2) (* x1 (- (* x1 (+ 9 (* -19 x1))) 1)))
                                                          (* x1 (- (* 4 (* x2 (- (* 2 x2) 3))) 1))))
                                                        double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if (x1 <= 5.2e-77) {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0));
                                                        	} else {
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 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 <= 5.2d-77) then
                                                                tmp = ((-6.0d0) * x2) + (x1 * ((x1 * (9.0d0 + ((-19.0d0) * x1))) - 1.0d0))
                                                            else
                                                                tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 1.0d0)
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if (x1 <= 5.2e-77) {
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0));
                                                        	} else {
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(x1, x2):
                                                        	tmp = 0
                                                        	if x1 <= 5.2e-77:
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0))
                                                        	else:
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0)
                                                        	return tmp
                                                        
                                                        function code(x1, x2)
                                                        	tmp = 0.0
                                                        	if (x1 <= 5.2e-77)
                                                        		tmp = Float64(Float64(-6.0 * x2) + Float64(x1 * Float64(Float64(x1 * Float64(9.0 + Float64(-19.0 * x1))) - 1.0)));
                                                        	else
                                                        		tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 1.0));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(x1, x2)
                                                        	tmp = 0.0;
                                                        	if (x1 <= 5.2e-77)
                                                        		tmp = (-6.0 * x2) + (x1 * ((x1 * (9.0 + (-19.0 * x1))) - 1.0));
                                                        	else
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[x1_, x2_] := If[LessEqual[x1, 3389627864620585/65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032], N[(N[(-6 * x2), $MachinePrecision] + N[(x1 * N[(N[(x1 * N[(9 + N[(-19 * x1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(4 * N[(x2 * N[(N[(2 * x2), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        \mathbf{if}\;x1 \leq \frac{3389627864620585}{65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032}:\\
                                                        \;\;\;\;-6 \cdot x2 + x1 \cdot \left(x1 \cdot \left(9 + -19 \cdot x1\right) - 1\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\
                                                        
                                                        
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if x1 < 5.2000000000000002e-77

                                                          1. Initial program 70.9%

                                                            \[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(\left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) + x1 \cdot \left(\left(2 \cdot \left(-2 \cdot x2 + -1 \cdot \left(2 \cdot x2 - 3\right)\right) + \left(3 \cdot \left(3 - -2 \cdot x2\right) + \left(6 \cdot x2 + \left(8 \cdot x2 + x1 \cdot \left(\left(2 \cdot \left(\left(1 + \left(2 \cdot \left(x2 \cdot \left(3 + -2 \cdot x2\right)\right) + 3 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 2 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) + 4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right)\right) - 3\right)\right)\right)\right)\right) - 6\right)\right) - 1\right)} \]
                                                          3. Applied rewrites50.5%

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

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

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

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

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

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

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

                                                          if 5.2000000000000002e-77 < x1

                                                          1. Initial program 70.9%

                                                            \[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 rewrites55.0%

                                                            \[\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-*.f6444.7%

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

                                                            \[\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.0%

                                                              \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                          10. Applied rewrites33.0%

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

                                                        Alternative 20: 56.6% accurate, 7.6× speedup?

                                                        \[\begin{array}{l} \mathbf{if}\;x1 \leq -25999999999999997256817825017964609482768800836853525517434880:\\ \;\;\;\;x2 \cdot \left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right)\\ \mathbf{elif}\;x1 \leq \frac{3389627864620585}{65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot -6\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\ \end{array} \]
                                                        (FPCore (x1 x2)
                                                          :precision binary64
                                                          (if (<=
                                                             x1
                                                             -25999999999999997256817825017964609482768800836853525517434880)
                                                          (* x2 (+ (* -12 x1) (* -1 (/ x1 x2))))
                                                          (if (<=
                                                               x1
                                                               3389627864620585/65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032)
                                                            (+ (* -1 x1) (* x2 -6))
                                                            (* x1 (- (* 4 (* x2 (- (* 2 x2) 3))) 1)))))
                                                        double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if (x1 <= -2.6e+61) {
                                                        		tmp = x2 * ((-12.0 * x1) + (-1.0 * (x1 / x2)));
                                                        	} else if (x1 <= 5.2e-77) {
                                                        		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                        	} else {
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 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 <= (-2.6d+61)) then
                                                                tmp = x2 * (((-12.0d0) * x1) + ((-1.0d0) * (x1 / x2)))
                                                            else if (x1 <= 5.2d-77) then
                                                                tmp = ((-1.0d0) * x1) + (x2 * (-6.0d0))
                                                            else
                                                                tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 1.0d0)
                                                            end if
                                                            code = tmp
                                                        end function
                                                        
                                                        public static double code(double x1, double x2) {
                                                        	double tmp;
                                                        	if (x1 <= -2.6e+61) {
                                                        		tmp = x2 * ((-12.0 * x1) + (-1.0 * (x1 / x2)));
                                                        	} else if (x1 <= 5.2e-77) {
                                                        		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                        	} else {
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        def code(x1, x2):
                                                        	tmp = 0
                                                        	if x1 <= -2.6e+61:
                                                        		tmp = x2 * ((-12.0 * x1) + (-1.0 * (x1 / x2)))
                                                        	elif x1 <= 5.2e-77:
                                                        		tmp = (-1.0 * x1) + (x2 * -6.0)
                                                        	else:
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0)
                                                        	return tmp
                                                        
                                                        function code(x1, x2)
                                                        	tmp = 0.0
                                                        	if (x1 <= -2.6e+61)
                                                        		tmp = Float64(x2 * Float64(Float64(-12.0 * x1) + Float64(-1.0 * Float64(x1 / x2))));
                                                        	elseif (x1 <= 5.2e-77)
                                                        		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * -6.0));
                                                        	else
                                                        		tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 1.0));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        function tmp_2 = code(x1, x2)
                                                        	tmp = 0.0;
                                                        	if (x1 <= -2.6e+61)
                                                        		tmp = x2 * ((-12.0 * x1) + (-1.0 * (x1 / x2)));
                                                        	elseif (x1 <= 5.2e-77)
                                                        		tmp = (-1.0 * x1) + (x2 * -6.0);
                                                        	else
                                                        		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                        	end
                                                        	tmp_2 = tmp;
                                                        end
                                                        
                                                        code[x1_, x2_] := If[LessEqual[x1, -25999999999999997256817825017964609482768800836853525517434880], N[(x2 * N[(N[(-12 * x1), $MachinePrecision] + N[(-1 * N[(x1 / x2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x1, 3389627864620585/65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * -6), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(4 * N[(x2 * N[(N[(2 * x2), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]]]
                                                        
                                                        \begin{array}{l}
                                                        \mathbf{if}\;x1 \leq -25999999999999997256817825017964609482768800836853525517434880:\\
                                                        \;\;\;\;x2 \cdot \left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right)\\
                                                        
                                                        \mathbf{elif}\;x1 \leq \frac{3389627864620585}{65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032}:\\
                                                        \;\;\;\;-1 \cdot x1 + x2 \cdot -6\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\
                                                        
                                                        
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if x1 < -2.5999999999999997e61

                                                          1. Initial program 70.9%

                                                            \[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 rewrites55.0%

                                                            \[\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-*.f6444.7%

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

                                                            \[\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.3%

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

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

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

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

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

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

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

                                                              \[\leadsto x2 \cdot \left(-12 \cdot x1 + -1 \cdot \frac{x1}{x2}\right) \]
                                                          13. Applied rewrites25.5%

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

                                                          if -2.5999999999999997e61 < x1 < 5.2000000000000002e-77

                                                          1. Initial program 70.9%

                                                            \[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 rewrites55.0%

                                                            \[\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-*.f6444.7%

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

                                                            \[\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 rewrites38.8%

                                                              \[\leadsto -1 \cdot x1 + x2 \cdot -6 \]

                                                            if 5.2000000000000002e-77 < x1

                                                            1. Initial program 70.9%

                                                              \[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 rewrites55.0%

                                                              \[\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-*.f6444.7%

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

                                                              \[\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.0%

                                                                \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                            10. Applied rewrites33.0%

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

                                                          Alternative 21: 51.5% accurate, 9.0× speedup?

                                                          \[\begin{array}{l} \mathbf{if}\;x1 \leq \frac{3389627864620585}{65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032}:\\ \;\;\;\;-1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right)\\ \mathbf{else}:\\ \;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\ \end{array} \]
                                                          (FPCore (x1 x2)
                                                            :precision binary64
                                                            (if (<=
                                                               x1
                                                               3389627864620585/65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032)
                                                            (+ (* -1 x1) (* x2 (- (* -12 x1) 6)))
                                                            (* x1 (- (* 4 (* x2 (- (* 2 x2) 3))) 1))))
                                                          double code(double x1, double x2) {
                                                          	double tmp;
                                                          	if (x1 <= 5.2e-77) {
                                                          		tmp = (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0));
                                                          	} else {
                                                          		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 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 <= 5.2d-77) then
                                                                  tmp = ((-1.0d0) * x1) + (x2 * (((-12.0d0) * x1) - 6.0d0))
                                                              else
                                                                  tmp = x1 * ((4.0d0 * (x2 * ((2.0d0 * x2) - 3.0d0))) - 1.0d0)
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x1, double x2) {
                                                          	double tmp;
                                                          	if (x1 <= 5.2e-77) {
                                                          		tmp = (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0));
                                                          	} else {
                                                          		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x1, x2):
                                                          	tmp = 0
                                                          	if x1 <= 5.2e-77:
                                                          		tmp = (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0))
                                                          	else:
                                                          		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0)
                                                          	return tmp
                                                          
                                                          function code(x1, x2)
                                                          	tmp = 0.0
                                                          	if (x1 <= 5.2e-77)
                                                          		tmp = Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(-12.0 * x1) - 6.0)));
                                                          	else
                                                          		tmp = Float64(x1 * Float64(Float64(4.0 * Float64(x2 * Float64(Float64(2.0 * x2) - 3.0))) - 1.0));
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x1, x2)
                                                          	tmp = 0.0;
                                                          	if (x1 <= 5.2e-77)
                                                          		tmp = (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0));
                                                          	else
                                                          		tmp = x1 * ((4.0 * (x2 * ((2.0 * x2) - 3.0))) - 1.0);
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x1_, x2_] := If[LessEqual[x1, 3389627864620585/65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(-12 * x1), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(4 * N[(x2 * N[(N[(2 * x2), $MachinePrecision] - 3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]]
                                                          
                                                          \begin{array}{l}
                                                          \mathbf{if}\;x1 \leq \frac{3389627864620585}{65185151242703554760590262029100101153646988597309960020356494379340201592426774597868716032}:\\
                                                          \;\;\;\;-1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right)\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right)\\
                                                          
                                                          
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if x1 < 5.2000000000000002e-77

                                                            1. Initial program 70.9%

                                                              \[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 rewrites55.0%

                                                              \[\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-*.f6444.7%

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

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

                                                            if 5.2000000000000002e-77 < x1

                                                            1. Initial program 70.9%

                                                              \[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 rewrites55.0%

                                                              \[\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-*.f6444.7%

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

                                                              \[\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.0%

                                                                \[\leadsto x1 \cdot \left(4 \cdot \left(x2 \cdot \left(2 \cdot x2 - 3\right)\right) - 1\right) \]
                                                            10. Applied rewrites33.0%

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

                                                          Alternative 22: 44.7% accurate, 13.5× speedup?

                                                          \[-1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                          (FPCore (x1 x2)
                                                            :precision binary64
                                                            (+ (* -1 x1) (* x2 (- (* -12 x1) 6))))
                                                          double code(double x1, double x2) {
                                                          	return (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0));
                                                          }
                                                          
                                                          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 = ((-1.0d0) * x1) + (x2 * (((-12.0d0) * x1) - 6.0d0))
                                                          end function
                                                          
                                                          public static double code(double x1, double x2) {
                                                          	return (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0));
                                                          }
                                                          
                                                          def code(x1, x2):
                                                          	return (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0))
                                                          
                                                          function code(x1, x2)
                                                          	return Float64(Float64(-1.0 * x1) + Float64(x2 * Float64(Float64(-12.0 * x1) - 6.0)))
                                                          end
                                                          
                                                          function tmp = code(x1, x2)
                                                          	tmp = (-1.0 * x1) + (x2 * ((-12.0 * x1) - 6.0));
                                                          end
                                                          
                                                          code[x1_, x2_] := N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * N[(N[(-12 * x1), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                          
                                                          -1 \cdot x1 + x2 \cdot \left(-12 \cdot x1 - 6\right)
                                                          
                                                          Derivation
                                                          1. Initial program 70.9%

                                                            \[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 rewrites55.0%

                                                            \[\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-*.f6444.7%

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

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

                                                          Alternative 23: 44.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 1000000000000000000161765076786456438212668646231659438295495017101117499225738747865260243034213915253779773568180337416027445820567779199643391541606026068611150746122284976177256650044200527276807327067690462112661427500197051226489898260678763391449376088547292320814127957486330655468919122263277568:\\ \;\;\;\;-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 x1) x1))
                                                                 (t_1 (+ (* x1 x1) 1))
                                                                 (t_2 (/ (- (+ t_0 (* 2 x2)) x1) t_1)))
                                                            (if (<=
                                                                 (+
                                                                  x1
                                                                  (+
                                                                   (+
                                                                    (+
                                                                     (+
                                                                      (*
                                                                       (+
                                                                        (* (* (* 2 x1) t_2) (- t_2 3))
                                                                        (* (* x1 x1) (- (* 4 t_2) 6)))
                                                                       t_1)
                                                                      (* t_0 t_2))
                                                                     (* (* x1 x1) x1))
                                                                    x1)
                                                                   (* 3 (/ (- (- t_0 (* 2 x2)) x1) t_1))))
                                                                 1000000000000000000161765076786456438212668646231659438295495017101117499225738747865260243034213915253779773568180337416027445820567779199643391541606026068611150746122284976177256650044200527276807327067690462112661427500197051226489898260678763391449376088547292320814127957486330655468919122263277568)
                                                              (+ (* -1 x1) (* x2 -6))
                                                              (* x1 (- (* -12 x2) 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;
                                                          	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+303) {
                                                          		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+303) 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+303) {
                                                          		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+303:
                                                          		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+303)
                                                          		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+303)
                                                          		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 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4 * t$95$2), $MachinePrecision] - 6), $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 * N[(N[(N[(t$95$0 - N[(2 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1000000000000000000161765076786456438212668646231659438295495017101117499225738747865260243034213915253779773568180337416027445820567779199643391541606026068611150746122284976177256650044200527276807327067690462112661427500197051226489898260678763391449376088547292320814127957486330655468919122263277568], N[(N[(-1 * x1), $MachinePrecision] + N[(x2 * -6), $MachinePrecision]), $MachinePrecision], N[(x1 * N[(N[(-12 * x2), $MachinePrecision] - 1), $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 1000000000000000000161765076786456438212668646231659438295495017101117499225738747865260243034213915253779773568180337416027445820567779199643391541606026068611150746122284976177256650044200527276807327067690462112661427500197051226489898260678763391449376088547292320814127957486330655468919122263277568:\\
                                                          \;\;\;\;-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)))))) < 1e303

                                                            1. Initial program 70.9%

                                                              \[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 rewrites55.0%

                                                              \[\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-*.f6444.7%

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

                                                              \[\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 rewrites38.8%

                                                                \[\leadsto -1 \cdot x1 + x2 \cdot -6 \]

                                                              if 1e303 < (+.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 70.9%

                                                                \[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 rewrites55.0%

                                                                \[\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-*.f6444.7%

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

                                                                \[\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.3%

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

                                                                \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                            10. Recombined 2 regimes into one program.
                                                            11. Add Preprocessing

                                                            Alternative 24: 37.7% accurate, 11.4× speedup?

                                                            \[\begin{array}{l} t_0 := x2 \cdot \left(-12 \cdot x1 - 6\right)\\ \mathbf{if}\;x2 \leq \frac{-352281387416075}{146783911423364576743092537299333564210980159306769991919205685720763064069663027716481187399048043939495936}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x2 \leq \frac{1780551949697837}{50872912848509630386961759877939283730657641008879914553804457182037637617627197811290223700497087789481581959483591006819830334885554237978846405428549423569451580654251209705071092879576217840034217957579701248029256805705844583825408}:\\ \;\;\;\;x1 \cdot -1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                            (FPCore (x1 x2)
                                                              :precision binary64
                                                              (let* ((t_0 (* x2 (- (* -12 x1) 6))))
                                                              (if (<=
                                                                   x2
                                                                   -352281387416075/146783911423364576743092537299333564210980159306769991919205685720763064069663027716481187399048043939495936)
                                                                t_0
                                                                (if (<=
                                                                     x2
                                                                     1780551949697837/50872912848509630386961759877939283730657641008879914553804457182037637617627197811290223700497087789481581959483591006819830334885554237978846405428549423569451580654251209705071092879576217840034217957579701248029256805705844583825408)
                                                                  (* x1 -1)
                                                                  t_0))))
                                                            double code(double x1, double x2) {
                                                            	double t_0 = x2 * ((-12.0 * x1) - 6.0);
                                                            	double tmp;
                                                            	if (x2 <= -2.4e-93) {
                                                            		tmp = t_0;
                                                            	} else if (x2 <= 3.5e-221) {
                                                            		tmp = x1 * -1.0;
                                                            	} 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 = x2 * (((-12.0d0) * x1) - 6.0d0)
                                                                if (x2 <= (-2.4d-93)) then
                                                                    tmp = t_0
                                                                else if (x2 <= 3.5d-221) then
                                                                    tmp = x1 * (-1.0d0)
                                                                else
                                                                    tmp = t_0
                                                                end if
                                                                code = tmp
                                                            end function
                                                            
                                                            public static double code(double x1, double x2) {
                                                            	double t_0 = x2 * ((-12.0 * x1) - 6.0);
                                                            	double tmp;
                                                            	if (x2 <= -2.4e-93) {
                                                            		tmp = t_0;
                                                            	} else if (x2 <= 3.5e-221) {
                                                            		tmp = x1 * -1.0;
                                                            	} else {
                                                            		tmp = t_0;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            def code(x1, x2):
                                                            	t_0 = x2 * ((-12.0 * x1) - 6.0)
                                                            	tmp = 0
                                                            	if x2 <= -2.4e-93:
                                                            		tmp = t_0
                                                            	elif x2 <= 3.5e-221:
                                                            		tmp = x1 * -1.0
                                                            	else:
                                                            		tmp = t_0
                                                            	return tmp
                                                            
                                                            function code(x1, x2)
                                                            	t_0 = Float64(x2 * Float64(Float64(-12.0 * x1) - 6.0))
                                                            	tmp = 0.0
                                                            	if (x2 <= -2.4e-93)
                                                            		tmp = t_0;
                                                            	elseif (x2 <= 3.5e-221)
                                                            		tmp = Float64(x1 * -1.0);
                                                            	else
                                                            		tmp = t_0;
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            function tmp_2 = code(x1, x2)
                                                            	t_0 = x2 * ((-12.0 * x1) - 6.0);
                                                            	tmp = 0.0;
                                                            	if (x2 <= -2.4e-93)
                                                            		tmp = t_0;
                                                            	elseif (x2 <= 3.5e-221)
                                                            		tmp = x1 * -1.0;
                                                            	else
                                                            		tmp = t_0;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            code[x1_, x2_] := Block[{t$95$0 = N[(x2 * N[(N[(-12 * x1), $MachinePrecision] - 6), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x2, -352281387416075/146783911423364576743092537299333564210980159306769991919205685720763064069663027716481187399048043939495936], t$95$0, If[LessEqual[x2, 1780551949697837/50872912848509630386961759877939283730657641008879914553804457182037637617627197811290223700497087789481581959483591006819830334885554237978846405428549423569451580654251209705071092879576217840034217957579701248029256805705844583825408], N[(x1 * -1), $MachinePrecision], t$95$0]]]
                                                            
                                                            \begin{array}{l}
                                                            t_0 := x2 \cdot \left(-12 \cdot x1 - 6\right)\\
                                                            \mathbf{if}\;x2 \leq \frac{-352281387416075}{146783911423364576743092537299333564210980159306769991919205685720763064069663027716481187399048043939495936}:\\
                                                            \;\;\;\;t\_0\\
                                                            
                                                            \mathbf{elif}\;x2 \leq \frac{1780551949697837}{50872912848509630386961759877939283730657641008879914553804457182037637617627197811290223700497087789481581959483591006819830334885554237978846405428549423569451580654251209705071092879576217840034217957579701248029256805705844583825408}:\\
                                                            \;\;\;\;x1 \cdot -1\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;t\_0\\
                                                            
                                                            
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if x2 < -2.4000000000000001e-93 or 3.4999999999999999e-221 < x2

                                                              1. Initial program 70.9%

                                                                \[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 rewrites55.0%

                                                                \[\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-*.f6444.7%

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

                                                                \[\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.3%

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

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

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

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

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

                                                                  \[\leadsto x2 \cdot \left(-12 \cdot x1 - 6\right) \]
                                                              13. Applied rewrites32.8%

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

                                                              if -2.4000000000000001e-93 < x2 < 3.4999999999999999e-221

                                                              1. Initial program 70.9%

                                                                \[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 rewrites55.0%

                                                                \[\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-*.f6444.7%

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

                                                                \[\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.3%

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

                                                                \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                              11. Taylor expanded in x2 around 0

                                                                \[\leadsto x1 \cdot -1 \]
                                                              12. Step-by-step derivation
                                                                1. Applied rewrites13.9%

                                                                  \[\leadsto x1 \cdot -1 \]
                                                              13. Recombined 2 regimes into one program.
                                                              14. Add Preprocessing

                                                              Alternative 25: 20.3% accurate, 21.3× speedup?

                                                              \[x1 \cdot \left(-12 \cdot x2 - 1\right) \]
                                                              (FPCore (x1 x2)
                                                                :precision binary64
                                                                (* x1 (- (* -12 x2) 1)))
                                                              double code(double x1, double x2) {
                                                              	return x1 * ((-12.0 * x2) - 1.0);
                                                              }
                                                              
                                                              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 = x1 * (((-12.0d0) * x2) - 1.0d0)
                                                              end function
                                                              
                                                              public static double code(double x1, double x2) {
                                                              	return x1 * ((-12.0 * x2) - 1.0);
                                                              }
                                                              
                                                              def code(x1, x2):
                                                              	return x1 * ((-12.0 * x2) - 1.0)
                                                              
                                                              function code(x1, x2)
                                                              	return Float64(x1 * Float64(Float64(-12.0 * x2) - 1.0))
                                                              end
                                                              
                                                              function tmp = code(x1, x2)
                                                              	tmp = x1 * ((-12.0 * x2) - 1.0);
                                                              end
                                                              
                                                              code[x1_, x2_] := N[(x1 * N[(N[(-12 * x2), $MachinePrecision] - 1), $MachinePrecision]), $MachinePrecision]
                                                              
                                                              x1 \cdot \left(-12 \cdot x2 - 1\right)
                                                              
                                                              Derivation
                                                              1. Initial program 70.9%

                                                                \[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 rewrites55.0%

                                                                \[\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-*.f6444.7%

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

                                                                \[\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.3%

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

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

                                                              Alternative 26: 19.4% 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 10000000000000000065284077450682265568456642148886267118448844545520511777838181142510337509988867035816342470187175785193750117648543530356184548650438281396224:\\ \;\;\;\;x1 \cdot -1\\ \mathbf{else}:\\ \;\;\;\;-12 \cdot \left(x1 \cdot x2\right)\\ \end{array} \]
                                                              (FPCore (x1 x2)
                                                                :precision binary64
                                                                (let* ((t_0 (* (* 3 x1) x1))
                                                                     (t_1 (+ (* x1 x1) 1))
                                                                     (t_2 (/ (- (+ t_0 (* 2 x2)) x1) t_1)))
                                                                (if (<=
                                                                     (+
                                                                      x1
                                                                      (+
                                                                       (+
                                                                        (+
                                                                         (+
                                                                          (*
                                                                           (+
                                                                            (* (* (* 2 x1) t_2) (- t_2 3))
                                                                            (* (* x1 x1) (- (* 4 t_2) 6)))
                                                                           t_1)
                                                                          (* t_0 t_2))
                                                                         (* (* x1 x1) x1))
                                                                        x1)
                                                                       (* 3 (/ (- (- t_0 (* 2 x2)) x1) t_1))))
                                                                     10000000000000000065284077450682265568456642148886267118448844545520511777838181142510337509988867035816342470187175785193750117648543530356184548650438281396224)
                                                                  (* x1 -1)
                                                                  (* -12 (* x1 x2)))))
                                                              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+160) {
                                                              		tmp = x1 * -1.0;
                                                              	} else {
                                                              		tmp = -12.0 * (x1 * x2);
                                                              	}
                                                              	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+160) then
                                                                      tmp = x1 * (-1.0d0)
                                                                  else
                                                                      tmp = (-12.0d0) * (x1 * x2)
                                                                  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+160) {
                                                              		tmp = x1 * -1.0;
                                                              	} else {
                                                              		tmp = -12.0 * (x1 * x2);
                                                              	}
                                                              	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+160:
                                                              		tmp = x1 * -1.0
                                                              	else:
                                                              		tmp = -12.0 * (x1 * x2)
                                                              	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+160)
                                                              		tmp = Float64(x1 * -1.0);
                                                              	else
                                                              		tmp = Float64(-12.0 * Float64(x1 * x2));
                                                              	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+160)
                                                              		tmp = x1 * -1.0;
                                                              	else
                                                              		tmp = -12.0 * (x1 * x2);
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[x1_, x2_] := Block[{t$95$0 = N[(N[(3 * x1), $MachinePrecision] * x1), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x1 * x1), $MachinePrecision] + 1), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t$95$0 + N[(2 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[N[(x1 + N[(N[(N[(N[(N[(N[(N[(N[(N[(2 * x1), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(t$95$2 - 3), $MachinePrecision]), $MachinePrecision] + N[(N[(x1 * x1), $MachinePrecision] * N[(N[(4 * t$95$2), $MachinePrecision] - 6), $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 * N[(N[(N[(t$95$0 - N[(2 * x2), $MachinePrecision]), $MachinePrecision] - x1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 10000000000000000065284077450682265568456642148886267118448844545520511777838181142510337509988867035816342470187175785193750117648543530356184548650438281396224], N[(x1 * -1), $MachinePrecision], N[(-12 * N[(x1 * x2), $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 10000000000000000065284077450682265568456642148886267118448844545520511777838181142510337509988867035816342470187175785193750117648543530356184548650438281396224:\\
                                                              \;\;\;\;x1 \cdot -1\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;-12 \cdot \left(x1 \cdot x2\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)))))) < 1e160

                                                                1. Initial program 70.9%

                                                                  \[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 rewrites55.0%

                                                                  \[\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-*.f6444.7%

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

                                                                  \[\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.3%

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

                                                                  \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                                11. Taylor expanded in x2 around 0

                                                                  \[\leadsto x1 \cdot -1 \]
                                                                12. Step-by-step derivation
                                                                  1. Applied rewrites13.9%

                                                                    \[\leadsto x1 \cdot -1 \]

                                                                  if 1e160 < (+.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 70.9%

                                                                    \[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 rewrites55.0%

                                                                    \[\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-*.f6444.7%

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

                                                                    \[\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.3%

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

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

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

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

                                                                      \[\leadsto -12 \cdot \left(x1 \cdot x2\right) \]
                                                                  13. Applied rewrites9.1%

                                                                    \[\leadsto -12 \cdot \left(x1 \cdot x2\right) \]
                                                                13. Recombined 2 regimes into one program.
                                                                14. Add Preprocessing

                                                                Alternative 27: 13.9% accurate, 49.7× speedup?

                                                                \[x1 \cdot -1 \]
                                                                (FPCore (x1 x2)
                                                                  :precision binary64
                                                                  (* x1 -1))
                                                                double code(double x1, double x2) {
                                                                	return x1 * -1.0;
                                                                }
                                                                
                                                                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 = x1 * (-1.0d0)
                                                                end function
                                                                
                                                                public static double code(double x1, double x2) {
                                                                	return x1 * -1.0;
                                                                }
                                                                
                                                                def code(x1, x2):
                                                                	return x1 * -1.0
                                                                
                                                                function code(x1, x2)
                                                                	return Float64(x1 * -1.0)
                                                                end
                                                                
                                                                function tmp = code(x1, x2)
                                                                	tmp = x1 * -1.0;
                                                                end
                                                                
                                                                code[x1_, x2_] := N[(x1 * -1), $MachinePrecision]
                                                                
                                                                x1 \cdot -1
                                                                
                                                                Derivation
                                                                1. Initial program 70.9%

                                                                  \[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 rewrites55.0%

                                                                  \[\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-*.f6444.7%

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

                                                                  \[\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.3%

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

                                                                  \[\leadsto x1 \cdot \left(-12 \cdot x2 - \color{blue}{1}\right) \]
                                                                11. Taylor expanded in x2 around 0

                                                                  \[\leadsto x1 \cdot -1 \]
                                                                12. Step-by-step derivation
                                                                  1. Applied rewrites13.9%

                                                                    \[\leadsto x1 \cdot -1 \]
                                                                  2. Add Preprocessing

                                                                  Reproduce

                                                                  ?
                                                                  herbie shell --seed 2025271 -o generate:evaluate
                                                                  (FPCore (x1 x2)
                                                                    :name "Rosa's FloatVsDoubleBenchmark"
                                                                    :precision binary64
                                                                    (+ x1 (+ (+ (+ (+ (* (+ (* (* (* 2 x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) (- (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)) 3)) (* (* x1 x1) (- (* 4 (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))) 6))) (+ (* x1 x1) 1)) (* (* (* 3 x1) x1) (/ (- (+ (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1)))) (* (* x1 x1) x1)) x1) (* 3 (/ (- (- (* (* 3 x1) x1) (* 2 x2)) x1) (+ (* x1 x1) 1))))))