Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C

Percentage Accurate: 58.7% → 99.3%
Time: 14.3s
Alternatives: 18
Speedup: 2.5×

Specification

?
\[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
(FPCore (x y z)
  :precision binary64
  (/
 (*
  (- x 2)
  (+
   (*
    (+
     (*
      (+
       (*
        (+ (* x 104109730557/25000000000) 393497462077/5000000000)
        x)
       4297481763/31250000)
      x)
     y)
    x)
   z))
 (+
  (*
   (+
    (*
     (+ (* (+ x 216700011257/5000000000) x) 263505074721/1000000000)
     x)
    156699607947/500000000)
   x)
  23533438303/500000000)))
double code(double x, double y, double z) {
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z):
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z)
	return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606))
end
function tmp = code(x, y, z)
	tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
end
code[x_, y_, z_] := N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision]
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}

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

\[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
(FPCore (x y z)
  :precision binary64
  (/
 (*
  (- x 2)
  (+
   (*
    (+
     (*
      (+
       (*
        (+ (* x 104109730557/25000000000) 393497462077/5000000000)
        x)
       4297481763/31250000)
      x)
     y)
    x)
   z))
 (+
  (*
   (+
    (*
     (+ (* (+ x 216700011257/5000000000) x) 263505074721/1000000000)
     x)
    156699607947/500000000)
   x)
  23533438303/500000000)))
double code(double x, double y, double z) {
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
end function
public static double code(double x, double y, double z) {
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
}
def code(x, y, z):
	return ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
function code(x, y, z)
	return Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606))
end
function tmp = code(x, y, z)
	tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
end
code[x_, y_, z_] := N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision]
\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}

Alternative 1: 99.3% accurate, 0.4× speedup?

\[\begin{array}{l} t_0 := \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}\\ \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\ \;\;\;\;\frac{z}{t\_0} \cdot \left(x - 2\right) + \left(\left(y - \left(\frac{-4297481763}{31250000} \cdot x\right) \cdot \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot \left(x \cdot \frac{31250000}{4297481763}\right) - -1\right)\right) \cdot \frac{x}{t\_0}\right) \cdot \left(x - 2\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  (let* ((t_0
        (-
         (*
          (-
           (*
            (-
             (* (- x -216700011257/5000000000) x)
             -263505074721/1000000000)
            x)
           -156699607947/500000000)
          x)
         -23533438303/500000000)))
  (if (<=
       (/
        (*
         (- x 2)
         (+
          (*
           (+
            (*
             (+
              (*
               (+
                (* x 104109730557/25000000000)
                393497462077/5000000000)
               x)
              4297481763/31250000)
             x)
            y)
           x)
          z))
        (+
         (*
          (+
           (*
            (+
             (* (+ x 216700011257/5000000000) x)
             263505074721/1000000000)
            x)
           156699607947/500000000)
          x)
         23533438303/500000000))
       INFINITY)
    (+
     (* (/ z t_0) (- x 2))
     (*
      (*
       (-
        y
        (*
         (* -4297481763/31250000 x)
         (-
          (*
           (- (* 104109730557/25000000000 x) -393497462077/5000000000)
           (* x 31250000/4297481763))
          -1)))
       (/ x t_0))
      (- x 2)))
    (*
     -1
     (*
      x
      (-
       (*
        -1
        (/
         (-
          (*
           -1
           (/
            (-
             (+
              (* -1 (/ y x))
              (*
               409304707811198655637810418659684985388407301/3125000000000000000000000000000000000000
               (/ 1 x)))
             2284450290879775841688574159837293/625000000000000000000000000000)
            x))
          13764240537310136880149/125000000000000000000)
         x))
       104109730557/25000000000))))))
double code(double x, double y, double z) {
	double t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606;
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = ((z / t_0) * (x - 2.0)) + (((y - ((-137.519416416 * x) * ((((4.16438922228 * x) - -78.6994924154) * (x * 0.007271700433740735)) - -1.0))) * (x / t_0)) * (x - 2.0));
	} else {
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606;
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Double.POSITIVE_INFINITY) {
		tmp = ((z / t_0) * (x - 2.0)) + (((y - ((-137.519416416 * x) * ((((4.16438922228 * x) - -78.6994924154) * (x * 0.007271700433740735)) - -1.0))) * (x / t_0)) * (x - 2.0));
	} else {
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606
	tmp = 0
	if (((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= math.inf:
		tmp = ((z / t_0) * (x - 2.0)) + (((y - ((-137.519416416 * x) * ((((4.16438922228 * x) - -78.6994924154) * (x * 0.007271700433740735)) - -1.0))) * (x / t_0)) * (x - 2.0))
	else:
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228))
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)
	tmp = 0.0
	if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = Float64(Float64(Float64(z / t_0) * Float64(x - 2.0)) + Float64(Float64(Float64(y - Float64(Float64(-137.519416416 * x) * Float64(Float64(Float64(Float64(4.16438922228 * x) - -78.6994924154) * Float64(x * 0.007271700433740735)) - -1.0))) * Float64(x / t_0)) * Float64(x - 2.0)));
	else
		tmp = Float64(-1.0 * Float64(x * Float64(Float64(-1.0 * Float64(Float64(Float64(-1.0 * Float64(Float64(Float64(Float64(-1.0 * Float64(y / x)) + Float64(130977.50649958357 * Float64(1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606;
	tmp = 0.0;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = ((z / t_0) * (x - 2.0)) + (((y - ((-137.519416416 * x) * ((((4.16438922228 * x) - -78.6994924154) * (x * 0.007271700433740735)) - -1.0))) * (x / t_0)) * (x - 2.0));
	else
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(N[(N[(N[(x - -216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] - -263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] - -156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] - -23533438303/500000000), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(z / t$95$0), $MachinePrecision] * N[(x - 2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y - N[(N[(-4297481763/31250000 * x), $MachinePrecision] * N[(N[(N[(N[(104109730557/25000000000 * x), $MachinePrecision] - -393497462077/5000000000), $MachinePrecision] * N[(x * 31250000/4297481763), $MachinePrecision]), $MachinePrecision] - -1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(x - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1 * N[(x * N[(N[(-1 * N[(N[(N[(-1 * N[(N[(N[(N[(-1 * N[(y / x), $MachinePrecision]), $MachinePrecision] + N[(409304707811198655637810418659684985388407301/3125000000000000000000000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2284450290879775841688574159837293/625000000000000000000000000000), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - 13764240537310136880149/125000000000000000000), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - 104109730557/25000000000), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\
\;\;\;\;\frac{z}{t\_0} \cdot \left(x - 2\right) + \left(\left(y - \left(\frac{-4297481763}{31250000} \cdot x\right) \cdot \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot \left(x \cdot \frac{31250000}{4297481763}\right) - -1\right)\right) \cdot \frac{x}{t\_0}\right) \cdot \left(x - 2\right)\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < +inf.0

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Applied rewrites62.6%

      \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
    3. Applied rewrites62.6%

      \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\color{blue}{\left(y - \left(\frac{-4297481763}{31250000} \cdot x\right) \cdot \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot \left(x \cdot \frac{31250000}{4297481763}\right) - -1\right)\right)} \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right) \]

    if +inf.0 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    3. Step-by-step derivation
      1. lower-*.f6435.7%

        \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} \]
    4. Applied rewrites35.7%

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    5. Taylor expanded in x around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
    6. Applied rewrites47.4%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 99.3% accurate, 0.4× speedup?

\[\begin{array}{l} t_0 := \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}\\ \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\ \;\;\;\;\frac{z}{t\_0} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{t\_0}\right) \cdot \left(x - 2\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  (let* ((t_0
        (-
         (*
          (-
           (*
            (-
             (* (- x -216700011257/5000000000) x)
             -263505074721/1000000000)
            x)
           -156699607947/500000000)
          x)
         -23533438303/500000000)))
  (if (<=
       (/
        (*
         (- x 2)
         (+
          (*
           (+
            (*
             (+
              (*
               (+
                (* x 104109730557/25000000000)
                393497462077/5000000000)
               x)
              4297481763/31250000)
             x)
            y)
           x)
          z))
        (+
         (*
          (+
           (*
            (+
             (* (+ x 216700011257/5000000000) x)
             263505074721/1000000000)
            x)
           156699607947/500000000)
          x)
         23533438303/500000000))
       INFINITY)
    (+
     (* (/ z t_0) (- x 2))
     (*
      (*
       (+
        y
        (*
         (-
          (*
           (- (* 104109730557/25000000000 x) -393497462077/5000000000)
           x)
          -4297481763/31250000)
         x))
       (/ x t_0))
      (- x 2)))
    (*
     -1
     (*
      x
      (-
       (*
        -1
        (/
         (-
          (*
           -1
           (/
            (-
             (+
              (* -1 (/ y x))
              (*
               409304707811198655637810418659684985388407301/3125000000000000000000000000000000000000
               (/ 1 x)))
             2284450290879775841688574159837293/625000000000000000000000000000)
            x))
          13764240537310136880149/125000000000000000000)
         x))
       104109730557/25000000000))))))
double code(double x, double y, double z) {
	double t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606;
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = ((z / t_0) * (x - 2.0)) + (((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * (x / t_0)) * (x - 2.0));
	} else {
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606;
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Double.POSITIVE_INFINITY) {
		tmp = ((z / t_0) * (x - 2.0)) + (((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * (x / t_0)) * (x - 2.0));
	} else {
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	}
	return tmp;
}
def code(x, y, z):
	t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606
	tmp = 0
	if (((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= math.inf:
		tmp = ((z / t_0) * (x - 2.0)) + (((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * (x / t_0)) * (x - 2.0))
	else:
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228))
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)
	tmp = 0.0
	if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = Float64(Float64(Float64(z / t_0) * Float64(x - 2.0)) + Float64(Float64(Float64(y + Float64(Float64(Float64(Float64(Float64(4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * Float64(x / t_0)) * Float64(x - 2.0)));
	else
		tmp = Float64(-1.0 * Float64(x * Float64(Float64(-1.0 * Float64(Float64(Float64(-1.0 * Float64(Float64(Float64(Float64(-1.0 * Float64(y / x)) + Float64(130977.50649958357 * Float64(1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606;
	tmp = 0.0;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = ((z / t_0) * (x - 2.0)) + (((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * (x / t_0)) * (x - 2.0));
	else
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(N[(N[(N[(x - -216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] - -263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] - -156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] - -23533438303/500000000), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(z / t$95$0), $MachinePrecision] * N[(x - 2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + N[(N[(N[(N[(N[(104109730557/25000000000 * x), $MachinePrecision] - -393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] - -4297481763/31250000), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * N[(x / t$95$0), $MachinePrecision]), $MachinePrecision] * N[(x - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1 * N[(x * N[(N[(-1 * N[(N[(N[(-1 * N[(N[(N[(N[(-1 * N[(y / x), $MachinePrecision]), $MachinePrecision] + N[(409304707811198655637810418659684985388407301/3125000000000000000000000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2284450290879775841688574159837293/625000000000000000000000000000), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - 13764240537310136880149/125000000000000000000), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - 104109730557/25000000000), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_0 := \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}\\
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\
\;\;\;\;\frac{z}{t\_0} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{t\_0}\right) \cdot \left(x - 2\right)\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < +inf.0

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Applied rewrites62.6%

      \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]

    if +inf.0 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    3. Step-by-step derivation
      1. lower-*.f6435.7%

        \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} \]
    4. Applied rewrites35.7%

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    5. Taylor expanded in x around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
    6. Applied rewrites47.4%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 99.2% accurate, 0.4× speedup?

\[\begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\ \;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right), \left(\left(\frac{-4297481763}{31250000} - \left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x\right) \cdot x - y\right), \left(\left(x - 2\right) \cdot x\right), \left(x - 2\right), z\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  (if (<=
     (/
      (*
       (- x 2)
       (+
        (*
         (+
          (*
           (+
            (*
             (+
              (* x 104109730557/25000000000)
              393497462077/5000000000)
             x)
            4297481763/31250000)
           x)
          y)
         x)
        z))
      (+
       (*
        (+
         (*
          (+
           (* (+ x 216700011257/5000000000) x)
           263505074721/1000000000)
          x)
         156699607947/500000000)
        x)
       23533438303/500000000))
     INFINITY)
  (134-z0z1z2z3z4
   (/
    -1
    (-
     (*
      (-
       (*
        (-
         (* (- x -216700011257/5000000000) x)
         -263505074721/1000000000)
        x)
       -156699607947/500000000)
      x)
     -23533438303/500000000))
   (-
    (*
     (-
      -4297481763/31250000
      (*
       (- (* 104109730557/25000000000 x) -393497462077/5000000000)
       x))
     x)
    y)
   (* (- x 2) x)
   (- x 2)
   z)
  (*
   -1
   (*
    x
    (-
     (*
      -1
      (/
       (-
        (*
         -1
         (/
          (-
           (+
            (* -1 (/ y x))
            (*
             409304707811198655637810418659684985388407301/3125000000000000000000000000000000000000
             (/ 1 x)))
           2284450290879775841688574159837293/625000000000000000000000000000)
          x))
        13764240537310136880149/125000000000000000000)
       x))
     104109730557/25000000000)))))
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\
\;\;\;\;\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right), \left(\left(\frac{-4297481763}{31250000} - \left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x\right) \cdot x - y\right), \left(\left(x - 2\right) \cdot x\right), \left(x - 2\right), z\right)\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < +inf.0

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Applied rewrites62.5%

      \[\leadsto \color{blue}{\mathsf{134\_z0z1z2z3z4}\left(\left(\frac{-1}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right), \left(\left(\frac{-4297481763}{31250000} - \left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x\right) \cdot x - y\right), \left(\left(x - 2\right) \cdot x\right), \left(x - 2\right), z\right)} \]

    if +inf.0 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    3. Step-by-step derivation
      1. lower-*.f6435.7%

        \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} \]
    4. Applied rewrites35.7%

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    5. Taylor expanded in x around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
    6. Applied rewrites47.4%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 98.4% accurate, 0.5× speedup?

\[\begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\ \;\;\;\;\frac{2 - x}{\frac{-23533438303}{500000000} - \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x} \cdot \left(z + \left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  (if (<=
     (/
      (*
       (- x 2)
       (+
        (*
         (+
          (*
           (+
            (*
             (+
              (* x 104109730557/25000000000)
              393497462077/5000000000)
             x)
            4297481763/31250000)
           x)
          y)
         x)
        z))
      (+
       (*
        (+
         (*
          (+
           (* (+ x 216700011257/5000000000) x)
           263505074721/1000000000)
          x)
         156699607947/500000000)
        x)
       23533438303/500000000))
     INFINITY)
  (*
   (/
    (- 2 x)
    (-
     -23533438303/500000000
     (*
      (-
       (*
        (-
         (* (- x -216700011257/5000000000) x)
         -263505074721/1000000000)
        x)
       -156699607947/500000000)
      x)))
   (+
    z
    (*
     (+
      y
      (*
       (-
        (*
         (- (* 104109730557/25000000000 x) -393497462077/5000000000)
         x)
        -4297481763/31250000)
       x))
     x)))
  (*
   -1
   (*
    x
    (-
     (*
      -1
      (/
       (-
        (*
         -1
         (/
          (-
           (+
            (* -1 (/ y x))
            (*
             409304707811198655637810418659684985388407301/3125000000000000000000000000000000000000
             (/ 1 x)))
           2284450290879775841688574159837293/625000000000000000000000000000)
          x))
        13764240537310136880149/125000000000000000000)
       x))
     104109730557/25000000000)))))
double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x));
	} else {
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Double.POSITIVE_INFINITY) {
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x));
	} else {
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= math.inf:
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x))
	else:
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = Float64(Float64(Float64(2.0 - x) / Float64(-47.066876606 - Float64(Float64(Float64(Float64(Float64(Float64(x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * Float64(z + Float64(Float64(y + Float64(Float64(Float64(Float64(Float64(4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x)));
	else
		tmp = Float64(-1.0 * Float64(x * Float64(Float64(-1.0 * Float64(Float64(Float64(-1.0 * Float64(Float64(Float64(Float64(-1.0 * Float64(y / x)) + Float64(130977.50649958357 * Float64(1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228)));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x));
	else
		tmp = -1.0 * (x * ((-1.0 * (((-1.0 * ((((-1.0 * (y / x)) + (130977.50649958357 * (1.0 / x))) - 3655.1204654076414) / x)) - 110.1139242984811) / x)) - 4.16438922228));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(2 - x), $MachinePrecision] / N[(-23533438303/500000000 - N[(N[(N[(N[(N[(N[(x - -216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] - -263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] - -156699607947/500000000), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z + N[(N[(y + N[(N[(N[(N[(N[(104109730557/25000000000 * x), $MachinePrecision] - -393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] - -4297481763/31250000), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-1 * N[(x * N[(N[(-1 * N[(N[(N[(-1 * N[(N[(N[(N[(-1 * N[(y / x), $MachinePrecision]), $MachinePrecision] + N[(409304707811198655637810418659684985388407301/3125000000000000000000000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 2284450290879775841688574159837293/625000000000000000000000000000), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - 13764240537310136880149/125000000000000000000), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - 104109730557/25000000000), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\
\;\;\;\;\frac{2 - x}{\frac{-23533438303}{500000000} - \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x} \cdot \left(z + \left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot x\right)\\

\mathbf{else}:\\
\;\;\;\;-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < +inf.0

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Applied rewrites61.6%

      \[\leadsto \color{blue}{\frac{2 - x}{\frac{-23533438303}{500000000} - \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x} \cdot \left(z + \left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot x\right)} \]

    if +inf.0 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Taylor expanded in x around 0

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    3. Step-by-step derivation
      1. lower-*.f6435.7%

        \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} \]
    4. Applied rewrites35.7%

      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
    5. Taylor expanded in x around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
    6. Applied rewrites47.4%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\left(-1 \cdot \frac{y}{x} + \frac{409304707811198655637810418659684985388407301}{3125000000000000000000000000000000000000} \cdot \frac{1}{x}\right) - \frac{2284450290879775841688574159837293}{625000000000000000000000000000}}{x} - \frac{13764240537310136880149}{125000000000000000000}}{x} - \frac{104109730557}{25000000000}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 5: 98.1% accurate, 0.5× speedup?

\[\begin{array}{l} \mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\ \;\;\;\;\frac{2 - x}{\frac{-23533438303}{500000000} - \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x} \cdot \left(z + \left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  (if (<=
     (/
      (*
       (- x 2)
       (+
        (*
         (+
          (*
           (+
            (*
             (+
              (* x 104109730557/25000000000)
              393497462077/5000000000)
             x)
            4297481763/31250000)
           x)
          y)
         x)
        z))
      (+
       (*
        (+
         (*
          (+
           (* (+ x 216700011257/5000000000) x)
           263505074721/1000000000)
          x)
         156699607947/500000000)
        x)
       23533438303/500000000))
     INFINITY)
  (*
   (/
    (- 2 x)
    (-
     -23533438303/500000000
     (*
      (-
       (*
        (-
         (* (- x -216700011257/5000000000) x)
         -263505074721/1000000000)
        x)
       -156699607947/500000000)
      x)))
   (+
    z
    (*
     (+
      y
      (*
       (-
        (*
         (- (* 104109730557/25000000000 x) -393497462077/5000000000)
         x)
        -4297481763/31250000)
       x))
     x)))
  (*
   x
   (-
    104109730557/25000000000
    (* 13764240537310136880149/125000000000000000000 (/ 1 x))))))
double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= ((double) INFINITY)) {
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x));
	} else {
		tmp = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
	}
	return tmp;
}
public static double code(double x, double y, double z) {
	double tmp;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Double.POSITIVE_INFINITY) {
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x));
	} else {
		tmp = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if (((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= math.inf:
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x))
	else:
		tmp = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)))
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = Float64(Float64(Float64(2.0 - x) / Float64(-47.066876606 - Float64(Float64(Float64(Float64(Float64(Float64(x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * Float64(z + Float64(Float64(y + Float64(Float64(Float64(Float64(Float64(4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x)));
	else
		tmp = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 * Float64(1.0 / x))));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)) <= Inf)
		tmp = ((2.0 - x) / (-47.066876606 - ((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x))) * (z + ((y + (((((4.16438922228 * x) - -78.6994924154) * x) - -137.519416416) * x)) * x));
	else
		tmp = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(2 - x), $MachinePrecision] / N[(-23533438303/500000000 - N[(N[(N[(N[(N[(N[(x - -216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] - -263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] - -156699607947/500000000), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(z + N[(N[(y + N[(N[(N[(N[(N[(104109730557/25000000000 * x), $MachinePrecision] - -393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] - -4297481763/31250000), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(104109730557/25000000000 - N[(13764240537310136880149/125000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \leq \infty:\\
\;\;\;\;\frac{2 - x}{\frac{-23533438303}{500000000} - \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x} \cdot \left(z + \left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot x\right)\\

\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < +inf.0

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Applied rewrites61.6%

      \[\leadsto \color{blue}{\frac{2 - x}{\frac{-23533438303}{500000000} - \left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x} \cdot \left(z + \left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot x\right)} \]

    if +inf.0 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Taylor expanded in x around inf

      \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
      2. lower--.f64N/A

        \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}}\right) \]
      3. lower-*.f64N/A

        \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \]
      4. lower-/.f6444.8%

        \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
    4. Applied rewrites44.8%

      \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 95.3% accurate, 1.1× speedup?

\[\begin{array}{l} t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)\\ \mathbf{if}\;x \leq -2250000000000000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 37999999999999998955653073598507122688:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\frac{4297481763}{31250000} \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  (let* ((t_0
        (*
         (- x 2)
         (+
          104109730557/25000000000
          (/
           z
           (-
            (*
             (-
              (*
               (-
                (* (- x -216700011257/5000000000) x)
                -263505074721/1000000000)
               x)
              -156699607947/500000000)
             x)
            -23533438303/500000000))))))
  (if (<= x -2250000000000000000)
    t_0
    (if (<= x 37999999999999998955653073598507122688)
      (/
       (* (- x 2) (+ (* (+ (* 4297481763/31250000 x) y) x) z))
       (+
        (*
         (+
          (*
           (+
            (* (+ x 216700011257/5000000000) x)
            263505074721/1000000000)
           x)
          156699607947/500000000)
         x)
        23533438303/500000000))
      t_0))))
double code(double x, double y, double z) {
	double t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
	double tmp;
	if (x <= -2.25e+18) {
		tmp = t_0;
	} else if (x <= 3.8e+37) {
		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
	} 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(x, y, z)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = (x - 2.0d0) * (4.16438922228d0 + (z / (((((((x - (-43.3400022514d0)) * x) - (-263.505074721d0)) * x) - (-313.399215894d0)) * x) - (-47.066876606d0))))
    if (x <= (-2.25d+18)) then
        tmp = t_0
    else if (x <= 3.8d+37) then
        tmp = ((x - 2.0d0) * ((((137.519416416d0 * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
	double tmp;
	if (x <= -2.25e+18) {
		tmp = t_0;
	} else if (x <= 3.8e+37) {
		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)))
	tmp = 0
	if x <= -2.25e+18:
		tmp = t_0
	elif x <= 3.8e+37:
		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x - 2.0) * Float64(4.16438922228 + Float64(z / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606))))
	tmp = 0.0
	if (x <= -2.25e+18)
		tmp = t_0;
	elseif (x <= 3.8e+37)
		tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(137.519416416 * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
	tmp = 0.0;
	if (x <= -2.25e+18)
		tmp = t_0;
	elseif (x <= 3.8e+37)
		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - 2), $MachinePrecision] * N[(104109730557/25000000000 + N[(z / N[(N[(N[(N[(N[(N[(N[(x - -216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] - -263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] - -156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] - -23533438303/500000000), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2250000000000000000], t$95$0, If[LessEqual[x, 37999999999999998955653073598507122688], N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(4297481763/31250000 * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)\\
\mathbf{if}\;x \leq -2250000000000000000:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;x \leq 37999999999999998955653073598507122688:\\
\;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\frac{4297481763}{31250000} \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -2.25e18 or 3.7999999999999999e37 < x

    1. Initial program 58.7%

      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
    2. Applied rewrites62.6%

      \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
    3. Taylor expanded in x around inf

      \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
    4. Step-by-step derivation
      1. Applied rewrites69.0%

        \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
      2. Step-by-step derivation
        1. lift-+.f64N/A

          \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
        2. lift-*.f64N/A

          \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right)} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
        3. lift-*.f64N/A

          \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
        4. distribute-rgt-outN/A

          \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
      3. Applied rewrites69.0%

        \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)} \]

      if -2.25e18 < x < 3.7999999999999999e37

      1. Initial program 58.7%

        \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
      2. Taylor expanded in x around 0

        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{\frac{4297481763}{31250000}} \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
      3. Step-by-step derivation
        1. Applied rewrites54.2%

          \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{\frac{4297481763}{31250000}} \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
      4. Recombined 2 regimes into one program.
      5. Add Preprocessing

      Alternative 7: 93.9% accurate, 1.3× speedup?

      \[\begin{array}{l} t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)\\ \mathbf{if}\;x \leq \frac{-4835703278458517}{302231454903657293676544}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq \frac{7849862309882779}{44601490397061246283071436545296723011960832}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\frac{4297481763}{31250000} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
      (FPCore (x y z)
        :precision binary64
        (let* ((t_0
              (*
               (- x 2)
               (+
                104109730557/25000000000
                (/
                 z
                 (-
                  (*
                   (-
                    (*
                     (-
                      (* (- x -216700011257/5000000000) x)
                      -263505074721/1000000000)
                     x)
                    -156699607947/500000000)
                   x)
                  -23533438303/500000000))))))
        (if (<= x -4835703278458517/302231454903657293676544)
          t_0
          (if (<=
               x
               7849862309882779/44601490397061246283071436545296723011960832)
            (/
             (* (- x 2) (+ (* (+ (* 4297481763/31250000 x) y) x) z))
             (+ (* 156699607947/500000000 x) 23533438303/500000000))
            t_0))))
      double code(double x, double y, double z) {
      	double t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
      	double tmp;
      	if (x <= -1.6e-8) {
      		tmp = t_0;
      	} else if (x <= 1.76e-28) {
      		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
      	} 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(x, y, z)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: t_0
          real(8) :: tmp
          t_0 = (x - 2.0d0) * (4.16438922228d0 + (z / (((((((x - (-43.3400022514d0)) * x) - (-263.505074721d0)) * x) - (-313.399215894d0)) * x) - (-47.066876606d0))))
          if (x <= (-1.6d-8)) then
              tmp = t_0
          else if (x <= 1.76d-28) then
              tmp = ((x - 2.0d0) * ((((137.519416416d0 * x) + y) * x) + z)) / ((313.399215894d0 * x) + 47.066876606d0)
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
      	double tmp;
      	if (x <= -1.6e-8) {
      		tmp = t_0;
      	} else if (x <= 1.76e-28) {
      		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)))
      	tmp = 0
      	if x <= -1.6e-8:
      		tmp = t_0
      	elif x <= 1.76e-28:
      		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606)
      	else:
      		tmp = t_0
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(Float64(x - 2.0) * Float64(4.16438922228 + Float64(z / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606))))
      	tmp = 0.0
      	if (x <= -1.6e-8)
      		tmp = t_0;
      	elseif (x <= 1.76e-28)
      		tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(137.519416416 * x) + y) * x) + z)) / Float64(Float64(313.399215894 * x) + 47.066876606));
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
      	tmp = 0.0;
      	if (x <= -1.6e-8)
      		tmp = t_0;
      	elseif (x <= 1.76e-28)
      		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - 2), $MachinePrecision] * N[(104109730557/25000000000 + N[(z / N[(N[(N[(N[(N[(N[(N[(x - -216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] - -263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] - -156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] - -23533438303/500000000), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4835703278458517/302231454903657293676544], t$95$0, If[LessEqual[x, 7849862309882779/44601490397061246283071436545296723011960832], N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(4297481763/31250000 * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(156699607947/500000000 * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], t$95$0]]]
      
      \begin{array}{l}
      t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)\\
      \mathbf{if}\;x \leq \frac{-4835703278458517}{302231454903657293676544}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;x \leq \frac{7849862309882779}{44601490397061246283071436545296723011960832}:\\
      \;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\frac{4297481763}{31250000} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < -1.6000000000000001e-8 or 1.7599999999999999e-28 < x

        1. Initial program 58.7%

          \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
        2. Applied rewrites62.6%

          \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
        3. Taylor expanded in x around inf

          \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
        4. Step-by-step derivation
          1. Applied rewrites69.0%

            \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
          2. Step-by-step derivation
            1. lift-+.f64N/A

              \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right)} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
            3. lift-*.f64N/A

              \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
            4. distribute-rgt-outN/A

              \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
            5. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
          3. Applied rewrites69.0%

            \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)} \]

          if -1.6000000000000001e-8 < x < 1.7599999999999999e-28

          1. Initial program 58.7%

            \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
          2. Taylor expanded in x around 0

            \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{156699607947}{500000000}} \cdot x + \frac{23533438303}{500000000}} \]
          3. Step-by-step derivation
            1. Applied rewrites51.5%

              \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{156699607947}{500000000}} \cdot x + \frac{23533438303}{500000000}} \]
            2. Taylor expanded in x around 0

              \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{\frac{4297481763}{31250000}} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}} \]
            3. Step-by-step derivation
              1. Applied rewrites51.5%

                \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{\frac{4297481763}{31250000}} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}} \]
            4. Recombined 2 regimes into one program.
            5. Add Preprocessing

            Alternative 8: 93.8% accurate, 1.1× speedup?

            \[\begin{array}{l} t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)\\ \mathbf{if}\;x \leq \frac{-4835703278458517}{302231454903657293676544}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq \frac{7849862309882779}{44601490397061246283071436545296723011960832}:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
            (FPCore (x y z)
              :precision binary64
              (let* ((t_0
                    (*
                     (- x 2)
                     (+
                      104109730557/25000000000
                      (/
                       z
                       (-
                        (*
                         (-
                          (*
                           (-
                            (* (- x -216700011257/5000000000) x)
                            -263505074721/1000000000)
                           x)
                          -156699607947/500000000)
                         x)
                        -23533438303/500000000))))))
              (if (<= x -4835703278458517/302231454903657293676544)
                t_0
                (if (<=
                     x
                     7849862309882779/44601490397061246283071436545296723011960832)
                  (/
                   (*
                    (- x 2)
                    (+
                     (*
                      (+
                       (*
                        (+
                         (*
                          (+
                           (* x 104109730557/25000000000)
                           393497462077/5000000000)
                          x)
                         4297481763/31250000)
                        x)
                       y)
                      x)
                     z))
                   (+ (* 156699607947/500000000 x) 23533438303/500000000))
                  t_0))))
            double code(double x, double y, double z) {
            	double t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
            	double tmp;
            	if (x <= -1.6e-8) {
            		tmp = t_0;
            	} else if (x <= 1.76e-28) {
            		tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
            	} 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(x, y, z)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: t_0
                real(8) :: tmp
                t_0 = (x - 2.0d0) * (4.16438922228d0 + (z / (((((((x - (-43.3400022514d0)) * x) - (-263.505074721d0)) * x) - (-313.399215894d0)) * x) - (-47.066876606d0))))
                if (x <= (-1.6d-8)) then
                    tmp = t_0
                else if (x <= 1.76d-28) then
                    tmp = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / ((313.399215894d0 * x) + 47.066876606d0)
                else
                    tmp = t_0
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
            	double tmp;
            	if (x <= -1.6e-8) {
            		tmp = t_0;
            	} else if (x <= 1.76e-28) {
            		tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)))
            	tmp = 0
            	if x <= -1.6e-8:
            		tmp = t_0
            	elif x <= 1.76e-28:
            		tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606)
            	else:
            		tmp = t_0
            	return tmp
            
            function code(x, y, z)
            	t_0 = Float64(Float64(x - 2.0) * Float64(4.16438922228 + Float64(z / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606))))
            	tmp = 0.0
            	if (x <= -1.6e-8)
            		tmp = t_0;
            	elseif (x <= 1.76e-28)
            		tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(313.399215894 * x) + 47.066876606));
            	else
            		tmp = t_0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	t_0 = (x - 2.0) * (4.16438922228 + (z / (((((((x - -43.3400022514) * x) - -263.505074721) * x) - -313.399215894) * x) - -47.066876606)));
            	tmp = 0.0;
            	if (x <= -1.6e-8)
            		tmp = t_0;
            	elseif (x <= 1.76e-28)
            		tmp = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
            	else
            		tmp = t_0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - 2), $MachinePrecision] * N[(104109730557/25000000000 + N[(z / N[(N[(N[(N[(N[(N[(N[(x - -216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] - -263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] - -156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] - -23533438303/500000000), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4835703278458517/302231454903657293676544], t$95$0, If[LessEqual[x, 7849862309882779/44601490397061246283071436545296723011960832], N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(156699607947/500000000 * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], t$95$0]]]
            
            \begin{array}{l}
            t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)\\
            \mathbf{if}\;x \leq \frac{-4835703278458517}{302231454903657293676544}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;x \leq \frac{7849862309882779}{44601490397061246283071436545296723011960832}:\\
            \;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < -1.6000000000000001e-8 or 1.7599999999999999e-28 < x

              1. Initial program 58.7%

                \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
              2. Applied rewrites62.6%

                \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
              3. Taylor expanded in x around inf

                \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
              4. Step-by-step derivation
                1. Applied rewrites69.0%

                  \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                2. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                  2. lift-*.f64N/A

                    \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right)} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                  3. lift-*.f64N/A

                    \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                  4. distribute-rgt-outN/A

                    \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                  5. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                3. Applied rewrites69.0%

                  \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)} \]

                if -1.6000000000000001e-8 < x < 1.7599999999999999e-28

                1. Initial program 58.7%

                  \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                2. Taylor expanded in x around 0

                  \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{156699607947}{500000000}} \cdot x + \frac{23533438303}{500000000}} \]
                3. Step-by-step derivation
                  1. Applied rewrites51.5%

                    \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{156699607947}{500000000}} \cdot x + \frac{23533438303}{500000000}} \]
                4. Recombined 2 regimes into one program.
                5. Add Preprocessing

                Alternative 9: 92.6% accurate, 1.4× speedup?

                \[\begin{array}{l} t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\ \mathbf{if}\;x \leq \frac{-5584463537939415}{36028797018963968}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 170000000000000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\frac{4297481763}{31250000} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                (FPCore (x y z)
                  :precision binary64
                  (let* ((t_0
                        (*
                         x
                         (-
                          104109730557/25000000000
                          (*
                           13764240537310136880149/125000000000000000000
                           (/ 1 x))))))
                  (if (<= x -5584463537939415/36028797018963968)
                    t_0
                    (if (<= x 170000000000000)
                      (/
                       (* (- x 2) (+ (* (+ (* 4297481763/31250000 x) y) x) z))
                       (+ (* 156699607947/500000000 x) 23533438303/500000000))
                      t_0))))
                double code(double x, double y, double z) {
                	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                	double tmp;
                	if (x <= -0.155) {
                		tmp = t_0;
                	} else if (x <= 1.7e+14) {
                		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
                	} 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(x, y, z)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8) :: t_0
                    real(8) :: tmp
                    t_0 = x * (4.16438922228d0 - (110.1139242984811d0 * (1.0d0 / x)))
                    if (x <= (-0.155d0)) then
                        tmp = t_0
                    else if (x <= 1.7d+14) then
                        tmp = ((x - 2.0d0) * ((((137.519416416d0 * x) + y) * x) + z)) / ((313.399215894d0 * x) + 47.066876606d0)
                    else
                        tmp = t_0
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                	double tmp;
                	if (x <= -0.155) {
                		tmp = t_0;
                	} else if (x <= 1.7e+14) {
                		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)))
                	tmp = 0
                	if x <= -0.155:
                		tmp = t_0
                	elif x <= 1.7e+14:
                		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606)
                	else:
                		tmp = t_0
                	return tmp
                
                function code(x, y, z)
                	t_0 = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 * Float64(1.0 / x))))
                	tmp = 0.0
                	if (x <= -0.155)
                		tmp = t_0;
                	elseif (x <= 1.7e+14)
                		tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(137.519416416 * x) + y) * x) + z)) / Float64(Float64(313.399215894 * x) + 47.066876606));
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                	tmp = 0.0;
                	if (x <= -0.155)
                		tmp = t_0;
                	elseif (x <= 1.7e+14)
                		tmp = ((x - 2.0) * ((((137.519416416 * x) + y) * x) + z)) / ((313.399215894 * x) + 47.066876606);
                	else
                		tmp = t_0;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(104109730557/25000000000 - N[(13764240537310136880149/125000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5584463537939415/36028797018963968], t$95$0, If[LessEqual[x, 170000000000000], N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(4297481763/31250000 * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(156699607947/500000000 * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                
                \begin{array}{l}
                t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\
                \mathbf{if}\;x \leq \frac{-5584463537939415}{36028797018963968}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;x \leq 170000000000000:\\
                \;\;\;\;\frac{\left(x - 2\right) \cdot \left(\left(\frac{4297481763}{31250000} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}}\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < -0.155 or 1.7e14 < x

                  1. Initial program 58.7%

                    \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                  2. Taylor expanded in x around inf

                    \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                  3. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto x \cdot \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                    2. lower--.f64N/A

                      \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}}\right) \]
                    3. lower-*.f64N/A

                      \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \]
                    4. lower-/.f6444.8%

                      \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
                  4. Applied rewrites44.8%

                    \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]

                  if -0.155 < x < 1.7e14

                  1. Initial program 58.7%

                    \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                  2. Taylor expanded in x around 0

                    \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{156699607947}{500000000}} \cdot x + \frac{23533438303}{500000000}} \]
                  3. Step-by-step derivation
                    1. Applied rewrites51.5%

                      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{156699607947}{500000000}} \cdot x + \frac{23533438303}{500000000}} \]
                    2. Taylor expanded in x around 0

                      \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{\frac{4297481763}{31250000}} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}} \]
                    3. Step-by-step derivation
                      1. Applied rewrites51.5%

                        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\color{blue}{\frac{4297481763}{31250000}} \cdot x + y\right) \cdot x + z\right)}{\frac{156699607947}{500000000} \cdot x + \frac{23533438303}{500000000}} \]
                    4. Recombined 2 regimes into one program.
                    5. Add Preprocessing

                    Alternative 10: 92.2% accurate, 1.6× speedup?

                    \[\begin{array}{l} t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\ \mathbf{if}\;x \leq -4100000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 170000000000000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right) + z\right)}{\frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                    (FPCore (x y z)
                      :precision binary64
                      (let* ((t_0
                            (*
                             x
                             (-
                              104109730557/25000000000
                              (*
                               13764240537310136880149/125000000000000000000
                               (/ 1 x))))))
                      (if (<= x -4100000000)
                        t_0
                        (if (<= x 170000000000000)
                          (/
                           (* (- x 2) (+ (* x (+ y (* 4297481763/31250000 x))) z))
                           23533438303/500000000)
                          t_0))))
                    double code(double x, double y, double z) {
                    	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                    	double tmp;
                    	if (x <= -4100000000.0) {
                    		tmp = t_0;
                    	} else if (x <= 1.7e+14) {
                    		tmp = ((x - 2.0) * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606;
                    	} 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(x, y, z)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8) :: t_0
                        real(8) :: tmp
                        t_0 = x * (4.16438922228d0 - (110.1139242984811d0 * (1.0d0 / x)))
                        if (x <= (-4100000000.0d0)) then
                            tmp = t_0
                        else if (x <= 1.7d+14) then
                            tmp = ((x - 2.0d0) * ((x * (y + (137.519416416d0 * x))) + z)) / 47.066876606d0
                        else
                            tmp = t_0
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z) {
                    	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                    	double tmp;
                    	if (x <= -4100000000.0) {
                    		tmp = t_0;
                    	} else if (x <= 1.7e+14) {
                    		tmp = ((x - 2.0) * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606;
                    	} else {
                    		tmp = t_0;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z):
                    	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)))
                    	tmp = 0
                    	if x <= -4100000000.0:
                    		tmp = t_0
                    	elif x <= 1.7e+14:
                    		tmp = ((x - 2.0) * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606
                    	else:
                    		tmp = t_0
                    	return tmp
                    
                    function code(x, y, z)
                    	t_0 = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 * Float64(1.0 / x))))
                    	tmp = 0.0
                    	if (x <= -4100000000.0)
                    		tmp = t_0;
                    	elseif (x <= 1.7e+14)
                    		tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * Float64(y + Float64(137.519416416 * x))) + z)) / 47.066876606);
                    	else
                    		tmp = t_0;
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z)
                    	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                    	tmp = 0.0;
                    	if (x <= -4100000000.0)
                    		tmp = t_0;
                    	elseif (x <= 1.7e+14)
                    		tmp = ((x - 2.0) * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606;
                    	else
                    		tmp = t_0;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(104109730557/25000000000 - N[(13764240537310136880149/125000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4100000000], t$95$0, If[LessEqual[x, 170000000000000], N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(x * N[(y + N[(4297481763/31250000 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / 23533438303/500000000), $MachinePrecision], t$95$0]]]
                    
                    \begin{array}{l}
                    t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\
                    \mathbf{if}\;x \leq -4100000000:\\
                    \;\;\;\;t\_0\\
                    
                    \mathbf{elif}\;x \leq 170000000000000:\\
                    \;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right) + z\right)}{\frac{23533438303}{500000000}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;t\_0\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if x < -4.1e9 or 1.7e14 < x

                      1. Initial program 58.7%

                        \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                      2. Taylor expanded in x around inf

                        \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                      3. Step-by-step derivation
                        1. lower-*.f64N/A

                          \[\leadsto x \cdot \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                        2. lower--.f64N/A

                          \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}}\right) \]
                        3. lower-*.f64N/A

                          \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \]
                        4. lower-/.f6444.8%

                          \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
                      4. Applied rewrites44.8%

                        \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]

                      if -4.1e9 < x < 1.7e14

                      1. Initial program 58.7%

                        \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                      2. Taylor expanded in x around 0

                        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                      3. Step-by-step derivation
                        1. Applied rewrites52.3%

                          \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                        2. Taylor expanded in x around 0

                          \[\leadsto \frac{\left(x - 2\right) \cdot \left(\color{blue}{x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right)} + z\right)}{\frac{23533438303}{500000000}} \]
                        3. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto \frac{\left(x - 2\right) \cdot \left(x \cdot \color{blue}{\left(y + \frac{4297481763}{31250000} \cdot x\right)} + z\right)}{\frac{23533438303}{500000000}} \]
                          2. lower-+.f64N/A

                            \[\leadsto \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + \color{blue}{\frac{4297481763}{31250000} \cdot x}\right) + z\right)}{\frac{23533438303}{500000000}} \]
                          3. lower-*.f6452.2%

                            \[\leadsto \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot \color{blue}{x}\right) + z\right)}{\frac{23533438303}{500000000}} \]
                        4. Applied rewrites52.2%

                          \[\leadsto \frac{\left(x - 2\right) \cdot \left(\color{blue}{x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right)} + z\right)}{\frac{23533438303}{500000000}} \]
                      4. Recombined 2 regimes into one program.
                      5. Add Preprocessing

                      Alternative 11: 92.1% accurate, 1.8× speedup?

                      \[\begin{array}{l} t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\ \mathbf{if}\;x \leq -4800000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq \frac{1080863910568919}{2251799813685248}:\\ \;\;\;\;\frac{-2 \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right) + z\right)}{\frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                      (FPCore (x y z)
                        :precision binary64
                        (let* ((t_0
                              (*
                               x
                               (-
                                104109730557/25000000000
                                (*
                                 13764240537310136880149/125000000000000000000
                                 (/ 1 x))))))
                        (if (<= x -4800000000)
                          t_0
                          (if (<= x 1080863910568919/2251799813685248)
                            (/
                             (* -2 (+ (* x (+ y (* 4297481763/31250000 x))) z))
                             23533438303/500000000)
                            t_0))))
                      double code(double x, double y, double z) {
                      	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                      	double tmp;
                      	if (x <= -4800000000.0) {
                      		tmp = t_0;
                      	} else if (x <= 0.48) {
                      		tmp = (-2.0 * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606;
                      	} 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(x, y, z)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8) :: t_0
                          real(8) :: tmp
                          t_0 = x * (4.16438922228d0 - (110.1139242984811d0 * (1.0d0 / x)))
                          if (x <= (-4800000000.0d0)) then
                              tmp = t_0
                          else if (x <= 0.48d0) then
                              tmp = ((-2.0d0) * ((x * (y + (137.519416416d0 * x))) + z)) / 47.066876606d0
                          else
                              tmp = t_0
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double x, double y, double z) {
                      	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                      	double tmp;
                      	if (x <= -4800000000.0) {
                      		tmp = t_0;
                      	} else if (x <= 0.48) {
                      		tmp = (-2.0 * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606;
                      	} else {
                      		tmp = t_0;
                      	}
                      	return tmp;
                      }
                      
                      def code(x, y, z):
                      	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)))
                      	tmp = 0
                      	if x <= -4800000000.0:
                      		tmp = t_0
                      	elif x <= 0.48:
                      		tmp = (-2.0 * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606
                      	else:
                      		tmp = t_0
                      	return tmp
                      
                      function code(x, y, z)
                      	t_0 = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 * Float64(1.0 / x))))
                      	tmp = 0.0
                      	if (x <= -4800000000.0)
                      		tmp = t_0;
                      	elseif (x <= 0.48)
                      		tmp = Float64(Float64(-2.0 * Float64(Float64(x * Float64(y + Float64(137.519416416 * x))) + z)) / 47.066876606);
                      	else
                      		tmp = t_0;
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(x, y, z)
                      	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                      	tmp = 0.0;
                      	if (x <= -4800000000.0)
                      		tmp = t_0;
                      	elseif (x <= 0.48)
                      		tmp = (-2.0 * ((x * (y + (137.519416416 * x))) + z)) / 47.066876606;
                      	else
                      		tmp = t_0;
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(104109730557/25000000000 - N[(13764240537310136880149/125000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4800000000], t$95$0, If[LessEqual[x, 1080863910568919/2251799813685248], N[(N[(-2 * N[(N[(x * N[(y + N[(4297481763/31250000 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / 23533438303/500000000), $MachinePrecision], t$95$0]]]
                      
                      \begin{array}{l}
                      t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\
                      \mathbf{if}\;x \leq -4800000000:\\
                      \;\;\;\;t\_0\\
                      
                      \mathbf{elif}\;x \leq \frac{1080863910568919}{2251799813685248}:\\
                      \;\;\;\;\frac{-2 \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right) + z\right)}{\frac{23533438303}{500000000}}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if x < -4.8e9 or 0.47999999999999998 < x

                        1. Initial program 58.7%

                          \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                        2. Taylor expanded in x around inf

                          \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                        3. Step-by-step derivation
                          1. lower-*.f64N/A

                            \[\leadsto x \cdot \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                          2. lower--.f64N/A

                            \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}}\right) \]
                          3. lower-*.f64N/A

                            \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \]
                          4. lower-/.f6444.8%

                            \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
                        4. Applied rewrites44.8%

                          \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]

                        if -4.8e9 < x < 0.47999999999999998

                        1. Initial program 58.7%

                          \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                        2. Taylor expanded in x around 0

                          \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                        3. Step-by-step derivation
                          1. Applied rewrites52.3%

                            \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                          2. Taylor expanded in x around 0

                            \[\leadsto \frac{\left(x - 2\right) \cdot \left(\color{blue}{x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right)} + z\right)}{\frac{23533438303}{500000000}} \]
                          3. Step-by-step derivation
                            1. lower-*.f64N/A

                              \[\leadsto \frac{\left(x - 2\right) \cdot \left(x \cdot \color{blue}{\left(y + \frac{4297481763}{31250000} \cdot x\right)} + z\right)}{\frac{23533438303}{500000000}} \]
                            2. lower-+.f64N/A

                              \[\leadsto \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + \color{blue}{\frac{4297481763}{31250000} \cdot x}\right) + z\right)}{\frac{23533438303}{500000000}} \]
                            3. lower-*.f6452.2%

                              \[\leadsto \frac{\left(x - 2\right) \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot \color{blue}{x}\right) + z\right)}{\frac{23533438303}{500000000}} \]
                          4. Applied rewrites52.2%

                            \[\leadsto \frac{\left(x - 2\right) \cdot \left(\color{blue}{x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right)} + z\right)}{\frac{23533438303}{500000000}} \]
                          5. Taylor expanded in x around 0

                            \[\leadsto \frac{\color{blue}{-2} \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right) + z\right)}{\frac{23533438303}{500000000}} \]
                          6. Step-by-step derivation
                            1. Applied rewrites51.1%

                              \[\leadsto \frac{\color{blue}{-2} \cdot \left(x \cdot \left(y + \frac{4297481763}{31250000} \cdot x\right) + z\right)}{\frac{23533438303}{500000000}} \]
                          7. Recombined 2 regimes into one program.
                          8. Add Preprocessing

                          Alternative 12: 89.7% accurate, 2.0× speedup?

                          \[\begin{array}{l} t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\ \mathbf{if}\;x \leq -4100000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 215000000000000:\\ \;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot y + z\right)}{\frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                          (FPCore (x y z)
                            :precision binary64
                            (let* ((t_0
                                  (*
                                   x
                                   (-
                                    104109730557/25000000000
                                    (*
                                     13764240537310136880149/125000000000000000000
                                     (/ 1 x))))))
                            (if (<= x -4100000000)
                              t_0
                              (if (<= x 215000000000000)
                                (/ (* (- x 2) (+ (* x y) z)) 23533438303/500000000)
                                t_0))))
                          double code(double x, double y, double z) {
                          	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                          	double tmp;
                          	if (x <= -4100000000.0) {
                          		tmp = t_0;
                          	} else if (x <= 2.15e+14) {
                          		tmp = ((x - 2.0) * ((x * y) + z)) / 47.066876606;
                          	} 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(x, y, z)
                          use fmin_fmax_functions
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              real(8), intent (in) :: z
                              real(8) :: t_0
                              real(8) :: tmp
                              t_0 = x * (4.16438922228d0 - (110.1139242984811d0 * (1.0d0 / x)))
                              if (x <= (-4100000000.0d0)) then
                                  tmp = t_0
                              else if (x <= 2.15d+14) then
                                  tmp = ((x - 2.0d0) * ((x * y) + z)) / 47.066876606d0
                              else
                                  tmp = t_0
                              end if
                              code = tmp
                          end function
                          
                          public static double code(double x, double y, double z) {
                          	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                          	double tmp;
                          	if (x <= -4100000000.0) {
                          		tmp = t_0;
                          	} else if (x <= 2.15e+14) {
                          		tmp = ((x - 2.0) * ((x * y) + z)) / 47.066876606;
                          	} else {
                          		tmp = t_0;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z):
                          	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)))
                          	tmp = 0
                          	if x <= -4100000000.0:
                          		tmp = t_0
                          	elif x <= 2.15e+14:
                          		tmp = ((x - 2.0) * ((x * y) + z)) / 47.066876606
                          	else:
                          		tmp = t_0
                          	return tmp
                          
                          function code(x, y, z)
                          	t_0 = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 * Float64(1.0 / x))))
                          	tmp = 0.0
                          	if (x <= -4100000000.0)
                          		tmp = t_0;
                          	elseif (x <= 2.15e+14)
                          		tmp = Float64(Float64(Float64(x - 2.0) * Float64(Float64(x * y) + z)) / 47.066876606);
                          	else
                          		tmp = t_0;
                          	end
                          	return tmp
                          end
                          
                          function tmp_2 = code(x, y, z)
                          	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                          	tmp = 0.0;
                          	if (x <= -4100000000.0)
                          		tmp = t_0;
                          	elseif (x <= 2.15e+14)
                          		tmp = ((x - 2.0) * ((x * y) + z)) / 47.066876606;
                          	else
                          		tmp = t_0;
                          	end
                          	tmp_2 = tmp;
                          end
                          
                          code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(104109730557/25000000000 - N[(13764240537310136880149/125000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4100000000], t$95$0, If[LessEqual[x, 215000000000000], N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / 23533438303/500000000), $MachinePrecision], t$95$0]]]
                          
                          \begin{array}{l}
                          t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\
                          \mathbf{if}\;x \leq -4100000000:\\
                          \;\;\;\;t\_0\\
                          
                          \mathbf{elif}\;x \leq 215000000000000:\\
                          \;\;\;\;\frac{\left(x - 2\right) \cdot \left(x \cdot y + z\right)}{\frac{23533438303}{500000000}}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_0\\
                          
                          
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if x < -4.1e9 or 2.15e14 < x

                            1. Initial program 58.7%

                              \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                            2. Taylor expanded in x around inf

                              \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                            3. Step-by-step derivation
                              1. lower-*.f64N/A

                                \[\leadsto x \cdot \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                              2. lower--.f64N/A

                                \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}}\right) \]
                              3. lower-*.f64N/A

                                \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \]
                              4. lower-/.f6444.8%

                                \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
                            4. Applied rewrites44.8%

                              \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]

                            if -4.1e9 < x < 2.15e14

                            1. Initial program 58.7%

                              \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                            2. Taylor expanded in x around 0

                              \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                            3. Step-by-step derivation
                              1. Applied rewrites52.3%

                                \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                              2. Taylor expanded in x around 0

                                \[\leadsto \frac{\left(x - 2\right) \cdot \left(\color{blue}{x \cdot y} + z\right)}{\frac{23533438303}{500000000}} \]
                              3. Step-by-step derivation
                                1. lower-*.f6448.9%

                                  \[\leadsto \frac{\left(x - 2\right) \cdot \left(x \cdot \color{blue}{y} + z\right)}{\frac{23533438303}{500000000}} \]
                              4. Applied rewrites48.9%

                                \[\leadsto \frac{\left(x - 2\right) \cdot \left(\color{blue}{x \cdot y} + z\right)}{\frac{23533438303}{500000000}} \]
                            4. Recombined 2 regimes into one program.
                            5. Add Preprocessing

                            Alternative 13: 89.6% accurate, 2.1× speedup?

                            \[\begin{array}{l} t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\ \mathbf{if}\;x \leq -7800000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 29:\\ \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                            (FPCore (x y z)
                              :precision binary64
                              (let* ((t_0
                                    (*
                                     x
                                     (-
                                      104109730557/25000000000
                                      (*
                                       13764240537310136880149/125000000000000000000
                                       (/ 1 x))))))
                              (if (<= x -7800000000)
                                t_0
                                (if (<= x 29)
                                  (+
                                   (* -1000000000/23533438303 z)
                                   (* -1000000000/23533438303 (* x y)))
                                  t_0))))
                            double code(double x, double y, double z) {
                            	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                            	double tmp;
                            	if (x <= -7800000000.0) {
                            		tmp = t_0;
                            	} else if (x <= 29.0) {
                            		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y));
                            	} 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(x, y, z)
                            use fmin_fmax_functions
                                real(8), intent (in) :: x
                                real(8), intent (in) :: y
                                real(8), intent (in) :: z
                                real(8) :: t_0
                                real(8) :: tmp
                                t_0 = x * (4.16438922228d0 - (110.1139242984811d0 * (1.0d0 / x)))
                                if (x <= (-7800000000.0d0)) then
                                    tmp = t_0
                                else if (x <= 29.0d0) then
                                    tmp = ((-0.0424927283095952d0) * z) + ((-0.0424927283095952d0) * (x * y))
                                else
                                    tmp = t_0
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z) {
                            	double t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                            	double tmp;
                            	if (x <= -7800000000.0) {
                            		tmp = t_0;
                            	} else if (x <= 29.0) {
                            		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y));
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z):
                            	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)))
                            	tmp = 0
                            	if x <= -7800000000.0:
                            		tmp = t_0
                            	elif x <= 29.0:
                            		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y))
                            	else:
                            		tmp = t_0
                            	return tmp
                            
                            function code(x, y, z)
                            	t_0 = Float64(x * Float64(4.16438922228 - Float64(110.1139242984811 * Float64(1.0 / x))))
                            	tmp = 0.0
                            	if (x <= -7800000000.0)
                            		tmp = t_0;
                            	elseif (x <= 29.0)
                            		tmp = Float64(Float64(-0.0424927283095952 * z) + Float64(-0.0424927283095952 * Float64(x * y)));
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z)
                            	t_0 = x * (4.16438922228 - (110.1139242984811 * (1.0 / x)));
                            	tmp = 0.0;
                            	if (x <= -7800000000.0)
                            		tmp = t_0;
                            	elseif (x <= 29.0)
                            		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y));
                            	else
                            		tmp = t_0;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(104109730557/25000000000 - N[(13764240537310136880149/125000000000000000000 * N[(1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7800000000], t$95$0, If[LessEqual[x, 29], N[(N[(-1000000000/23533438303 * z), $MachinePrecision] + N[(-1000000000/23533438303 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                            
                            \begin{array}{l}
                            t_0 := x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)\\
                            \mathbf{if}\;x \leq -7800000000:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;x \leq 29:\\
                            \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if x < -7.8e9 or 29 < x

                              1. Initial program 58.7%

                                \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                              2. Taylor expanded in x around inf

                                \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                              3. Step-by-step derivation
                                1. lower-*.f64N/A

                                  \[\leadsto x \cdot \color{blue}{\left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]
                                2. lower--.f64N/A

                                  \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \color{blue}{\frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}}\right) \]
                                3. lower-*.f64N/A

                                  \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \color{blue}{\frac{1}{x}}\right) \]
                                4. lower-/.f6444.8%

                                  \[\leadsto x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{\color{blue}{x}}\right) \]
                              4. Applied rewrites44.8%

                                \[\leadsto \color{blue}{x \cdot \left(\frac{104109730557}{25000000000} - \frac{13764240537310136880149}{125000000000000000000} \cdot \frac{1}{x}\right)} \]

                              if -7.8e9 < x < 29

                              1. Initial program 58.7%

                                \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                              2. Applied rewrites62.6%

                                \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                              3. Taylor expanded in x around inf

                                \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                              4. Step-by-step derivation
                                1. Applied rewrites69.0%

                                  \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                2. Taylor expanded in x around 0

                                  \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                3. Step-by-step derivation
                                  1. lower-*.f6458.0%

                                    \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                4. Applied rewrites58.0%

                                  \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                5. Taylor expanded in x around 0

                                  \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \color{blue}{\frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)} \]
                                6. Step-by-step derivation
                                  1. lower-*.f64N/A

                                    \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \color{blue}{\left(x \cdot y\right)} \]
                                  2. lower-*.f6448.6%

                                    \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \left(x \cdot \color{blue}{y}\right) \]
                                7. Applied rewrites48.6%

                                  \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \color{blue}{\frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)} \]
                              5. Recombined 2 regimes into one program.
                              6. Add Preprocessing

                              Alternative 14: 81.2% accurate, 2.5× speedup?

                              \[\begin{array}{l} t_0 := \frac{-1000000000}{23533438303} \cdot z + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)\\ \mathbf{if}\;x \leq -98000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1550000000000000:\\ \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                              (FPCore (x y z)
                                :precision binary64
                                (let* ((t_0
                                      (+
                                       (* -1000000000/23533438303 z)
                                       (* 104109730557/25000000000 (- x 2)))))
                                (if (<= x -98000)
                                  t_0
                                  (if (<= x 1550000000000000)
                                    (+
                                     (* -1000000000/23533438303 z)
                                     (* -1000000000/23533438303 (* x y)))
                                    t_0))))
                              double code(double x, double y, double z) {
                              	double t_0 = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                              	double tmp;
                              	if (x <= -98000.0) {
                              		tmp = t_0;
                              	} else if (x <= 1.55e+15) {
                              		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y));
                              	} 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(x, y, z)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: x
                                  real(8), intent (in) :: y
                                  real(8), intent (in) :: z
                                  real(8) :: t_0
                                  real(8) :: tmp
                                  t_0 = ((-0.0424927283095952d0) * z) + (4.16438922228d0 * (x - 2.0d0))
                                  if (x <= (-98000.0d0)) then
                                      tmp = t_0
                                  else if (x <= 1.55d+15) then
                                      tmp = ((-0.0424927283095952d0) * z) + ((-0.0424927283095952d0) * (x * y))
                                  else
                                      tmp = t_0
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z) {
                              	double t_0 = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                              	double tmp;
                              	if (x <= -98000.0) {
                              		tmp = t_0;
                              	} else if (x <= 1.55e+15) {
                              		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y));
                              	} else {
                              		tmp = t_0;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z):
                              	t_0 = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0))
                              	tmp = 0
                              	if x <= -98000.0:
                              		tmp = t_0
                              	elif x <= 1.55e+15:
                              		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y))
                              	else:
                              		tmp = t_0
                              	return tmp
                              
                              function code(x, y, z)
                              	t_0 = Float64(Float64(-0.0424927283095952 * z) + Float64(4.16438922228 * Float64(x - 2.0)))
                              	tmp = 0.0
                              	if (x <= -98000.0)
                              		tmp = t_0;
                              	elseif (x <= 1.55e+15)
                              		tmp = Float64(Float64(-0.0424927283095952 * z) + Float64(-0.0424927283095952 * Float64(x * y)));
                              	else
                              		tmp = t_0;
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z)
                              	t_0 = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                              	tmp = 0.0;
                              	if (x <= -98000.0)
                              		tmp = t_0;
                              	elseif (x <= 1.55e+15)
                              		tmp = (-0.0424927283095952 * z) + (-0.0424927283095952 * (x * y));
                              	else
                              		tmp = t_0;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-1000000000/23533438303 * z), $MachinePrecision] + N[(104109730557/25000000000 * N[(x - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -98000], t$95$0, If[LessEqual[x, 1550000000000000], N[(N[(-1000000000/23533438303 * z), $MachinePrecision] + N[(-1000000000/23533438303 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
                              
                              \begin{array}{l}
                              t_0 := \frac{-1000000000}{23533438303} \cdot z + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)\\
                              \mathbf{if}\;x \leq -98000:\\
                              \;\;\;\;t\_0\\
                              
                              \mathbf{elif}\;x \leq 1550000000000000:\\
                              \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;t\_0\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x < -98000 or 1.55e15 < x

                                1. Initial program 58.7%

                                  \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                2. Applied rewrites62.6%

                                  \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                                3. Taylor expanded in x around inf

                                  \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                4. Step-by-step derivation
                                  1. Applied rewrites69.0%

                                    \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                  2. Taylor expanded in x around 0

                                    \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                  3. Step-by-step derivation
                                    1. lower-*.f6458.0%

                                      \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                  4. Applied rewrites58.0%

                                    \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]

                                  if -98000 < x < 1.55e15

                                  1. Initial program 58.7%

                                    \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                  2. Applied rewrites62.6%

                                    \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                                  3. Taylor expanded in x around inf

                                    \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites69.0%

                                      \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                    2. Taylor expanded in x around 0

                                      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                    3. Step-by-step derivation
                                      1. lower-*.f6458.0%

                                        \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                    4. Applied rewrites58.0%

                                      \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                    5. Taylor expanded in x around 0

                                      \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \color{blue}{\frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)} \]
                                    6. Step-by-step derivation
                                      1. lower-*.f64N/A

                                        \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \color{blue}{\left(x \cdot y\right)} \]
                                      2. lower-*.f6448.6%

                                        \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \frac{-1000000000}{23533438303} \cdot \left(x \cdot \color{blue}{y}\right) \]
                                    7. Applied rewrites48.6%

                                      \[\leadsto \frac{-1000000000}{23533438303} \cdot z + \color{blue}{\frac{-1000000000}{23533438303} \cdot \left(x \cdot y\right)} \]
                                  5. Recombined 2 regimes into one program.
                                  6. Add Preprocessing

                                  Alternative 15: 68.3% accurate, 0.4× speedup?

                                  \[\begin{array}{l} t_0 := \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\ \mathbf{if}\;t\_0 \leq -20000000000:\\ \;\;\;\;\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot z\right)\\ \mathbf{elif}\;t\_0 \leq 50000000000000000:\\ \;\;\;\;\frac{-2 \cdot z}{\frac{23533438303}{500000000}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)\\ \end{array} \]
                                  (FPCore (x y z)
                                    :precision binary64
                                    (let* ((t_0
                                          (/
                                           (*
                                            (- x 2)
                                            (+
                                             (*
                                              (+
                                               (*
                                                (+
                                                 (*
                                                  (+
                                                   (* x 104109730557/25000000000)
                                                   393497462077/5000000000)
                                                  x)
                                                 4297481763/31250000)
                                                x)
                                               y)
                                              x)
                                             z))
                                           (+
                                            (*
                                             (+
                                              (*
                                               (+
                                                (* (+ x 216700011257/5000000000) x)
                                                263505074721/1000000000)
                                               x)
                                              156699607947/500000000)
                                             x)
                                            23533438303/500000000))))
                                    (if (<= t_0 -20000000000)
                                      (*
                                       (- x 2)
                                       (+ 104109730557/25000000000 (* 500000000/23533438303 z)))
                                      (if (<= t_0 50000000000000000)
                                        (/ (* -2 z) 23533438303/500000000)
                                        (+
                                         (* -1000000000/23533438303 z)
                                         (* 104109730557/25000000000 (- x 2)))))))
                                  double code(double x, double y, double z) {
                                  	double t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                  	double tmp;
                                  	if (t_0 <= -20000000000.0) {
                                  		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                  	} else if (t_0 <= 5e+16) {
                                  		tmp = (-2.0 * z) / 47.066876606;
                                  	} else {
                                  		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(x, y, z)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8) :: t_0
                                      real(8) :: tmp
                                      t_0 = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
                                      if (t_0 <= (-20000000000.0d0)) then
                                          tmp = (x - 2.0d0) * (4.16438922228d0 + (0.0212463641547976d0 * z))
                                      else if (t_0 <= 5d+16) then
                                          tmp = ((-2.0d0) * z) / 47.066876606d0
                                      else
                                          tmp = ((-0.0424927283095952d0) * z) + (4.16438922228d0 * (x - 2.0d0))
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z) {
                                  	double t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                  	double tmp;
                                  	if (t_0 <= -20000000000.0) {
                                  		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                  	} else if (t_0 <= 5e+16) {
                                  		tmp = (-2.0 * z) / 47.066876606;
                                  	} else {
                                  		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z):
                                  	t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
                                  	tmp = 0
                                  	if t_0 <= -20000000000.0:
                                  		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z))
                                  	elif t_0 <= 5e+16:
                                  		tmp = (-2.0 * z) / 47.066876606
                                  	else:
                                  		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0))
                                  	return tmp
                                  
                                  function code(x, y, z)
                                  	t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606))
                                  	tmp = 0.0
                                  	if (t_0 <= -20000000000.0)
                                  		tmp = Float64(Float64(x - 2.0) * Float64(4.16438922228 + Float64(0.0212463641547976 * z)));
                                  	elseif (t_0 <= 5e+16)
                                  		tmp = Float64(Float64(-2.0 * z) / 47.066876606);
                                  	else
                                  		tmp = Float64(Float64(-0.0424927283095952 * z) + Float64(4.16438922228 * Float64(x - 2.0)));
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z)
                                  	t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                  	tmp = 0.0;
                                  	if (t_0 <= -20000000000.0)
                                  		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                  	elseif (t_0 <= 5e+16)
                                  		tmp = (-2.0 * z) / 47.066876606;
                                  	else
                                  		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -20000000000], N[(N[(x - 2), $MachinePrecision] * N[(104109730557/25000000000 + N[(500000000/23533438303 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 50000000000000000], N[(N[(-2 * z), $MachinePrecision] / 23533438303/500000000), $MachinePrecision], N[(N[(-1000000000/23533438303 * z), $MachinePrecision] + N[(104109730557/25000000000 * N[(x - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                  
                                  \begin{array}{l}
                                  t_0 := \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\
                                  \mathbf{if}\;t\_0 \leq -20000000000:\\
                                  \;\;\;\;\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot z\right)\\
                                  
                                  \mathbf{elif}\;t\_0 \leq 50000000000000000:\\
                                  \;\;\;\;\frac{-2 \cdot z}{\frac{23533438303}{500000000}}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < -2e10

                                    1. Initial program 58.7%

                                      \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                    2. Applied rewrites62.6%

                                      \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                                    3. Taylor expanded in x around inf

                                      \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites69.0%

                                        \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                      2. Step-by-step derivation
                                        1. lift-+.f64N/A

                                          \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                                        2. lift-*.f64N/A

                                          \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right)} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                        3. lift-*.f64N/A

                                          \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                                        4. distribute-rgt-outN/A

                                          \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                                        5. lower-*.f64N/A

                                          \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                                      3. Applied rewrites69.0%

                                        \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)} \]
                                      4. Taylor expanded in x around 0

                                        \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \color{blue}{\frac{500000000}{23533438303} \cdot z}\right) \]
                                      5. Step-by-step derivation
                                        1. lower-*.f6446.5%

                                          \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot \color{blue}{z}\right) \]
                                      6. Applied rewrites46.5%

                                        \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \color{blue}{\frac{500000000}{23533438303} \cdot z}\right) \]

                                      if -2e10 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 5e16

                                      1. Initial program 58.7%

                                        \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                      2. Taylor expanded in x around 0

                                        \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites52.3%

                                          \[\leadsto \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\color{blue}{\frac{23533438303}{500000000}}} \]
                                        2. Taylor expanded in x around 0

                                          \[\leadsto \frac{\color{blue}{-2 \cdot z}}{\frac{23533438303}{500000000}} \]
                                        3. Step-by-step derivation
                                          1. lower-*.f6435.7%

                                            \[\leadsto \frac{-2 \cdot \color{blue}{z}}{\frac{23533438303}{500000000}} \]
                                        4. Applied rewrites35.7%

                                          \[\leadsto \frac{\color{blue}{-2 \cdot z}}{\frac{23533438303}{500000000}} \]

                                        if 5e16 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

                                        1. Initial program 58.7%

                                          \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                        2. Applied rewrites62.6%

                                          \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                                        3. Taylor expanded in x around inf

                                          \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites69.0%

                                            \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                          2. Taylor expanded in x around 0

                                            \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                          3. Step-by-step derivation
                                            1. lower-*.f6458.0%

                                              \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                          4. Applied rewrites58.0%

                                            \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                        5. Recombined 3 regimes into one program.
                                        6. Add Preprocessing

                                        Alternative 16: 68.2% accurate, 0.4× speedup?

                                        \[\begin{array}{l} t_0 := \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\ \mathbf{if}\;t\_0 \leq -20000000000:\\ \;\;\;\;\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot z\right)\\ \mathbf{elif}\;t\_0 \leq 50000000000000000:\\ \;\;\;\;\frac{-1000000000}{23533438303} \cdot z\\ \mathbf{else}:\\ \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)\\ \end{array} \]
                                        (FPCore (x y z)
                                          :precision binary64
                                          (let* ((t_0
                                                (/
                                                 (*
                                                  (- x 2)
                                                  (+
                                                   (*
                                                    (+
                                                     (*
                                                      (+
                                                       (*
                                                        (+
                                                         (* x 104109730557/25000000000)
                                                         393497462077/5000000000)
                                                        x)
                                                       4297481763/31250000)
                                                      x)
                                                     y)
                                                    x)
                                                   z))
                                                 (+
                                                  (*
                                                   (+
                                                    (*
                                                     (+
                                                      (* (+ x 216700011257/5000000000) x)
                                                      263505074721/1000000000)
                                                     x)
                                                    156699607947/500000000)
                                                   x)
                                                  23533438303/500000000))))
                                          (if (<= t_0 -20000000000)
                                            (*
                                             (- x 2)
                                             (+ 104109730557/25000000000 (* 500000000/23533438303 z)))
                                            (if (<= t_0 50000000000000000)
                                              (* -1000000000/23533438303 z)
                                              (+
                                               (* -1000000000/23533438303 z)
                                               (* 104109730557/25000000000 (- x 2)))))))
                                        double code(double x, double y, double z) {
                                        	double t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                        	double tmp;
                                        	if (t_0 <= -20000000000.0) {
                                        		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                        	} else if (t_0 <= 5e+16) {
                                        		tmp = -0.0424927283095952 * z;
                                        	} else {
                                        		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        module fmin_fmax_functions
                                            implicit none
                                            private
                                            public fmax
                                            public fmin
                                        
                                            interface fmax
                                                module procedure fmax88
                                                module procedure fmax44
                                                module procedure fmax84
                                                module procedure fmax48
                                            end interface
                                            interface fmin
                                                module procedure fmin88
                                                module procedure fmin44
                                                module procedure fmin84
                                                module procedure fmin48
                                            end interface
                                        contains
                                            real(8) function fmax88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmax44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmax84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmax48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmin44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmin48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                            end function
                                        end module
                                        
                                        real(8) function code(x, y, z)
                                        use fmin_fmax_functions
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            real(8), intent (in) :: z
                                            real(8) :: t_0
                                            real(8) :: tmp
                                            t_0 = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
                                            if (t_0 <= (-20000000000.0d0)) then
                                                tmp = (x - 2.0d0) * (4.16438922228d0 + (0.0212463641547976d0 * z))
                                            else if (t_0 <= 5d+16) then
                                                tmp = (-0.0424927283095952d0) * z
                                            else
                                                tmp = ((-0.0424927283095952d0) * z) + (4.16438922228d0 * (x - 2.0d0))
                                            end if
                                            code = tmp
                                        end function
                                        
                                        public static double code(double x, double y, double z) {
                                        	double t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                        	double tmp;
                                        	if (t_0 <= -20000000000.0) {
                                        		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                        	} else if (t_0 <= 5e+16) {
                                        		tmp = -0.0424927283095952 * z;
                                        	} else {
                                        		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        def code(x, y, z):
                                        	t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
                                        	tmp = 0
                                        	if t_0 <= -20000000000.0:
                                        		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z))
                                        	elif t_0 <= 5e+16:
                                        		tmp = -0.0424927283095952 * z
                                        	else:
                                        		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0))
                                        	return tmp
                                        
                                        function code(x, y, z)
                                        	t_0 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606))
                                        	tmp = 0.0
                                        	if (t_0 <= -20000000000.0)
                                        		tmp = Float64(Float64(x - 2.0) * Float64(4.16438922228 + Float64(0.0212463641547976 * z)));
                                        	elseif (t_0 <= 5e+16)
                                        		tmp = Float64(-0.0424927283095952 * z);
                                        	else
                                        		tmp = Float64(Float64(-0.0424927283095952 * z) + Float64(4.16438922228 * Float64(x - 2.0)));
                                        	end
                                        	return tmp
                                        end
                                        
                                        function tmp_2 = code(x, y, z)
                                        	t_0 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                        	tmp = 0.0;
                                        	if (t_0 <= -20000000000.0)
                                        		tmp = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                        	elseif (t_0 <= 5e+16)
                                        		tmp = -0.0424927283095952 * z;
                                        	else
                                        		tmp = (-0.0424927283095952 * z) + (4.16438922228 * (x - 2.0));
                                        	end
                                        	tmp_2 = tmp;
                                        end
                                        
                                        code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -20000000000], N[(N[(x - 2), $MachinePrecision] * N[(104109730557/25000000000 + N[(500000000/23533438303 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 50000000000000000], N[(-1000000000/23533438303 * z), $MachinePrecision], N[(N[(-1000000000/23533438303 * z), $MachinePrecision] + N[(104109730557/25000000000 * N[(x - 2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                        
                                        \begin{array}{l}
                                        t_0 := \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\
                                        \mathbf{if}\;t\_0 \leq -20000000000:\\
                                        \;\;\;\;\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot z\right)\\
                                        
                                        \mathbf{elif}\;t\_0 \leq 50000000000000000:\\
                                        \;\;\;\;\frac{-1000000000}{23533438303} \cdot z\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{-1000000000}{23533438303} \cdot z + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)\\
                                        
                                        
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < -2e10

                                          1. Initial program 58.7%

                                            \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                          2. Applied rewrites62.6%

                                            \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                                          3. Taylor expanded in x around inf

                                            \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                          4. Step-by-step derivation
                                            1. Applied rewrites69.0%

                                              \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                            2. Step-by-step derivation
                                              1. lift-+.f64N/A

                                                \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                                              2. lift-*.f64N/A

                                                \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right)} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                              3. lift-*.f64N/A

                                                \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                                              4. distribute-rgt-outN/A

                                                \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                                              5. lower-*.f64N/A

                                                \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                                            3. Applied rewrites69.0%

                                              \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)} \]
                                            4. Taylor expanded in x around 0

                                              \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \color{blue}{\frac{500000000}{23533438303} \cdot z}\right) \]
                                            5. Step-by-step derivation
                                              1. lower-*.f6446.5%

                                                \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot \color{blue}{z}\right) \]
                                            6. Applied rewrites46.5%

                                              \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \color{blue}{\frac{500000000}{23533438303} \cdot z}\right) \]

                                            if -2e10 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 5e16

                                            1. Initial program 58.7%

                                              \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                            2. Taylor expanded in x around 0

                                              \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                                            3. Step-by-step derivation
                                              1. lower-*.f6435.7%

                                                \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} \]
                                            4. Applied rewrites35.7%

                                              \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]

                                            if 5e16 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

                                            1. Initial program 58.7%

                                              \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                            2. Applied rewrites62.6%

                                              \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                                            3. Taylor expanded in x around inf

                                              \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                            4. Step-by-step derivation
                                              1. Applied rewrites69.0%

                                                \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                              2. Taylor expanded in x around 0

                                                \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                              3. Step-by-step derivation
                                                1. lower-*.f6458.0%

                                                  \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                              4. Applied rewrites58.0%

                                                \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                            5. Recombined 3 regimes into one program.
                                            6. Add Preprocessing

                                            Alternative 17: 57.0% accurate, 0.4× speedup?

                                            \[\begin{array}{l} t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot z\right)\\ t_1 := \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\ \mathbf{if}\;t\_1 \leq -20000000000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;t\_1 \leq 50000000000000000:\\ \;\;\;\;\frac{-1000000000}{23533438303} \cdot z\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                            (FPCore (x y z)
                                              :precision binary64
                                              (let* ((t_0
                                                    (*
                                                     (- x 2)
                                                     (+ 104109730557/25000000000 (* 500000000/23533438303 z))))
                                                   (t_1
                                                    (/
                                                     (*
                                                      (- x 2)
                                                      (+
                                                       (*
                                                        (+
                                                         (*
                                                          (+
                                                           (*
                                                            (+
                                                             (* x 104109730557/25000000000)
                                                             393497462077/5000000000)
                                                            x)
                                                           4297481763/31250000)
                                                          x)
                                                         y)
                                                        x)
                                                       z))
                                                     (+
                                                      (*
                                                       (+
                                                        (*
                                                         (+
                                                          (* (+ x 216700011257/5000000000) x)
                                                          263505074721/1000000000)
                                                         x)
                                                        156699607947/500000000)
                                                       x)
                                                      23533438303/500000000))))
                                              (if (<= t_1 -20000000000)
                                                t_0
                                                (if (<= t_1 50000000000000000)
                                                  (* -1000000000/23533438303 z)
                                                  t_0))))
                                            double code(double x, double y, double z) {
                                            	double t_0 = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                            	double t_1 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                            	double tmp;
                                            	if (t_1 <= -20000000000.0) {
                                            		tmp = t_0;
                                            	} else if (t_1 <= 5e+16) {
                                            		tmp = -0.0424927283095952 * z;
                                            	} 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(x, y, z)
                                            use fmin_fmax_functions
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                real(8), intent (in) :: z
                                                real(8) :: t_0
                                                real(8) :: t_1
                                                real(8) :: tmp
                                                t_0 = (x - 2.0d0) * (4.16438922228d0 + (0.0212463641547976d0 * z))
                                                t_1 = ((x - 2.0d0) * ((((((((x * 4.16438922228d0) + 78.6994924154d0) * x) + 137.519416416d0) * x) + y) * x) + z)) / (((((((x + 43.3400022514d0) * x) + 263.505074721d0) * x) + 313.399215894d0) * x) + 47.066876606d0)
                                                if (t_1 <= (-20000000000.0d0)) then
                                                    tmp = t_0
                                                else if (t_1 <= 5d+16) then
                                                    tmp = (-0.0424927283095952d0) * z
                                                else
                                                    tmp = t_0
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z) {
                                            	double t_0 = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                            	double t_1 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                            	double tmp;
                                            	if (t_1 <= -20000000000.0) {
                                            		tmp = t_0;
                                            	} else if (t_1 <= 5e+16) {
                                            		tmp = -0.0424927283095952 * z;
                                            	} else {
                                            		tmp = t_0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z):
                                            	t_0 = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z))
                                            	t_1 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606)
                                            	tmp = 0
                                            	if t_1 <= -20000000000.0:
                                            		tmp = t_0
                                            	elif t_1 <= 5e+16:
                                            		tmp = -0.0424927283095952 * z
                                            	else:
                                            		tmp = t_0
                                            	return tmp
                                            
                                            function code(x, y, z)
                                            	t_0 = Float64(Float64(x - 2.0) * Float64(4.16438922228 + Float64(0.0212463641547976 * z)))
                                            	t_1 = Float64(Float64(Float64(x - 2.0) * Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / Float64(Float64(Float64(Float64(Float64(Float64(Float64(x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606))
                                            	tmp = 0.0
                                            	if (t_1 <= -20000000000.0)
                                            		tmp = t_0;
                                            	elseif (t_1 <= 5e+16)
                                            		tmp = Float64(-0.0424927283095952 * z);
                                            	else
                                            		tmp = t_0;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z)
                                            	t_0 = (x - 2.0) * (4.16438922228 + (0.0212463641547976 * z));
                                            	t_1 = ((x - 2.0) * ((((((((x * 4.16438922228) + 78.6994924154) * x) + 137.519416416) * x) + y) * x) + z)) / (((((((x + 43.3400022514) * x) + 263.505074721) * x) + 313.399215894) * x) + 47.066876606);
                                            	tmp = 0.0;
                                            	if (t_1 <= -20000000000.0)
                                            		tmp = t_0;
                                            	elseif (t_1 <= 5e+16)
                                            		tmp = -0.0424927283095952 * z;
                                            	else
                                            		tmp = t_0;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x - 2), $MachinePrecision] * N[(104109730557/25000000000 + N[(500000000/23533438303 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(N[(x - 2), $MachinePrecision] * N[(N[(N[(N[(N[(N[(N[(N[(x * 104109730557/25000000000), $MachinePrecision] + 393497462077/5000000000), $MachinePrecision] * x), $MachinePrecision] + 4297481763/31250000), $MachinePrecision] * x), $MachinePrecision] + y), $MachinePrecision] * x), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[(N[(N[(x + 216700011257/5000000000), $MachinePrecision] * x), $MachinePrecision] + 263505074721/1000000000), $MachinePrecision] * x), $MachinePrecision] + 156699607947/500000000), $MachinePrecision] * x), $MachinePrecision] + 23533438303/500000000), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -20000000000], t$95$0, If[LessEqual[t$95$1, 50000000000000000], N[(-1000000000/23533438303 * z), $MachinePrecision], t$95$0]]]]
                                            
                                            \begin{array}{l}
                                            t_0 := \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot z\right)\\
                                            t_1 := \frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}}\\
                                            \mathbf{if}\;t\_1 \leq -20000000000:\\
                                            \;\;\;\;t\_0\\
                                            
                                            \mathbf{elif}\;t\_1 \leq 50000000000000000:\\
                                            \;\;\;\;\frac{-1000000000}{23533438303} \cdot z\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_0\\
                                            
                                            
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < -2e10 or 5e16 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64)))

                                              1. Initial program 58.7%

                                                \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                              2. Applied rewrites62.6%

                                                \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \left(\left(y + \left(\left(\frac{104109730557}{25000000000} \cdot x - \frac{-393497462077}{5000000000}\right) \cdot x - \frac{-4297481763}{31250000}\right) \cdot x\right) \cdot \frac{x}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right) \cdot \left(x - 2\right)} \]
                                              3. Taylor expanded in x around inf

                                                \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites69.0%

                                                  \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000}} \cdot \left(x - 2\right) \]
                                                2. Step-by-step derivation
                                                  1. lift-+.f64N/A

                                                    \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                                                  2. lift-*.f64N/A

                                                    \[\leadsto \color{blue}{\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right)} + \frac{104109730557}{25000000000} \cdot \left(x - 2\right) \]
                                                  3. lift-*.f64N/A

                                                    \[\leadsto \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} \cdot \left(x - 2\right) + \color{blue}{\frac{104109730557}{25000000000} \cdot \left(x - 2\right)} \]
                                                  4. distribute-rgt-outN/A

                                                    \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                                                  5. lower-*.f64N/A

                                                    \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}} + \frac{104109730557}{25000000000}\right)} \]
                                                3. Applied rewrites69.0%

                                                  \[\leadsto \color{blue}{\left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{z}{\left(\left(\left(x - \frac{-216700011257}{5000000000}\right) \cdot x - \frac{-263505074721}{1000000000}\right) \cdot x - \frac{-156699607947}{500000000}\right) \cdot x - \frac{-23533438303}{500000000}}\right)} \]
                                                4. Taylor expanded in x around 0

                                                  \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \color{blue}{\frac{500000000}{23533438303} \cdot z}\right) \]
                                                5. Step-by-step derivation
                                                  1. lower-*.f6446.5%

                                                    \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \frac{500000000}{23533438303} \cdot \color{blue}{z}\right) \]
                                                6. Applied rewrites46.5%

                                                  \[\leadsto \left(x - 2\right) \cdot \left(\frac{104109730557}{25000000000} + \color{blue}{\frac{500000000}{23533438303} \cdot z}\right) \]

                                                if -2e10 < (/.f64 (*.f64 (-.f64 x #s(literal 2 binary64)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 x #s(literal 104109730557/25000000000 binary64)) #s(literal 393497462077/5000000000 binary64)) x) #s(literal 4297481763/31250000 binary64)) x) y) x) z)) (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 (*.f64 (+.f64 x #s(literal 216700011257/5000000000 binary64)) x) #s(literal 263505074721/1000000000 binary64)) x) #s(literal 156699607947/500000000 binary64)) x) #s(literal 23533438303/500000000 binary64))) < 5e16

                                                1. Initial program 58.7%

                                                  \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                                2. Taylor expanded in x around 0

                                                  \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                                                3. Step-by-step derivation
                                                  1. lower-*.f6435.7%

                                                    \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} \]
                                                4. Applied rewrites35.7%

                                                  \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                                              5. Recombined 2 regimes into one program.
                                              6. Add Preprocessing

                                              Alternative 18: 35.7% accurate, 13.2× speedup?

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

                                                \[\frac{\left(x - 2\right) \cdot \left(\left(\left(\left(x \cdot \frac{104109730557}{25000000000} + \frac{393497462077}{5000000000}\right) \cdot x + \frac{4297481763}{31250000}\right) \cdot x + y\right) \cdot x + z\right)}{\left(\left(\left(x + \frac{216700011257}{5000000000}\right) \cdot x + \frac{263505074721}{1000000000}\right) \cdot x + \frac{156699607947}{500000000}\right) \cdot x + \frac{23533438303}{500000000}} \]
                                              2. Taylor expanded in x around 0

                                                \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                                              3. Step-by-step derivation
                                                1. lower-*.f6435.7%

                                                  \[\leadsto \frac{-1000000000}{23533438303} \cdot \color{blue}{z} \]
                                              4. Applied rewrites35.7%

                                                \[\leadsto \color{blue}{\frac{-1000000000}{23533438303} \cdot z} \]
                                              5. Add Preprocessing

                                              Reproduce

                                              ?
                                              herbie shell --seed 2025271 -o generate:evaluate
                                              (FPCore (x y z)
                                                :name "Numeric.SpecFunctions:logGamma from math-functions-0.1.5.2, C"
                                                :precision binary64
                                                (/ (* (- x 2) (+ (* (+ (* (+ (* (+ (* x 104109730557/25000000000) 393497462077/5000000000) x) 4297481763/31250000) x) y) x) z)) (+ (* (+ (* (+ (* (+ x 216700011257/5000000000) x) 263505074721/1000000000) x) 156699607947/500000000) x) 23533438303/500000000)))