Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D

Percentage Accurate: 99.5% → 99.8%
Time: 2.8s
Alternatives: 15
Speedup: 1.4×

Specification

?
\[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
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 + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z):
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z)
	return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z)))
end
function tmp = code(x, y, z)
	tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z: real): real =
	x + (((y - x) * (6)) * (((2) / (3)) - z))
END code
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)

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

\[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))
double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
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 + (((y - x) * 6.0d0) * ((2.0d0 / 3.0d0) - z))
end function
public static double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
}
def code(x, y, z):
	return x + (((y - x) * 6.0) * ((2.0 / 3.0) - z))
function code(x, y, z)
	return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * Float64(Float64(2.0 / 3.0) - z)))
end
function tmp = code(x, y, z)
	tmp = x + (((y - x) * 6.0) * ((2.0 / 3.0) - z));
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
f(x, y, z):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z: real): real =
	x + (((y - x) * (6)) * (((2) / (3)) - z))
END code
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\mathsf{fma}\left(-6, z \cdot \left(y - x\right), \mathsf{fma}\left(-4, x - y, x\right)\right) \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (fma -6.0 (* z (- y x)) (fma -4.0 (- x y) x)))
double code(double x, double y, double z) {
	return fma(-6.0, (z * (y - x)), fma(-4.0, (x - y), x));
}
function code(x, y, z)
	return fma(-6.0, Float64(z * Float64(y - x)), fma(-4.0, Float64(x - y), x))
end
code[x_, y_, z_] := N[(-6.0 * N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x - y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
f(x, y, z):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z: real): real =
	((-6) * (z * (y - x))) + (((-4) * (x - y)) + x)
END code
\mathsf{fma}\left(-6, z \cdot \left(y - x\right), \mathsf{fma}\left(-4, x - y, x\right)\right)
Derivation
  1. Initial program 99.5%

    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
  2. Step-by-step derivation
    1. Applied rewrites99.8%

      \[\leadsto \mathsf{fma}\left(-6, z \cdot \left(y - x\right), \mathsf{fma}\left(-4, x - y, x\right)\right) \]
    2. Add Preprocessing

    Alternative 2: 99.8% accurate, 1.4× speedup?

    \[\mathsf{fma}\left(x - y, \mathsf{fma}\left(z, 6, -4\right), x\right) \]
    (FPCore (x y z)
      :precision binary64
      :pre TRUE
      (fma (- x y) (fma z 6.0 -4.0) x))
    double code(double x, double y, double z) {
    	return fma((x - y), fma(z, 6.0, -4.0), x);
    }
    
    function code(x, y, z)
    	return fma(Float64(x - y), fma(z, 6.0, -4.0), x)
    end
    
    code[x_, y_, z_] := N[(N[(x - y), $MachinePrecision] * N[(z * 6.0 + -4.0), $MachinePrecision] + x), $MachinePrecision]
    
    f(x, y, z):
    	x in [-inf, +inf],
    	y in [-inf, +inf],
    	z in [-inf, +inf]
    code: THEORY
    BEGIN
    f(x, y, z: real): real =
    	((x - y) * ((z * (6)) + (-4))) + x
    END code
    \mathsf{fma}\left(x - y, \mathsf{fma}\left(z, 6, -4\right), x\right)
    
    Derivation
    1. Initial program 99.5%

      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
    2. Step-by-step derivation
      1. Applied rewrites99.8%

        \[\leadsto \mathsf{fma}\left(x - y, \mathsf{fma}\left(z, 6, -4\right), x\right) \]
      2. Add Preprocessing

      Alternative 3: 97.8% accurate, 0.6× speedup?

      \[\begin{array}{l} t_0 := \frac{2}{3} - z\\ \mathbf{if}\;t\_0 \leq -1000:\\ \;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\ \mathbf{elif}\;t\_0 \leq 1:\\ \;\;\;\;\mathsf{fma}\left(4, y, x\right) - 4 \cdot x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right)\\ \end{array} \]
      (FPCore (x y z)
        :precision binary64
        :pre TRUE
        (let* ((t_0 (- (/ 2.0 3.0) z)))
        (if (<= t_0 -1000.0)
          (* z (* (- x y) 6.0))
          (if (<= t_0 1.0)
            (- (fma 4.0 y x) (* 4.0 x))
            (* z (fma -6.0 y (* 6.0 x)))))))
      double code(double x, double y, double z) {
      	double t_0 = (2.0 / 3.0) - z;
      	double tmp;
      	if (t_0 <= -1000.0) {
      		tmp = z * ((x - y) * 6.0);
      	} else if (t_0 <= 1.0) {
      		tmp = fma(4.0, y, x) - (4.0 * x);
      	} else {
      		tmp = z * fma(-6.0, y, (6.0 * x));
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	t_0 = Float64(Float64(2.0 / 3.0) - z)
      	tmp = 0.0
      	if (t_0 <= -1000.0)
      		tmp = Float64(z * Float64(Float64(x - y) * 6.0));
      	elseif (t_0 <= 1.0)
      		tmp = Float64(fma(4.0, y, x) - Float64(4.0 * x));
      	else
      		tmp = Float64(z * fma(-6.0, y, Float64(6.0 * x)));
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], N[(z * N[(N[(x - y), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(N[(4.0 * y + x), $MachinePrecision] - N[(4.0 * x), $MachinePrecision]), $MachinePrecision], N[(z * N[(-6.0 * y + N[(6.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
      
      f(x, y, z):
      	x in [-inf, +inf],
      	y in [-inf, +inf],
      	z in [-inf, +inf]
      code: THEORY
      BEGIN
      f(x, y, z: real): real =
      	LET t_0 = (((2) / (3)) - z) IN
      		LET tmp_1 = IF (t_0 <= (1)) THEN ((((4) * y) + x) - ((4) * x)) ELSE (z * (((-6) * y) + ((6) * x))) ENDIF IN
      		LET tmp = IF (t_0 <= (-1000)) THEN (z * ((x - y) * (6))) ELSE tmp_1 ENDIF IN
      	tmp
      END code
      \begin{array}{l}
      t_0 := \frac{2}{3} - z\\
      \mathbf{if}\;t\_0 \leq -1000:\\
      \;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\
      
      \mathbf{elif}\;t\_0 \leq 1:\\
      \;\;\;\;\mathsf{fma}\left(4, y, x\right) - 4 \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3

        1. Initial program 99.5%

          \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
        2. Applied rewrites98.7%

          \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
        3. Taylor expanded in z around inf

          \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
        4. Step-by-step derivation
          1. Applied rewrites50.7%

            \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
          2. Step-by-step derivation
            1. Applied rewrites50.7%

              \[\leadsto z \cdot \left(\left(x - y\right) \cdot 6\right) \]

            if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1

            1. Initial program 99.5%

              \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
            2. Applied rewrites98.7%

              \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
            3. Taylor expanded in z around 0

              \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
            4. Step-by-step derivation
              1. Applied rewrites50.9%

                \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
              2. Step-by-step derivation
                1. Applied rewrites50.9%

                  \[\leadsto \mathsf{fma}\left(4, y, x\right) - 4 \cdot x \]

                if 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z)

                1. Initial program 99.5%

                  \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                2. Applied rewrites98.7%

                  \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                3. Taylor expanded in z around inf

                  \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                4. Step-by-step derivation
                  1. Applied rewrites50.7%

                    \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                5. Recombined 3 regimes into one program.
                6. Add Preprocessing

                Alternative 4: 97.8% accurate, 0.6× speedup?

                \[\begin{array}{l} t_0 := \frac{2}{3} - z\\ \mathbf{if}\;t\_0 \leq -1000:\\ \;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\ \mathbf{elif}\;t\_0 \leq 1:\\ \;\;\;\;\mathsf{fma}\left(4, y, x\right) - 4 \cdot x\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(z \cdot \left(x - y\right)\right)\\ \end{array} \]
                (FPCore (x y z)
                  :precision binary64
                  :pre TRUE
                  (let* ((t_0 (- (/ 2.0 3.0) z)))
                  (if (<= t_0 -1000.0)
                    (* z (* (- x y) 6.0))
                    (if (<= t_0 1.0)
                      (- (fma 4.0 y x) (* 4.0 x))
                      (* 6.0 (* z (- x y)))))))
                double code(double x, double y, double z) {
                	double t_0 = (2.0 / 3.0) - z;
                	double tmp;
                	if (t_0 <= -1000.0) {
                		tmp = z * ((x - y) * 6.0);
                	} else if (t_0 <= 1.0) {
                		tmp = fma(4.0, y, x) - (4.0 * x);
                	} else {
                		tmp = 6.0 * (z * (x - y));
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	t_0 = Float64(Float64(2.0 / 3.0) - z)
                	tmp = 0.0
                	if (t_0 <= -1000.0)
                		tmp = Float64(z * Float64(Float64(x - y) * 6.0));
                	elseif (t_0 <= 1.0)
                		tmp = Float64(fma(4.0, y, x) - Float64(4.0 * x));
                	else
                		tmp = Float64(6.0 * Float64(z * Float64(x - y)));
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], N[(z * N[(N[(x - y), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(N[(4.0 * y + x), $MachinePrecision] - N[(4.0 * x), $MachinePrecision]), $MachinePrecision], N[(6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                
                f(x, y, z):
                	x in [-inf, +inf],
                	y in [-inf, +inf],
                	z in [-inf, +inf]
                code: THEORY
                BEGIN
                f(x, y, z: real): real =
                	LET t_0 = (((2) / (3)) - z) IN
                		LET tmp_1 = IF (t_0 <= (1)) THEN ((((4) * y) + x) - ((4) * x)) ELSE ((6) * (z * (x - y))) ENDIF IN
                		LET tmp = IF (t_0 <= (-1000)) THEN (z * ((x - y) * (6))) ELSE tmp_1 ENDIF IN
                	tmp
                END code
                \begin{array}{l}
                t_0 := \frac{2}{3} - z\\
                \mathbf{if}\;t\_0 \leq -1000:\\
                \;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\
                
                \mathbf{elif}\;t\_0 \leq 1:\\
                \;\;\;\;\mathsf{fma}\left(4, y, x\right) - 4 \cdot x\\
                
                \mathbf{else}:\\
                \;\;\;\;6 \cdot \left(z \cdot \left(x - y\right)\right)\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3

                  1. Initial program 99.5%

                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                  2. Applied rewrites98.7%

                    \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                  3. Taylor expanded in z around inf

                    \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                  4. Step-by-step derivation
                    1. Applied rewrites50.7%

                      \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                    2. Step-by-step derivation
                      1. Applied rewrites50.7%

                        \[\leadsto z \cdot \left(\left(x - y\right) \cdot 6\right) \]

                      if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1

                      1. Initial program 99.5%

                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                      2. Applied rewrites98.7%

                        \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                      3. Taylor expanded in z around 0

                        \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                      4. Step-by-step derivation
                        1. Applied rewrites50.9%

                          \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                        2. Step-by-step derivation
                          1. Applied rewrites50.9%

                            \[\leadsto \mathsf{fma}\left(4, y, x\right) - 4 \cdot x \]

                          if 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z)

                          1. Initial program 99.5%

                            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                          2. Step-by-step derivation
                            1. Applied rewrites99.5%

                              \[\leadsto \mathsf{fma}\left(-6, \left(x - y\right) \cdot \left(0.6666666666666666 - z\right), x\right) \]
                            2. Taylor expanded in z around inf

                              \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                            3. Step-by-step derivation
                              1. Applied rewrites50.6%

                                \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                            4. Recombined 3 regimes into one program.
                            5. Add Preprocessing

                            Alternative 5: 97.8% accurate, 0.6× speedup?

                            \[\begin{array}{l} t_0 := \frac{2}{3} - z\\ \mathbf{if}\;t\_0 \leq -1000:\\ \;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\ \mathbf{elif}\;t\_0 \leq 1:\\ \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(z \cdot \left(x - y\right)\right)\\ \end{array} \]
                            (FPCore (x y z)
                              :precision binary64
                              :pre TRUE
                              (let* ((t_0 (- (/ 2.0 3.0) z)))
                              (if (<= t_0 -1000.0)
                                (* z (* (- x y) 6.0))
                                (if (<= t_0 1.0) (fma 4.0 (- y x) x) (* 6.0 (* z (- x y)))))))
                            double code(double x, double y, double z) {
                            	double t_0 = (2.0 / 3.0) - z;
                            	double tmp;
                            	if (t_0 <= -1000.0) {
                            		tmp = z * ((x - y) * 6.0);
                            	} else if (t_0 <= 1.0) {
                            		tmp = fma(4.0, (y - x), x);
                            	} else {
                            		tmp = 6.0 * (z * (x - y));
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z)
                            	t_0 = Float64(Float64(2.0 / 3.0) - z)
                            	tmp = 0.0
                            	if (t_0 <= -1000.0)
                            		tmp = Float64(z * Float64(Float64(x - y) * 6.0));
                            	elseif (t_0 <= 1.0)
                            		tmp = fma(4.0, Float64(y - x), x);
                            	else
                            		tmp = Float64(6.0 * Float64(z * Float64(x - y)));
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], N[(z * N[(N[(x - y), $MachinePrecision] * 6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[(4.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                            
                            f(x, y, z):
                            	x in [-inf, +inf],
                            	y in [-inf, +inf],
                            	z in [-inf, +inf]
                            code: THEORY
                            BEGIN
                            f(x, y, z: real): real =
                            	LET t_0 = (((2) / (3)) - z) IN
                            		LET tmp_1 = IF (t_0 <= (1)) THEN (((4) * (y - x)) + x) ELSE ((6) * (z * (x - y))) ENDIF IN
                            		LET tmp = IF (t_0 <= (-1000)) THEN (z * ((x - y) * (6))) ELSE tmp_1 ENDIF IN
                            	tmp
                            END code
                            \begin{array}{l}
                            t_0 := \frac{2}{3} - z\\
                            \mathbf{if}\;t\_0 \leq -1000:\\
                            \;\;\;\;z \cdot \left(\left(x - y\right) \cdot 6\right)\\
                            
                            \mathbf{elif}\;t\_0 \leq 1:\\
                            \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;6 \cdot \left(z \cdot \left(x - y\right)\right)\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3

                              1. Initial program 99.5%

                                \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                              2. Applied rewrites98.7%

                                \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                              3. Taylor expanded in z around inf

                                \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                              4. Step-by-step derivation
                                1. Applied rewrites50.7%

                                  \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                2. Step-by-step derivation
                                  1. Applied rewrites50.7%

                                    \[\leadsto z \cdot \left(\left(x - y\right) \cdot 6\right) \]

                                  if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1

                                  1. Initial program 99.5%

                                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                  2. Applied rewrites98.7%

                                    \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                  3. Taylor expanded in z around 0

                                    \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                  4. Step-by-step derivation
                                    1. Applied rewrites50.9%

                                      \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                    2. Step-by-step derivation
                                      1. Applied rewrites50.9%

                                        \[\leadsto \mathsf{fma}\left(4, y - x, x\right) \]

                                      if 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z)

                                      1. Initial program 99.5%

                                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites99.5%

                                          \[\leadsto \mathsf{fma}\left(-6, \left(x - y\right) \cdot \left(0.6666666666666666 - z\right), x\right) \]
                                        2. Taylor expanded in z around inf

                                          \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites50.6%

                                            \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                        4. Recombined 3 regimes into one program.
                                        5. Add Preprocessing

                                        Alternative 6: 97.8% accurate, 0.6× speedup?

                                        \[\begin{array}{l} t_0 := \frac{2}{3} - z\\ t_1 := 6 \cdot \left(z \cdot \left(x - y\right)\right)\\ \mathbf{if}\;t\_0 \leq -1000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 1:\\ \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                        (FPCore (x y z)
                                          :precision binary64
                                          :pre TRUE
                                          (let* ((t_0 (- (/ 2.0 3.0) z)) (t_1 (* 6.0 (* z (- x y)))))
                                          (if (<= t_0 -1000.0) t_1 (if (<= t_0 1.0) (fma 4.0 (- y x) x) t_1))))
                                        double code(double x, double y, double z) {
                                        	double t_0 = (2.0 / 3.0) - z;
                                        	double t_1 = 6.0 * (z * (x - y));
                                        	double tmp;
                                        	if (t_0 <= -1000.0) {
                                        		tmp = t_1;
                                        	} else if (t_0 <= 1.0) {
                                        		tmp = fma(4.0, (y - x), x);
                                        	} else {
                                        		tmp = t_1;
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(x, y, z)
                                        	t_0 = Float64(Float64(2.0 / 3.0) - z)
                                        	t_1 = Float64(6.0 * Float64(z * Float64(x - y)))
                                        	tmp = 0.0
                                        	if (t_0 <= -1000.0)
                                        		tmp = t_1;
                                        	elseif (t_0 <= 1.0)
                                        		tmp = fma(4.0, Float64(y - x), x);
                                        	else
                                        		tmp = t_1;
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[x_, y_, z_] := Block[{t$95$0 = N[(N[(2.0 / 3.0), $MachinePrecision] - z), $MachinePrecision]}, Block[{t$95$1 = N[(6.0 * N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], t$95$1, If[LessEqual[t$95$0, 1.0], N[(4.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]
                                        
                                        f(x, y, z):
                                        	x in [-inf, +inf],
                                        	y in [-inf, +inf],
                                        	z in [-inf, +inf]
                                        code: THEORY
                                        BEGIN
                                        f(x, y, z: real): real =
                                        	LET t_0 = (((2) / (3)) - z) IN
                                        		LET t_1 = ((6) * (z * (x - y))) IN
                                        			LET tmp_1 = IF (t_0 <= (1)) THEN (((4) * (y - x)) + x) ELSE t_1 ENDIF IN
                                        			LET tmp = IF (t_0 <= (-1000)) THEN t_1 ELSE tmp_1 ENDIF IN
                                        	tmp
                                        END code
                                        \begin{array}{l}
                                        t_0 := \frac{2}{3} - z\\
                                        t_1 := 6 \cdot \left(z \cdot \left(x - y\right)\right)\\
                                        \mathbf{if}\;t\_0 \leq -1000:\\
                                        \;\;\;\;t\_1\\
                                        
                                        \mathbf{elif}\;t\_0 \leq 1:\\
                                        \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;t\_1\\
                                        
                                        
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 2 regimes
                                        2. if (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < -1e3 or 1 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z)

                                          1. Initial program 99.5%

                                            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                          2. Step-by-step derivation
                                            1. Applied rewrites99.5%

                                              \[\leadsto \mathsf{fma}\left(-6, \left(x - y\right) \cdot \left(0.6666666666666666 - z\right), x\right) \]
                                            2. Taylor expanded in z around inf

                                              \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites50.6%

                                                \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]

                                              if -1e3 < (-.f64 (/.f64 #s(literal 2 binary64) #s(literal 3 binary64)) z) < 1

                                              1. Initial program 99.5%

                                                \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                              2. Applied rewrites98.7%

                                                \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                              3. Taylor expanded in z around 0

                                                \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites50.9%

                                                  \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites50.9%

                                                    \[\leadsto \mathsf{fma}\left(4, y - x, x\right) \]
                                                3. Recombined 2 regimes into one program.
                                                4. Add Preprocessing

                                                Alternative 7: 75.1% accurate, 1.1× speedup?

                                                \[\begin{array}{l} t_0 := \mathsf{fma}\left(-6, z, 4\right) \cdot y\\ \mathbf{if}\;y \leq -3.1789006437251225 \cdot 10^{-121}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 60174299.512866564:\\ \;\;\;\;\mathsf{fma}\left(z, 6, -3\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                (FPCore (x y z)
                                                  :precision binary64
                                                  :pre TRUE
                                                  (let* ((t_0 (* (fma -6.0 z 4.0) y)))
                                                  (if (<= y -3.1789006437251225e-121)
                                                    t_0
                                                    (if (<= y 60174299.512866564) (* (fma z 6.0 -3.0) x) t_0))))
                                                double code(double x, double y, double z) {
                                                	double t_0 = fma(-6.0, z, 4.0) * y;
                                                	double tmp;
                                                	if (y <= -3.1789006437251225e-121) {
                                                		tmp = t_0;
                                                	} else if (y <= 60174299.512866564) {
                                                		tmp = fma(z, 6.0, -3.0) * x;
                                                	} else {
                                                		tmp = t_0;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z)
                                                	t_0 = Float64(fma(-6.0, z, 4.0) * y)
                                                	tmp = 0.0
                                                	if (y <= -3.1789006437251225e-121)
                                                		tmp = t_0;
                                                	elseif (y <= 60174299.512866564)
                                                		tmp = Float64(fma(z, 6.0, -3.0) * x);
                                                	else
                                                		tmp = t_0;
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x_, y_, z_] := Block[{t$95$0 = N[(N[(-6.0 * z + 4.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -3.1789006437251225e-121], t$95$0, If[LessEqual[y, 60174299.512866564], N[(N[(z * 6.0 + -3.0), $MachinePrecision] * x), $MachinePrecision], t$95$0]]]
                                                
                                                f(x, y, z):
                                                	x in [-inf, +inf],
                                                	y in [-inf, +inf],
                                                	z in [-inf, +inf]
                                                code: THEORY
                                                BEGIN
                                                f(x, y, z: real): real =
                                                	LET t_0 = ((((-6) * z) + (4)) * y) IN
                                                		LET tmp_1 = IF (y <= (60174299512866564095020294189453125e-27)) THEN (((z * (6)) + (-3)) * x) ELSE t_0 ENDIF IN
                                                		LET tmp = IF (y <= (-317890064372512247688549505960289038327131994036841110540962906769404769208261861273859496188680827898195998971673293543571635771856326931903294151350825970828578785356851668594094472897821047154192757309636993462550938766457344488919782973849942040385314528344684298108715298018078622305248627510909642523984075523912906646728515625e-453)) THEN t_0 ELSE tmp_1 ENDIF IN
                                                	tmp
                                                END code
                                                \begin{array}{l}
                                                t_0 := \mathsf{fma}\left(-6, z, 4\right) \cdot y\\
                                                \mathbf{if}\;y \leq -3.1789006437251225 \cdot 10^{-121}:\\
                                                \;\;\;\;t\_0\\
                                                
                                                \mathbf{elif}\;y \leq 60174299.512866564:\\
                                                \;\;\;\;\mathsf{fma}\left(z, 6, -3\right) \cdot x\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_0\\
                                                
                                                
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if y < -3.1789006437251225e-121 or 60174299.512866564 < y

                                                  1. Initial program 99.5%

                                                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                  2. Applied rewrites98.7%

                                                    \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                  3. Taylor expanded in z around inf

                                                    \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                  4. Step-by-step derivation
                                                    1. Applied rewrites50.7%

                                                      \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                    2. Taylor expanded in x around 0

                                                      \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites50.8%

                                                        \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                      2. Step-by-step derivation
                                                        1. Applied rewrites50.8%

                                                          \[\leadsto \mathsf{fma}\left(-6, z, 4\right) \cdot y \]

                                                        if -3.1789006437251225e-121 < y < 60174299.512866564

                                                        1. Initial program 99.5%

                                                          \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites99.8%

                                                            \[\leadsto \mathsf{fma}\left(-6 \cdot z, y - x, \mathsf{fma}\left(-4, x - y, x\right)\right) \]
                                                          2. Taylor expanded in x around inf

                                                            \[\leadsto x \cdot \left(6 \cdot z - 3\right) \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites52.7%

                                                              \[\leadsto x \cdot \left(6 \cdot z - 3\right) \]
                                                            2. Step-by-step derivation
                                                              1. Applied rewrites52.7%

                                                                \[\leadsto \mathsf{fma}\left(z, 6, -3\right) \cdot x \]
                                                            3. Recombined 2 regimes into one program.
                                                            4. Add Preprocessing

                                                            Alternative 8: 75.1% accurate, 1.0× speedup?

                                                            \[\begin{array}{l} \mathbf{if}\;z \leq -28165673201.033638:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq 1718.3088900824791:\\ \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\ \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \end{array} \]
                                                            (FPCore (x y z)
                                                              :precision binary64
                                                              :pre TRUE
                                                              (if (<= z -28165673201.033638)
                                                              (* 6.0 (* x z))
                                                              (if (<= z 1718.3088900824791)
                                                                (fma 4.0 (- y x) x)
                                                                (if (<= z 1.69063164059008e+58)
                                                                  (* z (* x 6.0))
                                                                  (* -6.0 (* y z))))))
                                                            double code(double x, double y, double z) {
                                                            	double tmp;
                                                            	if (z <= -28165673201.033638) {
                                                            		tmp = 6.0 * (x * z);
                                                            	} else if (z <= 1718.3088900824791) {
                                                            		tmp = fma(4.0, (y - x), x);
                                                            	} else if (z <= 1.69063164059008e+58) {
                                                            		tmp = z * (x * 6.0);
                                                            	} else {
                                                            		tmp = -6.0 * (y * z);
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            function code(x, y, z)
                                                            	tmp = 0.0
                                                            	if (z <= -28165673201.033638)
                                                            		tmp = Float64(6.0 * Float64(x * z));
                                                            	elseif (z <= 1718.3088900824791)
                                                            		tmp = fma(4.0, Float64(y - x), x);
                                                            	elseif (z <= 1.69063164059008e+58)
                                                            		tmp = Float64(z * Float64(x * 6.0));
                                                            	else
                                                            		tmp = Float64(-6.0 * Float64(y * z));
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            code[x_, y_, z_] := If[LessEqual[z, -28165673201.033638], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(4.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]
                                                            
                                                            f(x, y, z):
                                                            	x in [-inf, +inf],
                                                            	y in [-inf, +inf],
                                                            	z in [-inf, +inf]
                                                            code: THEORY
                                                            BEGIN
                                                            f(x, y, z: real): real =
                                                            	LET tmp_2 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN (z * (x * (6))) ELSE ((-6) * (y * z)) ENDIF IN
                                                            	LET tmp_1 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (((4) * (y - x)) + x) ELSE tmp_2 ENDIF IN
                                                            	LET tmp = IF (z <= (-2816567320103363800048828125e-17)) THEN ((6) * (x * z)) ELSE tmp_1 ENDIF IN
                                                            	tmp
                                                            END code
                                                            \begin{array}{l}
                                                            \mathbf{if}\;z \leq -28165673201.033638:\\
                                                            \;\;\;\;6 \cdot \left(x \cdot z\right)\\
                                                            
                                                            \mathbf{elif}\;z \leq 1718.3088900824791:\\
                                                            \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
                                                            
                                                            \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
                                                            \;\;\;\;z \cdot \left(x \cdot 6\right)\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;-6 \cdot \left(y \cdot z\right)\\
                                                            
                                                            
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 4 regimes
                                                            2. if z < -28165673201.033638

                                                              1. Initial program 99.5%

                                                                \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                              2. Applied rewrites98.7%

                                                                \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                              3. Taylor expanded in z around inf

                                                                \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                              4. Step-by-step derivation
                                                                1. Applied rewrites50.7%

                                                                  \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                2. Step-by-step derivation
                                                                  1. Applied rewrites50.7%

                                                                    \[\leadsto z \cdot \left(\left(x - y\right) \cdot 6\right) \]
                                                                  2. Taylor expanded in x around inf

                                                                    \[\leadsto 6 \cdot \left(x \cdot z\right) \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites27.9%

                                                                      \[\leadsto 6 \cdot \left(x \cdot z\right) \]

                                                                    if -28165673201.033638 < z < 1718.3088900824791

                                                                    1. Initial program 99.5%

                                                                      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                    2. Applied rewrites98.7%

                                                                      \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                    3. Taylor expanded in z around 0

                                                                      \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites50.9%

                                                                        \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                                                      2. Step-by-step derivation
                                                                        1. Applied rewrites50.9%

                                                                          \[\leadsto \mathsf{fma}\left(4, y - x, x\right) \]

                                                                        if 1718.3088900824791 < z < 1.6906316405900799e58

                                                                        1. Initial program 99.5%

                                                                          \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                        2. Taylor expanded in z around inf

                                                                          \[\leadsto z \cdot \left(-6 \cdot \left(y - x\right) + \left(4 \cdot \frac{y - x}{z} + \frac{x}{z}\right)\right) \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites79.4%

                                                                            \[\leadsto z \cdot \mathsf{fma}\left(-6, y - x, \mathsf{fma}\left(4, \frac{y - x}{z}, \frac{x}{z}\right)\right) \]
                                                                          2. Taylor expanded in x around inf

                                                                            \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                          3. Step-by-step derivation
                                                                            1. Applied rewrites42.8%

                                                                              \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                            2. Taylor expanded in z around inf

                                                                              \[\leadsto z \cdot \left(x \cdot 6\right) \]
                                                                            3. Step-by-step derivation
                                                                              1. Applied rewrites27.9%

                                                                                \[\leadsto z \cdot \left(x \cdot 6\right) \]

                                                                              if 1.6906316405900799e58 < z

                                                                              1. Initial program 99.5%

                                                                                \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                              2. Step-by-step derivation
                                                                                1. Applied rewrites99.5%

                                                                                  \[\leadsto \mathsf{fma}\left(-6, \left(x - y\right) \cdot \left(0.6666666666666666 - z\right), x\right) \]
                                                                                2. Taylor expanded in z around inf

                                                                                  \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                                                                3. Step-by-step derivation
                                                                                  1. Applied rewrites50.6%

                                                                                    \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                                                                  2. Taylor expanded in x around 0

                                                                                    \[\leadsto -6 \cdot \left(y \cdot z\right) \]
                                                                                  3. Step-by-step derivation
                                                                                    1. Applied rewrites27.0%

                                                                                      \[\leadsto -6 \cdot \left(y \cdot z\right) \]
                                                                                  4. Recombined 4 regimes into one program.
                                                                                  5. Add Preprocessing

                                                                                  Alternative 9: 74.4% accurate, 1.1× speedup?

                                                                                  \[\begin{array}{l} \mathbf{if}\;z \leq -28165673201.033638:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq 7.845250112058621 \cdot 10^{-9}:\\ \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-6, z, 4\right) \cdot y\\ \end{array} \]
                                                                                  (FPCore (x y z)
                                                                                    :precision binary64
                                                                                    :pre TRUE
                                                                                    (if (<= z -28165673201.033638)
                                                                                    (* 6.0 (* x z))
                                                                                    (if (<= z 7.845250112058621e-9)
                                                                                      (fma 4.0 (- y x) x)
                                                                                      (* (fma -6.0 z 4.0) y))))
                                                                                  double code(double x, double y, double z) {
                                                                                  	double tmp;
                                                                                  	if (z <= -28165673201.033638) {
                                                                                  		tmp = 6.0 * (x * z);
                                                                                  	} else if (z <= 7.845250112058621e-9) {
                                                                                  		tmp = fma(4.0, (y - x), x);
                                                                                  	} else {
                                                                                  		tmp = fma(-6.0, z, 4.0) * y;
                                                                                  	}
                                                                                  	return tmp;
                                                                                  }
                                                                                  
                                                                                  function code(x, y, z)
                                                                                  	tmp = 0.0
                                                                                  	if (z <= -28165673201.033638)
                                                                                  		tmp = Float64(6.0 * Float64(x * z));
                                                                                  	elseif (z <= 7.845250112058621e-9)
                                                                                  		tmp = fma(4.0, Float64(y - x), x);
                                                                                  	else
                                                                                  		tmp = Float64(fma(-6.0, z, 4.0) * y);
                                                                                  	end
                                                                                  	return tmp
                                                                                  end
                                                                                  
                                                                                  code[x_, y_, z_] := If[LessEqual[z, -28165673201.033638], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.845250112058621e-9], N[(4.0 * N[(y - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(-6.0 * z + 4.0), $MachinePrecision] * y), $MachinePrecision]]]
                                                                                  
                                                                                  f(x, y, z):
                                                                                  	x in [-inf, +inf],
                                                                                  	y in [-inf, +inf],
                                                                                  	z in [-inf, +inf]
                                                                                  code: THEORY
                                                                                  BEGIN
                                                                                  f(x, y, z: real): real =
                                                                                  	LET tmp_1 = IF (z <= (78452501120586211901078397558915999976392185999429784715175628662109375e-79)) THEN (((4) * (y - x)) + x) ELSE ((((-6) * z) + (4)) * y) ENDIF IN
                                                                                  	LET tmp = IF (z <= (-2816567320103363800048828125e-17)) THEN ((6) * (x * z)) ELSE tmp_1 ENDIF IN
                                                                                  	tmp
                                                                                  END code
                                                                                  \begin{array}{l}
                                                                                  \mathbf{if}\;z \leq -28165673201.033638:\\
                                                                                  \;\;\;\;6 \cdot \left(x \cdot z\right)\\
                                                                                  
                                                                                  \mathbf{elif}\;z \leq 7.845250112058621 \cdot 10^{-9}:\\
                                                                                  \;\;\;\;\mathsf{fma}\left(4, y - x, x\right)\\
                                                                                  
                                                                                  \mathbf{else}:\\
                                                                                  \;\;\;\;\mathsf{fma}\left(-6, z, 4\right) \cdot y\\
                                                                                  
                                                                                  
                                                                                  \end{array}
                                                                                  
                                                                                  Derivation
                                                                                  1. Split input into 3 regimes
                                                                                  2. if z < -28165673201.033638

                                                                                    1. Initial program 99.5%

                                                                                      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                    2. Applied rewrites98.7%

                                                                                      \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                    3. Taylor expanded in z around inf

                                                                                      \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                    4. Step-by-step derivation
                                                                                      1. Applied rewrites50.7%

                                                                                        \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                      2. Step-by-step derivation
                                                                                        1. Applied rewrites50.7%

                                                                                          \[\leadsto z \cdot \left(\left(x - y\right) \cdot 6\right) \]
                                                                                        2. Taylor expanded in x around inf

                                                                                          \[\leadsto 6 \cdot \left(x \cdot z\right) \]
                                                                                        3. Step-by-step derivation
                                                                                          1. Applied rewrites27.9%

                                                                                            \[\leadsto 6 \cdot \left(x \cdot z\right) \]

                                                                                          if -28165673201.033638 < z < 7.8452501120586212e-9

                                                                                          1. Initial program 99.5%

                                                                                            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                          2. Applied rewrites98.7%

                                                                                            \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                          3. Taylor expanded in z around 0

                                                                                            \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                                                                          4. Step-by-step derivation
                                                                                            1. Applied rewrites50.9%

                                                                                              \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                                                                            2. Step-by-step derivation
                                                                                              1. Applied rewrites50.9%

                                                                                                \[\leadsto \mathsf{fma}\left(4, y - x, x\right) \]

                                                                                              if 7.8452501120586212e-9 < z

                                                                                              1. Initial program 99.5%

                                                                                                \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                              2. Applied rewrites98.7%

                                                                                                \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                              3. Taylor expanded in z around inf

                                                                                                \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                              4. Step-by-step derivation
                                                                                                1. Applied rewrites50.7%

                                                                                                  \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                                2. Taylor expanded in x around 0

                                                                                                  \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites50.8%

                                                                                                    \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                  2. Step-by-step derivation
                                                                                                    1. Applied rewrites50.8%

                                                                                                      \[\leadsto \mathsf{fma}\left(-6, z, 4\right) \cdot y \]
                                                                                                  3. Recombined 3 regimes into one program.
                                                                                                  4. Add Preprocessing

                                                                                                  Alternative 10: 51.1% accurate, 0.8× speedup?

                                                                                                  \[\begin{array}{l} \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\ \;\;\;\;6 \cdot \left(x \cdot z\right)\\ \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1718.3088900824791:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\ \;\;\;\;z \cdot \left(x \cdot 6\right)\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \end{array} \]
                                                                                                  (FPCore (x y z)
                                                                                                    :precision binary64
                                                                                                    :pre TRUE
                                                                                                    (if (<= z -1.3998094315248038e-12)
                                                                                                    (* 6.0 (* x z))
                                                                                                    (if (<= z -1.050551895330471e-127)
                                                                                                      (* y 4.0)
                                                                                                      (if (<= z 1718.3088900824791)
                                                                                                        (* x -3.0)
                                                                                                        (if (<= z 1.69063164059008e+58)
                                                                                                          (* z (* x 6.0))
                                                                                                          (* -6.0 (* y z)))))))
                                                                                                  double code(double x, double y, double z) {
                                                                                                  	double tmp;
                                                                                                  	if (z <= -1.3998094315248038e-12) {
                                                                                                  		tmp = 6.0 * (x * z);
                                                                                                  	} else if (z <= -1.050551895330471e-127) {
                                                                                                  		tmp = y * 4.0;
                                                                                                  	} else if (z <= 1718.3088900824791) {
                                                                                                  		tmp = x * -3.0;
                                                                                                  	} else if (z <= 1.69063164059008e+58) {
                                                                                                  		tmp = z * (x * 6.0);
                                                                                                  	} else {
                                                                                                  		tmp = -6.0 * (y * z);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  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) :: tmp
                                                                                                      if (z <= (-1.3998094315248038d-12)) then
                                                                                                          tmp = 6.0d0 * (x * z)
                                                                                                      else if (z <= (-1.050551895330471d-127)) then
                                                                                                          tmp = y * 4.0d0
                                                                                                      else if (z <= 1718.3088900824791d0) then
                                                                                                          tmp = x * (-3.0d0)
                                                                                                      else if (z <= 1.69063164059008d+58) then
                                                                                                          tmp = z * (x * 6.0d0)
                                                                                                      else
                                                                                                          tmp = (-6.0d0) * (y * z)
                                                                                                      end if
                                                                                                      code = tmp
                                                                                                  end function
                                                                                                  
                                                                                                  public static double code(double x, double y, double z) {
                                                                                                  	double tmp;
                                                                                                  	if (z <= -1.3998094315248038e-12) {
                                                                                                  		tmp = 6.0 * (x * z);
                                                                                                  	} else if (z <= -1.050551895330471e-127) {
                                                                                                  		tmp = y * 4.0;
                                                                                                  	} else if (z <= 1718.3088900824791) {
                                                                                                  		tmp = x * -3.0;
                                                                                                  	} else if (z <= 1.69063164059008e+58) {
                                                                                                  		tmp = z * (x * 6.0);
                                                                                                  	} else {
                                                                                                  		tmp = -6.0 * (y * z);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  def code(x, y, z):
                                                                                                  	tmp = 0
                                                                                                  	if z <= -1.3998094315248038e-12:
                                                                                                  		tmp = 6.0 * (x * z)
                                                                                                  	elif z <= -1.050551895330471e-127:
                                                                                                  		tmp = y * 4.0
                                                                                                  	elif z <= 1718.3088900824791:
                                                                                                  		tmp = x * -3.0
                                                                                                  	elif z <= 1.69063164059008e+58:
                                                                                                  		tmp = z * (x * 6.0)
                                                                                                  	else:
                                                                                                  		tmp = -6.0 * (y * z)
                                                                                                  	return tmp
                                                                                                  
                                                                                                  function code(x, y, z)
                                                                                                  	tmp = 0.0
                                                                                                  	if (z <= -1.3998094315248038e-12)
                                                                                                  		tmp = Float64(6.0 * Float64(x * z));
                                                                                                  	elseif (z <= -1.050551895330471e-127)
                                                                                                  		tmp = Float64(y * 4.0);
                                                                                                  	elseif (z <= 1718.3088900824791)
                                                                                                  		tmp = Float64(x * -3.0);
                                                                                                  	elseif (z <= 1.69063164059008e+58)
                                                                                                  		tmp = Float64(z * Float64(x * 6.0));
                                                                                                  	else
                                                                                                  		tmp = Float64(-6.0 * Float64(y * z));
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  function tmp_2 = code(x, y, z)
                                                                                                  	tmp = 0.0;
                                                                                                  	if (z <= -1.3998094315248038e-12)
                                                                                                  		tmp = 6.0 * (x * z);
                                                                                                  	elseif (z <= -1.050551895330471e-127)
                                                                                                  		tmp = y * 4.0;
                                                                                                  	elseif (z <= 1718.3088900824791)
                                                                                                  		tmp = x * -3.0;
                                                                                                  	elseif (z <= 1.69063164059008e+58)
                                                                                                  		tmp = z * (x * 6.0);
                                                                                                  	else
                                                                                                  		tmp = -6.0 * (y * z);
                                                                                                  	end
                                                                                                  	tmp_2 = tmp;
                                                                                                  end
                                                                                                  
                                                                                                  code[x_, y_, z_] := If[LessEqual[z, -1.3998094315248038e-12], N[(6.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision], N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]
                                                                                                  
                                                                                                  f(x, y, z):
                                                                                                  	x in [-inf, +inf],
                                                                                                  	y in [-inf, +inf],
                                                                                                  	z in [-inf, +inf]
                                                                                                  code: THEORY
                                                                                                  BEGIN
                                                                                                  f(x, y, z: real): real =
                                                                                                  	LET tmp_3 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN (z * (x * (6))) ELSE ((-6) * (y * z)) ENDIF IN
                                                                                                  	LET tmp_2 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN
                                                                                                  	LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN
                                                                                                  	LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN ((6) * (x * z)) ELSE tmp_1 ENDIF IN
                                                                                                  	tmp
                                                                                                  END code
                                                                                                  \begin{array}{l}
                                                                                                  \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
                                                                                                  \;\;\;\;6 \cdot \left(x \cdot z\right)\\
                                                                                                  
                                                                                                  \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
                                                                                                  \;\;\;\;y \cdot 4\\
                                                                                                  
                                                                                                  \mathbf{elif}\;z \leq 1718.3088900824791:\\
                                                                                                  \;\;\;\;x \cdot -3\\
                                                                                                  
                                                                                                  \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
                                                                                                  \;\;\;\;z \cdot \left(x \cdot 6\right)\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;-6 \cdot \left(y \cdot z\right)\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 5 regimes
                                                                                                  2. if z < -1.3998094315248038e-12

                                                                                                    1. Initial program 99.5%

                                                                                                      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                    2. Applied rewrites98.7%

                                                                                                      \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                                    3. Taylor expanded in z around inf

                                                                                                      \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. Applied rewrites50.7%

                                                                                                        \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                                      2. Step-by-step derivation
                                                                                                        1. Applied rewrites50.7%

                                                                                                          \[\leadsto z \cdot \left(\left(x - y\right) \cdot 6\right) \]
                                                                                                        2. Taylor expanded in x around inf

                                                                                                          \[\leadsto 6 \cdot \left(x \cdot z\right) \]
                                                                                                        3. Step-by-step derivation
                                                                                                          1. Applied rewrites27.9%

                                                                                                            \[\leadsto 6 \cdot \left(x \cdot z\right) \]

                                                                                                          if -1.3998094315248038e-12 < z < -1.050551895330471e-127

                                                                                                          1. Initial program 99.5%

                                                                                                            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                          2. Applied rewrites98.7%

                                                                                                            \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                                          3. Taylor expanded in z around inf

                                                                                                            \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. Applied rewrites50.7%

                                                                                                              \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                                            2. Taylor expanded in x around 0

                                                                                                              \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. Applied rewrites50.8%

                                                                                                                \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                              2. Taylor expanded in z around 0

                                                                                                                \[\leadsto y \cdot 4 \]
                                                                                                              3. Step-by-step derivation
                                                                                                                1. Applied rewrites26.0%

                                                                                                                  \[\leadsto y \cdot 4 \]

                                                                                                                if -1.050551895330471e-127 < z < 1718.3088900824791

                                                                                                                1. Initial program 99.5%

                                                                                                                  \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                2. Taylor expanded in x around inf

                                                                                                                  \[\leadsto x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right) \]
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. Applied rewrites52.7%

                                                                                                                    \[\leadsto x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right) \]
                                                                                                                  2. Taylor expanded in z around 0

                                                                                                                    \[\leadsto x \cdot -3 \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites26.9%

                                                                                                                      \[\leadsto x \cdot -3 \]

                                                                                                                    if 1718.3088900824791 < z < 1.6906316405900799e58

                                                                                                                    1. Initial program 99.5%

                                                                                                                      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                    2. Taylor expanded in z around inf

                                                                                                                      \[\leadsto z \cdot \left(-6 \cdot \left(y - x\right) + \left(4 \cdot \frac{y - x}{z} + \frac{x}{z}\right)\right) \]
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. Applied rewrites79.4%

                                                                                                                        \[\leadsto z \cdot \mathsf{fma}\left(-6, y - x, \mathsf{fma}\left(4, \frac{y - x}{z}, \frac{x}{z}\right)\right) \]
                                                                                                                      2. Taylor expanded in x around inf

                                                                                                                        \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites42.8%

                                                                                                                          \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                                                                        2. Taylor expanded in z around inf

                                                                                                                          \[\leadsto z \cdot \left(x \cdot 6\right) \]
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. Applied rewrites27.9%

                                                                                                                            \[\leadsto z \cdot \left(x \cdot 6\right) \]

                                                                                                                          if 1.6906316405900799e58 < z

                                                                                                                          1. Initial program 99.5%

                                                                                                                            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                          2. Step-by-step derivation
                                                                                                                            1. Applied rewrites99.5%

                                                                                                                              \[\leadsto \mathsf{fma}\left(-6, \left(x - y\right) \cdot \left(0.6666666666666666 - z\right), x\right) \]
                                                                                                                            2. Taylor expanded in z around inf

                                                                                                                              \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                                                                                                            3. Step-by-step derivation
                                                                                                                              1. Applied rewrites50.6%

                                                                                                                                \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                                                                                                              2. Taylor expanded in x around 0

                                                                                                                                \[\leadsto -6 \cdot \left(y \cdot z\right) \]
                                                                                                                              3. Step-by-step derivation
                                                                                                                                1. Applied rewrites27.0%

                                                                                                                                  \[\leadsto -6 \cdot \left(y \cdot z\right) \]
                                                                                                                              4. Recombined 5 regimes into one program.
                                                                                                                              5. Add Preprocessing

                                                                                                                              Alternative 11: 51.1% accurate, 0.8× speedup?

                                                                                                                              \[\begin{array}{l} t_0 := z \cdot \left(x \cdot 6\right)\\ \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1718.3088900824791:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;-6 \cdot \left(y \cdot z\right)\\ \end{array} \]
                                                                                                                              (FPCore (x y z)
                                                                                                                                :precision binary64
                                                                                                                                :pre TRUE
                                                                                                                                (let* ((t_0 (* z (* x 6.0))))
                                                                                                                                (if (<= z -1.3998094315248038e-12)
                                                                                                                                  t_0
                                                                                                                                  (if (<= z -1.050551895330471e-127)
                                                                                                                                    (* y 4.0)
                                                                                                                                    (if (<= z 1718.3088900824791)
                                                                                                                                      (* x -3.0)
                                                                                                                                      (if (<= z 1.69063164059008e+58) t_0 (* -6.0 (* y z))))))))
                                                                                                                              double code(double x, double y, double z) {
                                                                                                                              	double t_0 = z * (x * 6.0);
                                                                                                                              	double tmp;
                                                                                                                              	if (z <= -1.3998094315248038e-12) {
                                                                                                                              		tmp = t_0;
                                                                                                                              	} else if (z <= -1.050551895330471e-127) {
                                                                                                                              		tmp = y * 4.0;
                                                                                                                              	} else if (z <= 1718.3088900824791) {
                                                                                                                              		tmp = x * -3.0;
                                                                                                                              	} else if (z <= 1.69063164059008e+58) {
                                                                                                                              		tmp = t_0;
                                                                                                                              	} else {
                                                                                                                              		tmp = -6.0 * (y * z);
                                                                                                                              	}
                                                                                                                              	return tmp;
                                                                                                                              }
                                                                                                                              
                                                                                                                              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 = z * (x * 6.0d0)
                                                                                                                                  if (z <= (-1.3998094315248038d-12)) then
                                                                                                                                      tmp = t_0
                                                                                                                                  else if (z <= (-1.050551895330471d-127)) then
                                                                                                                                      tmp = y * 4.0d0
                                                                                                                                  else if (z <= 1718.3088900824791d0) then
                                                                                                                                      tmp = x * (-3.0d0)
                                                                                                                                  else if (z <= 1.69063164059008d+58) then
                                                                                                                                      tmp = t_0
                                                                                                                                  else
                                                                                                                                      tmp = (-6.0d0) * (y * z)
                                                                                                                                  end if
                                                                                                                                  code = tmp
                                                                                                                              end function
                                                                                                                              
                                                                                                                              public static double code(double x, double y, double z) {
                                                                                                                              	double t_0 = z * (x * 6.0);
                                                                                                                              	double tmp;
                                                                                                                              	if (z <= -1.3998094315248038e-12) {
                                                                                                                              		tmp = t_0;
                                                                                                                              	} else if (z <= -1.050551895330471e-127) {
                                                                                                                              		tmp = y * 4.0;
                                                                                                                              	} else if (z <= 1718.3088900824791) {
                                                                                                                              		tmp = x * -3.0;
                                                                                                                              	} else if (z <= 1.69063164059008e+58) {
                                                                                                                              		tmp = t_0;
                                                                                                                              	} else {
                                                                                                                              		tmp = -6.0 * (y * z);
                                                                                                                              	}
                                                                                                                              	return tmp;
                                                                                                                              }
                                                                                                                              
                                                                                                                              def code(x, y, z):
                                                                                                                              	t_0 = z * (x * 6.0)
                                                                                                                              	tmp = 0
                                                                                                                              	if z <= -1.3998094315248038e-12:
                                                                                                                              		tmp = t_0
                                                                                                                              	elif z <= -1.050551895330471e-127:
                                                                                                                              		tmp = y * 4.0
                                                                                                                              	elif z <= 1718.3088900824791:
                                                                                                                              		tmp = x * -3.0
                                                                                                                              	elif z <= 1.69063164059008e+58:
                                                                                                                              		tmp = t_0
                                                                                                                              	else:
                                                                                                                              		tmp = -6.0 * (y * z)
                                                                                                                              	return tmp
                                                                                                                              
                                                                                                                              function code(x, y, z)
                                                                                                                              	t_0 = Float64(z * Float64(x * 6.0))
                                                                                                                              	tmp = 0.0
                                                                                                                              	if (z <= -1.3998094315248038e-12)
                                                                                                                              		tmp = t_0;
                                                                                                                              	elseif (z <= -1.050551895330471e-127)
                                                                                                                              		tmp = Float64(y * 4.0);
                                                                                                                              	elseif (z <= 1718.3088900824791)
                                                                                                                              		tmp = Float64(x * -3.0);
                                                                                                                              	elseif (z <= 1.69063164059008e+58)
                                                                                                                              		tmp = t_0;
                                                                                                                              	else
                                                                                                                              		tmp = Float64(-6.0 * Float64(y * z));
                                                                                                                              	end
                                                                                                                              	return tmp
                                                                                                                              end
                                                                                                                              
                                                                                                                              function tmp_2 = code(x, y, z)
                                                                                                                              	t_0 = z * (x * 6.0);
                                                                                                                              	tmp = 0.0;
                                                                                                                              	if (z <= -1.3998094315248038e-12)
                                                                                                                              		tmp = t_0;
                                                                                                                              	elseif (z <= -1.050551895330471e-127)
                                                                                                                              		tmp = y * 4.0;
                                                                                                                              	elseif (z <= 1718.3088900824791)
                                                                                                                              		tmp = x * -3.0;
                                                                                                                              	elseif (z <= 1.69063164059008e+58)
                                                                                                                              		tmp = t_0;
                                                                                                                              	else
                                                                                                                              		tmp = -6.0 * (y * z);
                                                                                                                              	end
                                                                                                                              	tmp_2 = tmp;
                                                                                                                              end
                                                                                                                              
                                                                                                                              code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3998094315248038e-12], t$95$0, If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], t$95$0, N[(-6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]]]]]]
                                                                                                                              
                                                                                                                              f(x, y, z):
                                                                                                                              	x in [-inf, +inf],
                                                                                                                              	y in [-inf, +inf],
                                                                                                                              	z in [-inf, +inf]
                                                                                                                              code: THEORY
                                                                                                                              BEGIN
                                                                                                                              f(x, y, z: real): real =
                                                                                                                              	LET t_0 = (z * (x * (6))) IN
                                                                                                                              		LET tmp_3 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN t_0 ELSE ((-6) * (y * z)) ENDIF IN
                                                                                                                              		LET tmp_2 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN
                                                                                                                              		LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN
                                                                                                                              		LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN t_0 ELSE tmp_1 ENDIF IN
                                                                                                                              	tmp
                                                                                                                              END code
                                                                                                                              \begin{array}{l}
                                                                                                                              t_0 := z \cdot \left(x \cdot 6\right)\\
                                                                                                                              \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
                                                                                                                              \;\;\;\;t\_0\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
                                                                                                                              \;\;\;\;y \cdot 4\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;z \leq 1718.3088900824791:\\
                                                                                                                              \;\;\;\;x \cdot -3\\
                                                                                                                              
                                                                                                                              \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
                                                                                                                              \;\;\;\;t\_0\\
                                                                                                                              
                                                                                                                              \mathbf{else}:\\
                                                                                                                              \;\;\;\;-6 \cdot \left(y \cdot z\right)\\
                                                                                                                              
                                                                                                                              
                                                                                                                              \end{array}
                                                                                                                              
                                                                                                                              Derivation
                                                                                                                              1. Split input into 4 regimes
                                                                                                                              2. if z < -1.3998094315248038e-12 or 1718.3088900824791 < z < 1.6906316405900799e58

                                                                                                                                1. Initial program 99.5%

                                                                                                                                  \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                2. Taylor expanded in z around inf

                                                                                                                                  \[\leadsto z \cdot \left(-6 \cdot \left(y - x\right) + \left(4 \cdot \frac{y - x}{z} + \frac{x}{z}\right)\right) \]
                                                                                                                                3. Step-by-step derivation
                                                                                                                                  1. Applied rewrites79.4%

                                                                                                                                    \[\leadsto z \cdot \mathsf{fma}\left(-6, y - x, \mathsf{fma}\left(4, \frac{y - x}{z}, \frac{x}{z}\right)\right) \]
                                                                                                                                  2. Taylor expanded in x around inf

                                                                                                                                    \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                                                                                  3. Step-by-step derivation
                                                                                                                                    1. Applied rewrites42.8%

                                                                                                                                      \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                                                                                    2. Taylor expanded in z around inf

                                                                                                                                      \[\leadsto z \cdot \left(x \cdot 6\right) \]
                                                                                                                                    3. Step-by-step derivation
                                                                                                                                      1. Applied rewrites27.9%

                                                                                                                                        \[\leadsto z \cdot \left(x \cdot 6\right) \]

                                                                                                                                      if -1.3998094315248038e-12 < z < -1.050551895330471e-127

                                                                                                                                      1. Initial program 99.5%

                                                                                                                                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                      2. Applied rewrites98.7%

                                                                                                                                        \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                                                                      3. Taylor expanded in z around inf

                                                                                                                                        \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                                                                      4. Step-by-step derivation
                                                                                                                                        1. Applied rewrites50.7%

                                                                                                                                          \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                                                                        2. Taylor expanded in x around 0

                                                                                                                                          \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                        3. Step-by-step derivation
                                                                                                                                          1. Applied rewrites50.8%

                                                                                                                                            \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                          2. Taylor expanded in z around 0

                                                                                                                                            \[\leadsto y \cdot 4 \]
                                                                                                                                          3. Step-by-step derivation
                                                                                                                                            1. Applied rewrites26.0%

                                                                                                                                              \[\leadsto y \cdot 4 \]

                                                                                                                                            if -1.050551895330471e-127 < z < 1718.3088900824791

                                                                                                                                            1. Initial program 99.5%

                                                                                                                                              \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                            2. Taylor expanded in x around inf

                                                                                                                                              \[\leadsto x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right) \]
                                                                                                                                            3. Step-by-step derivation
                                                                                                                                              1. Applied rewrites52.7%

                                                                                                                                                \[\leadsto x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right) \]
                                                                                                                                              2. Taylor expanded in z around 0

                                                                                                                                                \[\leadsto x \cdot -3 \]
                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                1. Applied rewrites26.9%

                                                                                                                                                  \[\leadsto x \cdot -3 \]

                                                                                                                                                if 1.6906316405900799e58 < z

                                                                                                                                                1. Initial program 99.5%

                                                                                                                                                  \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                  1. Applied rewrites99.5%

                                                                                                                                                    \[\leadsto \mathsf{fma}\left(-6, \left(x - y\right) \cdot \left(0.6666666666666666 - z\right), x\right) \]
                                                                                                                                                  2. Taylor expanded in z around inf

                                                                                                                                                    \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                    1. Applied rewrites50.6%

                                                                                                                                                      \[\leadsto 6 \cdot \left(z \cdot \left(x - y\right)\right) \]
                                                                                                                                                    2. Taylor expanded in x around 0

                                                                                                                                                      \[\leadsto -6 \cdot \left(y \cdot z\right) \]
                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                      1. Applied rewrites27.0%

                                                                                                                                                        \[\leadsto -6 \cdot \left(y \cdot z\right) \]
                                                                                                                                                    4. Recombined 4 regimes into one program.
                                                                                                                                                    5. Add Preprocessing

                                                                                                                                                    Alternative 12: 51.1% accurate, 0.8× speedup?

                                                                                                                                                    \[\begin{array}{l} t_0 := z \cdot \left(x \cdot 6\right)\\ \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 1718.3088900824791:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(z \cdot -6\right)\\ \end{array} \]
                                                                                                                                                    (FPCore (x y z)
                                                                                                                                                      :precision binary64
                                                                                                                                                      :pre TRUE
                                                                                                                                                      (let* ((t_0 (* z (* x 6.0))))
                                                                                                                                                      (if (<= z -1.3998094315248038e-12)
                                                                                                                                                        t_0
                                                                                                                                                        (if (<= z -1.050551895330471e-127)
                                                                                                                                                          (* y 4.0)
                                                                                                                                                          (if (<= z 1718.3088900824791)
                                                                                                                                                            (* x -3.0)
                                                                                                                                                            (if (<= z 1.69063164059008e+58) t_0 (* y (* z -6.0))))))))
                                                                                                                                                    double code(double x, double y, double z) {
                                                                                                                                                    	double t_0 = z * (x * 6.0);
                                                                                                                                                    	double tmp;
                                                                                                                                                    	if (z <= -1.3998094315248038e-12) {
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	} else if (z <= -1.050551895330471e-127) {
                                                                                                                                                    		tmp = y * 4.0;
                                                                                                                                                    	} else if (z <= 1718.3088900824791) {
                                                                                                                                                    		tmp = x * -3.0;
                                                                                                                                                    	} else if (z <= 1.69063164059008e+58) {
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	} else {
                                                                                                                                                    		tmp = y * (z * -6.0);
                                                                                                                                                    	}
                                                                                                                                                    	return tmp;
                                                                                                                                                    }
                                                                                                                                                    
                                                                                                                                                    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 = z * (x * 6.0d0)
                                                                                                                                                        if (z <= (-1.3998094315248038d-12)) then
                                                                                                                                                            tmp = t_0
                                                                                                                                                        else if (z <= (-1.050551895330471d-127)) then
                                                                                                                                                            tmp = y * 4.0d0
                                                                                                                                                        else if (z <= 1718.3088900824791d0) then
                                                                                                                                                            tmp = x * (-3.0d0)
                                                                                                                                                        else if (z <= 1.69063164059008d+58) then
                                                                                                                                                            tmp = t_0
                                                                                                                                                        else
                                                                                                                                                            tmp = y * (z * (-6.0d0))
                                                                                                                                                        end if
                                                                                                                                                        code = tmp
                                                                                                                                                    end function
                                                                                                                                                    
                                                                                                                                                    public static double code(double x, double y, double z) {
                                                                                                                                                    	double t_0 = z * (x * 6.0);
                                                                                                                                                    	double tmp;
                                                                                                                                                    	if (z <= -1.3998094315248038e-12) {
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	} else if (z <= -1.050551895330471e-127) {
                                                                                                                                                    		tmp = y * 4.0;
                                                                                                                                                    	} else if (z <= 1718.3088900824791) {
                                                                                                                                                    		tmp = x * -3.0;
                                                                                                                                                    	} else if (z <= 1.69063164059008e+58) {
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	} else {
                                                                                                                                                    		tmp = y * (z * -6.0);
                                                                                                                                                    	}
                                                                                                                                                    	return tmp;
                                                                                                                                                    }
                                                                                                                                                    
                                                                                                                                                    def code(x, y, z):
                                                                                                                                                    	t_0 = z * (x * 6.0)
                                                                                                                                                    	tmp = 0
                                                                                                                                                    	if z <= -1.3998094315248038e-12:
                                                                                                                                                    		tmp = t_0
                                                                                                                                                    	elif z <= -1.050551895330471e-127:
                                                                                                                                                    		tmp = y * 4.0
                                                                                                                                                    	elif z <= 1718.3088900824791:
                                                                                                                                                    		tmp = x * -3.0
                                                                                                                                                    	elif z <= 1.69063164059008e+58:
                                                                                                                                                    		tmp = t_0
                                                                                                                                                    	else:
                                                                                                                                                    		tmp = y * (z * -6.0)
                                                                                                                                                    	return tmp
                                                                                                                                                    
                                                                                                                                                    function code(x, y, z)
                                                                                                                                                    	t_0 = Float64(z * Float64(x * 6.0))
                                                                                                                                                    	tmp = 0.0
                                                                                                                                                    	if (z <= -1.3998094315248038e-12)
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	elseif (z <= -1.050551895330471e-127)
                                                                                                                                                    		tmp = Float64(y * 4.0);
                                                                                                                                                    	elseif (z <= 1718.3088900824791)
                                                                                                                                                    		tmp = Float64(x * -3.0);
                                                                                                                                                    	elseif (z <= 1.69063164059008e+58)
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	else
                                                                                                                                                    		tmp = Float64(y * Float64(z * -6.0));
                                                                                                                                                    	end
                                                                                                                                                    	return tmp
                                                                                                                                                    end
                                                                                                                                                    
                                                                                                                                                    function tmp_2 = code(x, y, z)
                                                                                                                                                    	t_0 = z * (x * 6.0);
                                                                                                                                                    	tmp = 0.0;
                                                                                                                                                    	if (z <= -1.3998094315248038e-12)
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	elseif (z <= -1.050551895330471e-127)
                                                                                                                                                    		tmp = y * 4.0;
                                                                                                                                                    	elseif (z <= 1718.3088900824791)
                                                                                                                                                    		tmp = x * -3.0;
                                                                                                                                                    	elseif (z <= 1.69063164059008e+58)
                                                                                                                                                    		tmp = t_0;
                                                                                                                                                    	else
                                                                                                                                                    		tmp = y * (z * -6.0);
                                                                                                                                                    	end
                                                                                                                                                    	tmp_2 = tmp;
                                                                                                                                                    end
                                                                                                                                                    
                                                                                                                                                    code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(x * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3998094315248038e-12], t$95$0, If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 1718.3088900824791], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 1.69063164059008e+58], t$95$0, N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]]]]]]
                                                                                                                                                    
                                                                                                                                                    f(x, y, z):
                                                                                                                                                    	x in [-inf, +inf],
                                                                                                                                                    	y in [-inf, +inf],
                                                                                                                                                    	z in [-inf, +inf]
                                                                                                                                                    code: THEORY
                                                                                                                                                    BEGIN
                                                                                                                                                    f(x, y, z: real): real =
                                                                                                                                                    	LET t_0 = (z * (x * (6))) IN
                                                                                                                                                    		LET tmp_3 = IF (z <= (16906316405900798750126587757919644890122804940982886334464)) THEN t_0 ELSE (y * (z * (-6))) ENDIF IN
                                                                                                                                                    		LET tmp_2 = IF (z <= (171830889008247913807281292974948883056640625e-41)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN
                                                                                                                                                    		LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN
                                                                                                                                                    		LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN t_0 ELSE tmp_1 ENDIF IN
                                                                                                                                                    	tmp
                                                                                                                                                    END code
                                                                                                                                                    \begin{array}{l}
                                                                                                                                                    t_0 := z \cdot \left(x \cdot 6\right)\\
                                                                                                                                                    \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
                                                                                                                                                    \;\;\;\;t\_0\\
                                                                                                                                                    
                                                                                                                                                    \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
                                                                                                                                                    \;\;\;\;y \cdot 4\\
                                                                                                                                                    
                                                                                                                                                    \mathbf{elif}\;z \leq 1718.3088900824791:\\
                                                                                                                                                    \;\;\;\;x \cdot -3\\
                                                                                                                                                    
                                                                                                                                                    \mathbf{elif}\;z \leq 1.69063164059008 \cdot 10^{+58}:\\
                                                                                                                                                    \;\;\;\;t\_0\\
                                                                                                                                                    
                                                                                                                                                    \mathbf{else}:\\
                                                                                                                                                    \;\;\;\;y \cdot \left(z \cdot -6\right)\\
                                                                                                                                                    
                                                                                                                                                    
                                                                                                                                                    \end{array}
                                                                                                                                                    
                                                                                                                                                    Derivation
                                                                                                                                                    1. Split input into 4 regimes
                                                                                                                                                    2. if z < -1.3998094315248038e-12 or 1718.3088900824791 < z < 1.6906316405900799e58

                                                                                                                                                      1. Initial program 99.5%

                                                                                                                                                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                      2. Taylor expanded in z around inf

                                                                                                                                                        \[\leadsto z \cdot \left(-6 \cdot \left(y - x\right) + \left(4 \cdot \frac{y - x}{z} + \frac{x}{z}\right)\right) \]
                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites79.4%

                                                                                                                                                          \[\leadsto z \cdot \mathsf{fma}\left(-6, y - x, \mathsf{fma}\left(4, \frac{y - x}{z}, \frac{x}{z}\right)\right) \]
                                                                                                                                                        2. Taylor expanded in x around inf

                                                                                                                                                          \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites42.8%

                                                                                                                                                            \[\leadsto z \cdot \left(x \cdot \left(6 - 3 \cdot \frac{1}{z}\right)\right) \]
                                                                                                                                                          2. Taylor expanded in z around inf

                                                                                                                                                            \[\leadsto z \cdot \left(x \cdot 6\right) \]
                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                            1. Applied rewrites27.9%

                                                                                                                                                              \[\leadsto z \cdot \left(x \cdot 6\right) \]

                                                                                                                                                            if -1.3998094315248038e-12 < z < -1.050551895330471e-127

                                                                                                                                                            1. Initial program 99.5%

                                                                                                                                                              \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                            2. Applied rewrites98.7%

                                                                                                                                                              \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                                                                                            3. Taylor expanded in z around inf

                                                                                                                                                              \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                              1. Applied rewrites50.7%

                                                                                                                                                                \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                                                                                              2. Taylor expanded in x around 0

                                                                                                                                                                \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                1. Applied rewrites50.8%

                                                                                                                                                                  \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                                                2. Taylor expanded in z around 0

                                                                                                                                                                  \[\leadsto y \cdot 4 \]
                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites26.0%

                                                                                                                                                                    \[\leadsto y \cdot 4 \]

                                                                                                                                                                  if -1.050551895330471e-127 < z < 1718.3088900824791

                                                                                                                                                                  1. Initial program 99.5%

                                                                                                                                                                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                  2. Taylor expanded in x around inf

                                                                                                                                                                    \[\leadsto x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right) \]
                                                                                                                                                                  3. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites52.7%

                                                                                                                                                                      \[\leadsto x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right) \]
                                                                                                                                                                    2. Taylor expanded in z around 0

                                                                                                                                                                      \[\leadsto x \cdot -3 \]
                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                      1. Applied rewrites26.9%

                                                                                                                                                                        \[\leadsto x \cdot -3 \]

                                                                                                                                                                      if 1.6906316405900799e58 < z

                                                                                                                                                                      1. Initial program 99.5%

                                                                                                                                                                        \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                      2. Taylor expanded in y around inf

                                                                                                                                                                        \[\leadsto y \cdot \left(-6 \cdot \frac{x \cdot \left(\frac{2}{3} - z\right)}{y} + \left(6 \cdot \left(\frac{2}{3} - z\right) + \frac{x}{y}\right)\right) \]
                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                        1. Applied rewrites84.0%

                                                                                                                                                                          \[\leadsto y \cdot \mathsf{fma}\left(-6, \frac{x \cdot \left(0.6666666666666666 - z\right)}{y}, \mathsf{fma}\left(6, 0.6666666666666666 - z, \frac{x}{y}\right)\right) \]
                                                                                                                                                                        2. Taylor expanded in z around inf

                                                                                                                                                                          \[\leadsto y \cdot \left(z \cdot \left(6 \cdot \frac{x}{y} - 6\right)\right) \]
                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                          1. Applied rewrites44.6%

                                                                                                                                                                            \[\leadsto y \cdot \left(z \cdot \left(6 \cdot \frac{x}{y} - 6\right)\right) \]
                                                                                                                                                                          2. Taylor expanded in x around 0

                                                                                                                                                                            \[\leadsto y \cdot \left(z \cdot -6\right) \]
                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                            1. Applied rewrites27.0%

                                                                                                                                                                              \[\leadsto y \cdot \left(z \cdot -6\right) \]
                                                                                                                                                                          4. Recombined 4 regimes into one program.
                                                                                                                                                                          5. Add Preprocessing

                                                                                                                                                                          Alternative 13: 50.0% accurate, 0.8× speedup?

                                                                                                                                                                          \[\begin{array}{l} t_0 := y \cdot \left(z \cdot -6\right)\\ \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;z \leq 2.314230314237776 \cdot 10^{-47}:\\ \;\;\;\;x \cdot -3\\ \mathbf{elif}\;z \leq 6330509882047881:\\ \;\;\;\;\mathsf{fma}\left(4, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                                                                                                                                                          (FPCore (x y z)
                                                                                                                                                                            :precision binary64
                                                                                                                                                                            :pre TRUE
                                                                                                                                                                            (let* ((t_0 (* y (* z -6.0))))
                                                                                                                                                                            (if (<= z -1.3998094315248038e-12)
                                                                                                                                                                              t_0
                                                                                                                                                                              (if (<= z -1.050551895330471e-127)
                                                                                                                                                                                (* y 4.0)
                                                                                                                                                                                (if (<= z 2.314230314237776e-47)
                                                                                                                                                                                  (* x -3.0)
                                                                                                                                                                                  (if (<= z 6330509882047881.0) (fma 4.0 y x) t_0))))))
                                                                                                                                                                          double code(double x, double y, double z) {
                                                                                                                                                                          	double t_0 = y * (z * -6.0);
                                                                                                                                                                          	double tmp;
                                                                                                                                                                          	if (z <= -1.3998094315248038e-12) {
                                                                                                                                                                          		tmp = t_0;
                                                                                                                                                                          	} else if (z <= -1.050551895330471e-127) {
                                                                                                                                                                          		tmp = y * 4.0;
                                                                                                                                                                          	} else if (z <= 2.314230314237776e-47) {
                                                                                                                                                                          		tmp = x * -3.0;
                                                                                                                                                                          	} else if (z <= 6330509882047881.0) {
                                                                                                                                                                          		tmp = fma(4.0, y, x);
                                                                                                                                                                          	} else {
                                                                                                                                                                          		tmp = t_0;
                                                                                                                                                                          	}
                                                                                                                                                                          	return tmp;
                                                                                                                                                                          }
                                                                                                                                                                          
                                                                                                                                                                          function code(x, y, z)
                                                                                                                                                                          	t_0 = Float64(y * Float64(z * -6.0))
                                                                                                                                                                          	tmp = 0.0
                                                                                                                                                                          	if (z <= -1.3998094315248038e-12)
                                                                                                                                                                          		tmp = t_0;
                                                                                                                                                                          	elseif (z <= -1.050551895330471e-127)
                                                                                                                                                                          		tmp = Float64(y * 4.0);
                                                                                                                                                                          	elseif (z <= 2.314230314237776e-47)
                                                                                                                                                                          		tmp = Float64(x * -3.0);
                                                                                                                                                                          	elseif (z <= 6330509882047881.0)
                                                                                                                                                                          		tmp = fma(4.0, y, x);
                                                                                                                                                                          	else
                                                                                                                                                                          		tmp = t_0;
                                                                                                                                                                          	end
                                                                                                                                                                          	return tmp
                                                                                                                                                                          end
                                                                                                                                                                          
                                                                                                                                                                          code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(z * -6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3998094315248038e-12], t$95$0, If[LessEqual[z, -1.050551895330471e-127], N[(y * 4.0), $MachinePrecision], If[LessEqual[z, 2.314230314237776e-47], N[(x * -3.0), $MachinePrecision], If[LessEqual[z, 6330509882047881.0], N[(4.0 * y + x), $MachinePrecision], t$95$0]]]]]
                                                                                                                                                                          
                                                                                                                                                                          f(x, y, z):
                                                                                                                                                                          	x in [-inf, +inf],
                                                                                                                                                                          	y in [-inf, +inf],
                                                                                                                                                                          	z in [-inf, +inf]
                                                                                                                                                                          code: THEORY
                                                                                                                                                                          BEGIN
                                                                                                                                                                          f(x, y, z: real): real =
                                                                                                                                                                          	LET t_0 = (y * (z * (-6))) IN
                                                                                                                                                                          		LET tmp_3 = IF (z <= (6330509882047881)) THEN (((4) * y) + x) ELSE t_0 ENDIF IN
                                                                                                                                                                          		LET tmp_2 = IF (z <= (2314230314237776030740359313533368911826288684043973744061838604739084076876766274501369988877454830434125501196230005780674066073743233573623001575469970703125e-206)) THEN (x * (-3)) ELSE tmp_3 ENDIF IN
                                                                                                                                                                          		LET tmp_1 = IF (z <= (-1050551895330471047199608142206847942357732978279208248232389758731369032790351714128791919766738354418709601815561898420283195865764132608462302944480244647500466272304783702797228706208907219767786163417990948949007926800056425776679222292577463792620097198985539428130018450260037434253250238048736143504913176371928784647025167942047119140625e-472)) THEN (y * (4)) ELSE tmp_2 ENDIF IN
                                                                                                                                                                          		LET tmp = IF (z <= (-13998094315248038436093144834835577130192907358008369556046091020107269287109375e-91)) THEN t_0 ELSE tmp_1 ENDIF IN
                                                                                                                                                                          	tmp
                                                                                                                                                                          END code
                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                          t_0 := y \cdot \left(z \cdot -6\right)\\
                                                                                                                                                                          \mathbf{if}\;z \leq -1.3998094315248038 \cdot 10^{-12}:\\
                                                                                                                                                                          \;\;\;\;t\_0\\
                                                                                                                                                                          
                                                                                                                                                                          \mathbf{elif}\;z \leq -1.050551895330471 \cdot 10^{-127}:\\
                                                                                                                                                                          \;\;\;\;y \cdot 4\\
                                                                                                                                                                          
                                                                                                                                                                          \mathbf{elif}\;z \leq 2.314230314237776 \cdot 10^{-47}:\\
                                                                                                                                                                          \;\;\;\;x \cdot -3\\
                                                                                                                                                                          
                                                                                                                                                                          \mathbf{elif}\;z \leq 6330509882047881:\\
                                                                                                                                                                          \;\;\;\;\mathsf{fma}\left(4, y, x\right)\\
                                                                                                                                                                          
                                                                                                                                                                          \mathbf{else}:\\
                                                                                                                                                                          \;\;\;\;t\_0\\
                                                                                                                                                                          
                                                                                                                                                                          
                                                                                                                                                                          \end{array}
                                                                                                                                                                          
                                                                                                                                                                          Derivation
                                                                                                                                                                          1. Split input into 4 regimes
                                                                                                                                                                          2. if z < -1.3998094315248038e-12 or 6330509882047881 < z

                                                                                                                                                                            1. Initial program 99.5%

                                                                                                                                                                              \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                            2. Taylor expanded in y around inf

                                                                                                                                                                              \[\leadsto y \cdot \left(-6 \cdot \frac{x \cdot \left(\frac{2}{3} - z\right)}{y} + \left(6 \cdot \left(\frac{2}{3} - z\right) + \frac{x}{y}\right)\right) \]
                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                              1. Applied rewrites84.0%

                                                                                                                                                                                \[\leadsto y \cdot \mathsf{fma}\left(-6, \frac{x \cdot \left(0.6666666666666666 - z\right)}{y}, \mathsf{fma}\left(6, 0.6666666666666666 - z, \frac{x}{y}\right)\right) \]
                                                                                                                                                                              2. Taylor expanded in z around inf

                                                                                                                                                                                \[\leadsto y \cdot \left(z \cdot \left(6 \cdot \frac{x}{y} - 6\right)\right) \]
                                                                                                                                                                              3. Step-by-step derivation
                                                                                                                                                                                1. Applied rewrites44.6%

                                                                                                                                                                                  \[\leadsto y \cdot \left(z \cdot \left(6 \cdot \frac{x}{y} - 6\right)\right) \]
                                                                                                                                                                                2. Taylor expanded in x around 0

                                                                                                                                                                                  \[\leadsto y \cdot \left(z \cdot -6\right) \]
                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                  1. Applied rewrites27.0%

                                                                                                                                                                                    \[\leadsto y \cdot \left(z \cdot -6\right) \]

                                                                                                                                                                                  if -1.3998094315248038e-12 < z < -1.050551895330471e-127

                                                                                                                                                                                  1. Initial program 99.5%

                                                                                                                                                                                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                                  2. Applied rewrites98.7%

                                                                                                                                                                                    \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                                                                                                                  3. Taylor expanded in z around inf

                                                                                                                                                                                    \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                                                                                                                  4. Step-by-step derivation
                                                                                                                                                                                    1. Applied rewrites50.7%

                                                                                                                                                                                      \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                                                                                                                    2. Taylor expanded in x around 0

                                                                                                                                                                                      \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                      1. Applied rewrites50.8%

                                                                                                                                                                                        \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                                                                      2. Taylor expanded in z around 0

                                                                                                                                                                                        \[\leadsto y \cdot 4 \]
                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                        1. Applied rewrites26.0%

                                                                                                                                                                                          \[\leadsto y \cdot 4 \]

                                                                                                                                                                                        if -1.050551895330471e-127 < z < 2.314230314237776e-47

                                                                                                                                                                                        1. Initial program 99.5%

                                                                                                                                                                                          \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                                        2. Taylor expanded in x around inf

                                                                                                                                                                                          \[\leadsto x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right) \]
                                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                                          1. Applied rewrites52.7%

                                                                                                                                                                                            \[\leadsto x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right) \]
                                                                                                                                                                                          2. Taylor expanded in z around 0

                                                                                                                                                                                            \[\leadsto x \cdot -3 \]
                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                            1. Applied rewrites26.9%

                                                                                                                                                                                              \[\leadsto x \cdot -3 \]

                                                                                                                                                                                            if 2.314230314237776e-47 < z < 6330509882047881

                                                                                                                                                                                            1. Initial program 99.5%

                                                                                                                                                                                              \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                                            2. Applied rewrites98.7%

                                                                                                                                                                                              \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                                                                                                                            3. Taylor expanded in z around 0

                                                                                                                                                                                              \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                                                              1. Applied rewrites50.9%

                                                                                                                                                                                                \[\leadsto \mathsf{fma}\left(-x, 4, \mathsf{fma}\left(4, y, x\right)\right) \]
                                                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                                                1. Applied rewrites50.9%

                                                                                                                                                                                                  \[\leadsto \mathsf{fma}\left(4, y - x, x\right) \]
                                                                                                                                                                                                2. Taylor expanded in x around 0

                                                                                                                                                                                                  \[\leadsto \mathsf{fma}\left(4, y, x\right) \]
                                                                                                                                                                                                3. Step-by-step derivation
                                                                                                                                                                                                  1. Applied rewrites25.7%

                                                                                                                                                                                                    \[\leadsto \mathsf{fma}\left(4, y, x\right) \]
                                                                                                                                                                                                4. Recombined 4 regimes into one program.
                                                                                                                                                                                                5. Add Preprocessing

                                                                                                                                                                                                Alternative 14: 37.0% accurate, 1.6× speedup?

                                                                                                                                                                                                \[\begin{array}{l} \mathbf{if}\;y \leq -3.1789006437251225 \cdot 10^{-121}:\\ \;\;\;\;y \cdot 4\\ \mathbf{elif}\;y \leq 6.850874518106612 \cdot 10^{+112}:\\ \;\;\;\;x \cdot -3\\ \mathbf{else}:\\ \;\;\;\;y \cdot 4\\ \end{array} \]
                                                                                                                                                                                                (FPCore (x y z)
                                                                                                                                                                                                  :precision binary64
                                                                                                                                                                                                  :pre TRUE
                                                                                                                                                                                                  (if (<= y -3.1789006437251225e-121)
                                                                                                                                                                                                  (* y 4.0)
                                                                                                                                                                                                  (if (<= y 6.850874518106612e+112) (* x -3.0) (* y 4.0))))
                                                                                                                                                                                                double code(double x, double y, double z) {
                                                                                                                                                                                                	double tmp;
                                                                                                                                                                                                	if (y <= -3.1789006437251225e-121) {
                                                                                                                                                                                                		tmp = y * 4.0;
                                                                                                                                                                                                	} else if (y <= 6.850874518106612e+112) {
                                                                                                                                                                                                		tmp = x * -3.0;
                                                                                                                                                                                                	} else {
                                                                                                                                                                                                		tmp = y * 4.0;
                                                                                                                                                                                                	}
                                                                                                                                                                                                	return tmp;
                                                                                                                                                                                                }
                                                                                                                                                                                                
                                                                                                                                                                                                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) :: tmp
                                                                                                                                                                                                    if (y <= (-3.1789006437251225d-121)) then
                                                                                                                                                                                                        tmp = y * 4.0d0
                                                                                                                                                                                                    else if (y <= 6.850874518106612d+112) then
                                                                                                                                                                                                        tmp = x * (-3.0d0)
                                                                                                                                                                                                    else
                                                                                                                                                                                                        tmp = y * 4.0d0
                                                                                                                                                                                                    end if
                                                                                                                                                                                                    code = tmp
                                                                                                                                                                                                end function
                                                                                                                                                                                                
                                                                                                                                                                                                public static double code(double x, double y, double z) {
                                                                                                                                                                                                	double tmp;
                                                                                                                                                                                                	if (y <= -3.1789006437251225e-121) {
                                                                                                                                                                                                		tmp = y * 4.0;
                                                                                                                                                                                                	} else if (y <= 6.850874518106612e+112) {
                                                                                                                                                                                                		tmp = x * -3.0;
                                                                                                                                                                                                	} else {
                                                                                                                                                                                                		tmp = y * 4.0;
                                                                                                                                                                                                	}
                                                                                                                                                                                                	return tmp;
                                                                                                                                                                                                }
                                                                                                                                                                                                
                                                                                                                                                                                                def code(x, y, z):
                                                                                                                                                                                                	tmp = 0
                                                                                                                                                                                                	if y <= -3.1789006437251225e-121:
                                                                                                                                                                                                		tmp = y * 4.0
                                                                                                                                                                                                	elif y <= 6.850874518106612e+112:
                                                                                                                                                                                                		tmp = x * -3.0
                                                                                                                                                                                                	else:
                                                                                                                                                                                                		tmp = y * 4.0
                                                                                                                                                                                                	return tmp
                                                                                                                                                                                                
                                                                                                                                                                                                function code(x, y, z)
                                                                                                                                                                                                	tmp = 0.0
                                                                                                                                                                                                	if (y <= -3.1789006437251225e-121)
                                                                                                                                                                                                		tmp = Float64(y * 4.0);
                                                                                                                                                                                                	elseif (y <= 6.850874518106612e+112)
                                                                                                                                                                                                		tmp = Float64(x * -3.0);
                                                                                                                                                                                                	else
                                                                                                                                                                                                		tmp = Float64(y * 4.0);
                                                                                                                                                                                                	end
                                                                                                                                                                                                	return tmp
                                                                                                                                                                                                end
                                                                                                                                                                                                
                                                                                                                                                                                                function tmp_2 = code(x, y, z)
                                                                                                                                                                                                	tmp = 0.0;
                                                                                                                                                                                                	if (y <= -3.1789006437251225e-121)
                                                                                                                                                                                                		tmp = y * 4.0;
                                                                                                                                                                                                	elseif (y <= 6.850874518106612e+112)
                                                                                                                                                                                                		tmp = x * -3.0;
                                                                                                                                                                                                	else
                                                                                                                                                                                                		tmp = y * 4.0;
                                                                                                                                                                                                	end
                                                                                                                                                                                                	tmp_2 = tmp;
                                                                                                                                                                                                end
                                                                                                                                                                                                
                                                                                                                                                                                                code[x_, y_, z_] := If[LessEqual[y, -3.1789006437251225e-121], N[(y * 4.0), $MachinePrecision], If[LessEqual[y, 6.850874518106612e+112], N[(x * -3.0), $MachinePrecision], N[(y * 4.0), $MachinePrecision]]]
                                                                                                                                                                                                
                                                                                                                                                                                                f(x, y, z):
                                                                                                                                                                                                	x in [-inf, +inf],
                                                                                                                                                                                                	y in [-inf, +inf],
                                                                                                                                                                                                	z in [-inf, +inf]
                                                                                                                                                                                                code: THEORY
                                                                                                                                                                                                BEGIN
                                                                                                                                                                                                f(x, y, z: real): real =
                                                                                                                                                                                                	LET tmp_1 = IF (y <= (68508745181066123989082494598625973818159535974472370974181792568369187592370785732721671702670460623062078324736)) THEN (x * (-3)) ELSE (y * (4)) ENDIF IN
                                                                                                                                                                                                	LET tmp = IF (y <= (-317890064372512247688549505960289038327131994036841110540962906769404769208261861273859496188680827898195998971673293543571635771856326931903294151350825970828578785356851668594094472897821047154192757309636993462550938766457344488919782973849942040385314528344684298108715298018078622305248627510909642523984075523912906646728515625e-453)) THEN (y * (4)) ELSE tmp_1 ENDIF IN
                                                                                                                                                                                                	tmp
                                                                                                                                                                                                END code
                                                                                                                                                                                                \begin{array}{l}
                                                                                                                                                                                                \mathbf{if}\;y \leq -3.1789006437251225 \cdot 10^{-121}:\\
                                                                                                                                                                                                \;\;\;\;y \cdot 4\\
                                                                                                                                                                                                
                                                                                                                                                                                                \mathbf{elif}\;y \leq 6.850874518106612 \cdot 10^{+112}:\\
                                                                                                                                                                                                \;\;\;\;x \cdot -3\\
                                                                                                                                                                                                
                                                                                                                                                                                                \mathbf{else}:\\
                                                                                                                                                                                                \;\;\;\;y \cdot 4\\
                                                                                                                                                                                                
                                                                                                                                                                                                
                                                                                                                                                                                                \end{array}
                                                                                                                                                                                                
                                                                                                                                                                                                Derivation
                                                                                                                                                                                                1. Split input into 2 regimes
                                                                                                                                                                                                2. if y < -3.1789006437251225e-121 or 6.8508745181066124e112 < y

                                                                                                                                                                                                  1. Initial program 99.5%

                                                                                                                                                                                                    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                                                  2. Applied rewrites98.7%

                                                                                                                                                                                                    \[\leadsto \mathsf{fma}\left(-x, \mathsf{fma}\left(-6, z, 4\right), \mathsf{fma}\left(\mathsf{fma}\left(-6, z, 4\right), y, x\right)\right) \]
                                                                                                                                                                                                  3. Taylor expanded in z around inf

                                                                                                                                                                                                    \[\leadsto z \cdot \left(-6 \cdot y + 6 \cdot x\right) \]
                                                                                                                                                                                                  4. Step-by-step derivation
                                                                                                                                                                                                    1. Applied rewrites50.7%

                                                                                                                                                                                                      \[\leadsto z \cdot \mathsf{fma}\left(-6, y, 6 \cdot x\right) \]
                                                                                                                                                                                                    2. Taylor expanded in x around 0

                                                                                                                                                                                                      \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                                                                                    3. Step-by-step derivation
                                                                                                                                                                                                      1. Applied rewrites50.8%

                                                                                                                                                                                                        \[\leadsto y \cdot \left(4 + -6 \cdot z\right) \]
                                                                                                                                                                                                      2. Taylor expanded in z around 0

                                                                                                                                                                                                        \[\leadsto y \cdot 4 \]
                                                                                                                                                                                                      3. Step-by-step derivation
                                                                                                                                                                                                        1. Applied rewrites26.0%

                                                                                                                                                                                                          \[\leadsto y \cdot 4 \]

                                                                                                                                                                                                        if -3.1789006437251225e-121 < y < 6.8508745181066124e112

                                                                                                                                                                                                        1. Initial program 99.5%

                                                                                                                                                                                                          \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                                                        2. Taylor expanded in x around inf

                                                                                                                                                                                                          \[\leadsto x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right) \]
                                                                                                                                                                                                        3. Step-by-step derivation
                                                                                                                                                                                                          1. Applied rewrites52.7%

                                                                                                                                                                                                            \[\leadsto x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right) \]
                                                                                                                                                                                                          2. Taylor expanded in z around 0

                                                                                                                                                                                                            \[\leadsto x \cdot -3 \]
                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                            1. Applied rewrites26.9%

                                                                                                                                                                                                              \[\leadsto x \cdot -3 \]
                                                                                                                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                                                                                                                          5. Add Preprocessing

                                                                                                                                                                                                          Alternative 15: 26.9% accurate, 4.7× speedup?

                                                                                                                                                                                                          \[x \cdot -3 \]
                                                                                                                                                                                                          (FPCore (x y z)
                                                                                                                                                                                                            :precision binary64
                                                                                                                                                                                                            :pre TRUE
                                                                                                                                                                                                            (* x -3.0))
                                                                                                                                                                                                          double code(double x, double y, double z) {
                                                                                                                                                                                                          	return x * -3.0;
                                                                                                                                                                                                          }
                                                                                                                                                                                                          
                                                                                                                                                                                                          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 * (-3.0d0)
                                                                                                                                                                                                          end function
                                                                                                                                                                                                          
                                                                                                                                                                                                          public static double code(double x, double y, double z) {
                                                                                                                                                                                                          	return x * -3.0;
                                                                                                                                                                                                          }
                                                                                                                                                                                                          
                                                                                                                                                                                                          def code(x, y, z):
                                                                                                                                                                                                          	return x * -3.0
                                                                                                                                                                                                          
                                                                                                                                                                                                          function code(x, y, z)
                                                                                                                                                                                                          	return Float64(x * -3.0)
                                                                                                                                                                                                          end
                                                                                                                                                                                                          
                                                                                                                                                                                                          function tmp = code(x, y, z)
                                                                                                                                                                                                          	tmp = x * -3.0;
                                                                                                                                                                                                          end
                                                                                                                                                                                                          
                                                                                                                                                                                                          code[x_, y_, z_] := N[(x * -3.0), $MachinePrecision]
                                                                                                                                                                                                          
                                                                                                                                                                                                          f(x, y, z):
                                                                                                                                                                                                          	x in [-inf, +inf],
                                                                                                                                                                                                          	y in [-inf, +inf],
                                                                                                                                                                                                          	z in [-inf, +inf]
                                                                                                                                                                                                          code: THEORY
                                                                                                                                                                                                          BEGIN
                                                                                                                                                                                                          f(x, y, z: real): real =
                                                                                                                                                                                                          	x * (-3)
                                                                                                                                                                                                          END code
                                                                                                                                                                                                          x \cdot -3
                                                                                                                                                                                                          
                                                                                                                                                                                                          Derivation
                                                                                                                                                                                                          1. Initial program 99.5%

                                                                                                                                                                                                            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right) \]
                                                                                                                                                                                                          2. Taylor expanded in x around inf

                                                                                                                                                                                                            \[\leadsto x \cdot \left(1 + -6 \cdot \left(\frac{2}{3} - z\right)\right) \]
                                                                                                                                                                                                          3. Step-by-step derivation
                                                                                                                                                                                                            1. Applied rewrites52.7%

                                                                                                                                                                                                              \[\leadsto x \cdot \left(1 + -6 \cdot \left(0.6666666666666666 - z\right)\right) \]
                                                                                                                                                                                                            2. Taylor expanded in z around 0

                                                                                                                                                                                                              \[\leadsto x \cdot -3 \]
                                                                                                                                                                                                            3. Step-by-step derivation
                                                                                                                                                                                                              1. Applied rewrites26.9%

                                                                                                                                                                                                                \[\leadsto x \cdot -3 \]
                                                                                                                                                                                                              2. Add Preprocessing

                                                                                                                                                                                                              Reproduce

                                                                                                                                                                                                              ?
                                                                                                                                                                                                              herbie shell --seed 2026092 
                                                                                                                                                                                                              (FPCore (x y z)
                                                                                                                                                                                                                :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
                                                                                                                                                                                                                :precision binary64
                                                                                                                                                                                                                (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))