Diagrams.TwoD.Segment.Bernstein:evaluateBernstein from diagrams-lib-1.3.0.3

Percentage Accurate: 88.1% → 99.3%
Time: 2.3s
Alternatives: 9
Speedup: 0.7×

Specification

?
\[\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z} \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (/ (* x (+ (- y z) 1.0)) z))
double code(double x, double y, double z) {
	return (x * ((y - z) + 1.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 - z) + 1.0d0)) / z
end function
public static double code(double x, double y, double z) {
	return (x * ((y - z) + 1.0)) / z;
}
def code(x, y, z):
	return (x * ((y - z) + 1.0)) / z
function code(x, y, z)
	return Float64(Float64(x * Float64(Float64(y - z) + 1.0)) / z)
end
function tmp = code(x, y, z)
	tmp = (x * ((y - z) + 1.0)) / z;
end
code[x_, y_, z_] := N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $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) + (1))) / z
END code
\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z}

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

\[\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z} \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (/ (* x (+ (- y z) 1.0)) z))
double code(double x, double y, double z) {
	return (x * ((y - z) + 1.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 - z) + 1.0d0)) / z
end function
public static double code(double x, double y, double z) {
	return (x * ((y - z) + 1.0)) / z;
}
def code(x, y, z):
	return (x * ((y - z) + 1.0)) / z
function code(x, y, z)
	return Float64(Float64(x * Float64(Float64(y - z) + 1.0)) / z)
end
function tmp = code(x, y, z)
	tmp = (x * ((y - z) + 1.0)) / z;
end
code[x_, y_, z_] := N[(N[(x * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $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) + (1))) / z
END code
\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z}

Alternative 1: 99.3% accurate, 0.7× speedup?

\[\begin{array}{l} t_0 := x \cdot \left(\frac{y}{z} - 1\right)\\ \mathbf{if}\;z \leq -1.0949064619604638:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 0.9573463146759508:\\ \;\;\;\;\frac{\mathsf{fma}\left(y - z, x, x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (let* ((t_0 (* x (- (/ y z) 1.0))))
  (if (<= z -1.0949064619604638)
    t_0
    (if (<= z 0.9573463146759508) (/ (fma (- y z) x x) z) t_0))))
double code(double x, double y, double z) {
	double t_0 = x * ((y / z) - 1.0);
	double tmp;
	if (z <= -1.0949064619604638) {
		tmp = t_0;
	} else if (z <= 0.9573463146759508) {
		tmp = fma((y - z), x, x) / z;
	} else {
		tmp = t_0;
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(x * Float64(Float64(y / z) - 1.0))
	tmp = 0.0
	if (z <= -1.0949064619604638)
		tmp = t_0;
	elseif (z <= 0.9573463146759508)
		tmp = Float64(fma(Float64(y - z), x, x) / z);
	else
		tmp = t_0;
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[(y / z), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.0949064619604638], t$95$0, If[LessEqual[z, 0.9573463146759508], N[(N[(N[(y - z), $MachinePrecision] * x + x), $MachinePrecision] / z), $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 = (x * ((y / z) - (1))) IN
		LET tmp_1 = IF (z <= (95734631467595077136678582974127493798732757568359375e-53)) THEN ((((y - z) * x) + x) / z) ELSE t_0 ENDIF IN
		LET tmp = IF (z <= (-10949064619604638171068700103205628693103790283203125e-52)) THEN t_0 ELSE tmp_1 ENDIF IN
	tmp
END code
\begin{array}{l}
t_0 := x \cdot \left(\frac{y}{z} - 1\right)\\
\mathbf{if}\;z \leq -1.0949064619604638:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 0.9573463146759508:\\
\;\;\;\;\frac{\mathsf{fma}\left(y - z, x, x\right)}{z}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.0949064619604638 or 0.95734631467595077 < z

    1. Initial program 88.1%

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

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

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

          \[\leadsto x \cdot \left(\frac{y}{z} - 1\right) \]

        if -1.0949064619604638 < z < 0.95734631467595077

        1. Initial program 88.1%

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

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

        Alternative 2: 99.0% accurate, 0.5× speedup?

        \[\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 3.301862850080923 \cdot 10^{-103}:\\ \;\;\;\;\frac{\left|x\right| \cdot \left(\left(y - z\right) + 1\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\left|x\right| \cdot \left(\frac{y - -1}{z} - 1\right)\\ \end{array} \]
        (FPCore (x y z)
          :precision binary64
          :pre TRUE
          (*
         (copysign 1.0 x)
         (if (<= (fabs x) 3.301862850080923e-103)
           (/ (* (fabs x) (+ (- y z) 1.0)) z)
           (* (fabs x) (- (/ (- y -1.0) z) 1.0)))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (fabs(x) <= 3.301862850080923e-103) {
        		tmp = (fabs(x) * ((y - z) + 1.0)) / z;
        	} else {
        		tmp = fabs(x) * (((y - -1.0) / z) - 1.0);
        	}
        	return copysign(1.0, x) * tmp;
        }
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (Math.abs(x) <= 3.301862850080923e-103) {
        		tmp = (Math.abs(x) * ((y - z) + 1.0)) / z;
        	} else {
        		tmp = Math.abs(x) * (((y - -1.0) / z) - 1.0);
        	}
        	return Math.copySign(1.0, x) * tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if math.fabs(x) <= 3.301862850080923e-103:
        		tmp = (math.fabs(x) * ((y - z) + 1.0)) / z
        	else:
        		tmp = math.fabs(x) * (((y - -1.0) / z) - 1.0)
        	return math.copysign(1.0, x) * tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (abs(x) <= 3.301862850080923e-103)
        		tmp = Float64(Float64(abs(x) * Float64(Float64(y - z) + 1.0)) / z);
        	else
        		tmp = Float64(abs(x) * Float64(Float64(Float64(y - -1.0) / z) - 1.0));
        	end
        	return Float64(copysign(1.0, x) * tmp)
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (abs(x) <= 3.301862850080923e-103)
        		tmp = (abs(x) * ((y - z) + 1.0)) / z;
        	else
        		tmp = abs(x) * (((y - -1.0) / z) - 1.0);
        	end
        	tmp_2 = (sign(x) * abs(1.0)) * tmp;
        end
        
        code[x_, y_, z_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 3.301862850080923e-103], N[(N[(N[Abs[x], $MachinePrecision] * N[(N[(y - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[Abs[x], $MachinePrecision] * N[(N[(N[(y - -1.0), $MachinePrecision] / z), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
        \mathbf{if}\;\left|x\right| \leq 3.301862850080923 \cdot 10^{-103}:\\
        \;\;\;\;\frac{\left|x\right| \cdot \left(\left(y - z\right) + 1\right)}{z}\\
        
        \mathbf{else}:\\
        \;\;\;\;\left|x\right| \cdot \left(\frac{y - -1}{z} - 1\right)\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if x < 3.301862850080923e-103

          1. Initial program 88.1%

            \[\frac{x \cdot \left(\left(y - z\right) + 1\right)}{z} \]

          if 3.301862850080923e-103 < x

          1. Initial program 88.1%

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

              \[\leadsto x \cdot \left(\frac{y - -1}{z} - 1\right) \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 3: 99.0% accurate, 0.5× speedup?

          \[\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 3.301862850080923 \cdot 10^{-103}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y - z, \left|x\right|, \left|x\right|\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;\left|x\right| \cdot \left(\frac{y - -1}{z} - 1\right)\\ \end{array} \]
          (FPCore (x y z)
            :precision binary64
            :pre TRUE
            (*
           (copysign 1.0 x)
           (if (<= (fabs x) 3.301862850080923e-103)
             (/ (fma (- y z) (fabs x) (fabs x)) z)
             (* (fabs x) (- (/ (- y -1.0) z) 1.0)))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (fabs(x) <= 3.301862850080923e-103) {
          		tmp = fma((y - z), fabs(x), fabs(x)) / z;
          	} else {
          		tmp = fabs(x) * (((y - -1.0) / z) - 1.0);
          	}
          	return copysign(1.0, x) * tmp;
          }
          
          function code(x, y, z)
          	tmp = 0.0
          	if (abs(x) <= 3.301862850080923e-103)
          		tmp = Float64(fma(Float64(y - z), abs(x), abs(x)) / z);
          	else
          		tmp = Float64(abs(x) * Float64(Float64(Float64(y - -1.0) / z) - 1.0));
          	end
          	return Float64(copysign(1.0, x) * tmp)
          end
          
          code[x_, y_, z_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 3.301862850080923e-103], N[(N[(N[(y - z), $MachinePrecision] * N[Abs[x], $MachinePrecision] + N[Abs[x], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], N[(N[Abs[x], $MachinePrecision] * N[(N[(N[(y - -1.0), $MachinePrecision] / z), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
          
          \mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
          \mathbf{if}\;\left|x\right| \leq 3.301862850080923 \cdot 10^{-103}:\\
          \;\;\;\;\frac{\mathsf{fma}\left(y - z, \left|x\right|, \left|x\right|\right)}{z}\\
          
          \mathbf{else}:\\
          \;\;\;\;\left|x\right| \cdot \left(\frac{y - -1}{z} - 1\right)\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < 3.301862850080923e-103

            1. Initial program 88.1%

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

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

              if 3.301862850080923e-103 < x

              1. Initial program 88.1%

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

                  \[\leadsto x \cdot \left(\frac{y - -1}{z} - 1\right) \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 4: 98.8% accurate, 0.7× speedup?

              \[\begin{array}{l} t_0 := x \cdot \left(\frac{y}{z} - 1\right)\\ \mathbf{if}\;z \leq -1.0949064619604638:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 0.9573463146759508:\\ \;\;\;\;\frac{x \cdot \left(1 + y\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
              (FPCore (x y z)
                :precision binary64
                :pre TRUE
                (let* ((t_0 (* x (- (/ y z) 1.0))))
                (if (<= z -1.0949064619604638)
                  t_0
                  (if (<= z 0.9573463146759508) (/ (* x (+ 1.0 y)) z) t_0))))
              double code(double x, double y, double z) {
              	double t_0 = x * ((y / z) - 1.0);
              	double tmp;
              	if (z <= -1.0949064619604638) {
              		tmp = t_0;
              	} else if (z <= 0.9573463146759508) {
              		tmp = (x * (1.0 + y)) / z;
              	} else {
              		tmp = t_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 = x * ((y / z) - 1.0d0)
                  if (z <= (-1.0949064619604638d0)) then
                      tmp = t_0
                  else if (z <= 0.9573463146759508d0) then
                      tmp = (x * (1.0d0 + y)) / z
                  else
                      tmp = t_0
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z) {
              	double t_0 = x * ((y / z) - 1.0);
              	double tmp;
              	if (z <= -1.0949064619604638) {
              		tmp = t_0;
              	} else if (z <= 0.9573463146759508) {
              		tmp = (x * (1.0 + y)) / z;
              	} else {
              		tmp = t_0;
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	t_0 = x * ((y / z) - 1.0)
              	tmp = 0
              	if z <= -1.0949064619604638:
              		tmp = t_0
              	elif z <= 0.9573463146759508:
              		tmp = (x * (1.0 + y)) / z
              	else:
              		tmp = t_0
              	return tmp
              
              function code(x, y, z)
              	t_0 = Float64(x * Float64(Float64(y / z) - 1.0))
              	tmp = 0.0
              	if (z <= -1.0949064619604638)
              		tmp = t_0;
              	elseif (z <= 0.9573463146759508)
              		tmp = Float64(Float64(x * Float64(1.0 + y)) / z);
              	else
              		tmp = t_0;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z)
              	t_0 = x * ((y / z) - 1.0);
              	tmp = 0.0;
              	if (z <= -1.0949064619604638)
              		tmp = t_0;
              	elseif (z <= 0.9573463146759508)
              		tmp = (x * (1.0 + y)) / z;
              	else
              		tmp = t_0;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(N[(y / z), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.0949064619604638], t$95$0, If[LessEqual[z, 0.9573463146759508], N[(N[(x * N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / z), $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 = (x * ((y / z) - (1))) IN
              		LET tmp_1 = IF (z <= (95734631467595077136678582974127493798732757568359375e-53)) THEN ((x * ((1) + y)) / z) ELSE t_0 ENDIF IN
              		LET tmp = IF (z <= (-10949064619604638171068700103205628693103790283203125e-52)) THEN t_0 ELSE tmp_1 ENDIF IN
              	tmp
              END code
              \begin{array}{l}
              t_0 := x \cdot \left(\frac{y}{z} - 1\right)\\
              \mathbf{if}\;z \leq -1.0949064619604638:\\
              \;\;\;\;t\_0\\
              
              \mathbf{elif}\;z \leq 0.9573463146759508:\\
              \;\;\;\;\frac{x \cdot \left(1 + y\right)}{z}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_0\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -1.0949064619604638 or 0.95734631467595077 < z

                1. Initial program 88.1%

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

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

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

                      \[\leadsto x \cdot \left(\frac{y}{z} - 1\right) \]

                    if -1.0949064619604638 < z < 0.95734631467595077

                    1. Initial program 88.1%

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

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

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

                    Alternative 5: 85.4% accurate, 0.7× speedup?

                    \[\begin{array}{l} \mathbf{if}\;y \leq -1052465834960.0807:\\ \;\;\;\;\frac{x \cdot \left(1 + y\right)}{z}\\ \mathbf{elif}\;y \leq 3.727054120548146 \cdot 10^{+47}:\\ \;\;\;\;x \cdot \frac{1 - z}{z}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \end{array} \]
                    (FPCore (x y z)
                      :precision binary64
                      :pre TRUE
                      (if (<= y -1052465834960.0807)
                      (/ (* x (+ 1.0 y)) z)
                      (if (<= y 3.727054120548146e+47)
                        (* x (/ (- 1.0 z) z))
                        (/ (* x y) z))))
                    double code(double x, double y, double z) {
                    	double tmp;
                    	if (y <= -1052465834960.0807) {
                    		tmp = (x * (1.0 + y)) / z;
                    	} else if (y <= 3.727054120548146e+47) {
                    		tmp = x * ((1.0 - z) / z);
                    	} else {
                    		tmp = (x * 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 (y <= (-1052465834960.0807d0)) then
                            tmp = (x * (1.0d0 + y)) / z
                        else if (y <= 3.727054120548146d+47) then
                            tmp = x * ((1.0d0 - z) / z)
                        else
                            tmp = (x * y) / z
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z) {
                    	double tmp;
                    	if (y <= -1052465834960.0807) {
                    		tmp = (x * (1.0 + y)) / z;
                    	} else if (y <= 3.727054120548146e+47) {
                    		tmp = x * ((1.0 - z) / z);
                    	} else {
                    		tmp = (x * y) / z;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z):
                    	tmp = 0
                    	if y <= -1052465834960.0807:
                    		tmp = (x * (1.0 + y)) / z
                    	elif y <= 3.727054120548146e+47:
                    		tmp = x * ((1.0 - z) / z)
                    	else:
                    		tmp = (x * y) / z
                    	return tmp
                    
                    function code(x, y, z)
                    	tmp = 0.0
                    	if (y <= -1052465834960.0807)
                    		tmp = Float64(Float64(x * Float64(1.0 + y)) / z);
                    	elseif (y <= 3.727054120548146e+47)
                    		tmp = Float64(x * Float64(Float64(1.0 - z) / z));
                    	else
                    		tmp = Float64(Float64(x * y) / z);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z)
                    	tmp = 0.0;
                    	if (y <= -1052465834960.0807)
                    		tmp = (x * (1.0 + y)) / z;
                    	elseif (y <= 3.727054120548146e+47)
                    		tmp = x * ((1.0 - z) / z);
                    	else
                    		tmp = (x * y) / z;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_] := If[LessEqual[y, -1052465834960.0807], N[(N[(x * N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 3.727054120548146e+47], N[(x * N[(N[(1.0 - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x * y), $MachinePrecision] / z), $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 <= (372705412054814616519807377301979582364609675264)) THEN (x * (((1) - z) / z)) ELSE ((x * y) / z) ENDIF IN
                    	LET tmp = IF (y <= (-10524658349600806884765625e-13)) THEN ((x * ((1) + y)) / z) ELSE tmp_1 ENDIF IN
                    	tmp
                    END code
                    \begin{array}{l}
                    \mathbf{if}\;y \leq -1052465834960.0807:\\
                    \;\;\;\;\frac{x \cdot \left(1 + y\right)}{z}\\
                    
                    \mathbf{elif}\;y \leq 3.727054120548146 \cdot 10^{+47}:\\
                    \;\;\;\;x \cdot \frac{1 - z}{z}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{x \cdot y}{z}\\
                    
                    
                    \end{array}
                    
                    Derivation
                    1. Split input into 3 regimes
                    2. if y < -1052465834960.0807

                      1. Initial program 88.1%

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

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

                          \[\leadsto \frac{x \cdot \left(1 + y\right)}{z} \]

                        if -1052465834960.0807 < y < 3.7270541205481462e47

                        1. Initial program 88.1%

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

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

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

                              \[\leadsto x \cdot \frac{1 - z}{z} \]

                            if 3.7270541205481462e47 < y

                            1. Initial program 88.1%

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

                              \[\leadsto \frac{x \cdot y}{z} \]
                            3. Step-by-step derivation
                              1. Applied rewrites37.9%

                                \[\leadsto \frac{x \cdot y}{z} \]
                            4. Recombined 3 regimes into one program.
                            5. Add Preprocessing

                            Alternative 6: 85.4% accurate, 0.7× speedup?

                            \[\begin{array}{l} t_0 := \frac{x \cdot y}{z}\\ \mathbf{if}\;y \leq -1052465834960.0807:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 3.727054120548146 \cdot 10^{+47}:\\ \;\;\;\;x \cdot \frac{1 - z}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                            (FPCore (x y z)
                              :precision binary64
                              :pre TRUE
                              (let* ((t_0 (/ (* x y) z)))
                              (if (<= y -1052465834960.0807)
                                t_0
                                (if (<= y 3.727054120548146e+47) (* x (/ (- 1.0 z) z)) t_0))))
                            double code(double x, double y, double z) {
                            	double t_0 = (x * y) / z;
                            	double tmp;
                            	if (y <= -1052465834960.0807) {
                            		tmp = t_0;
                            	} else if (y <= 3.727054120548146e+47) {
                            		tmp = x * ((1.0 - z) / z);
                            	} else {
                            		tmp = t_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 = (x * y) / z
                                if (y <= (-1052465834960.0807d0)) then
                                    tmp = t_0
                                else if (y <= 3.727054120548146d+47) then
                                    tmp = x * ((1.0d0 - z) / z)
                                else
                                    tmp = t_0
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z) {
                            	double t_0 = (x * y) / z;
                            	double tmp;
                            	if (y <= -1052465834960.0807) {
                            		tmp = t_0;
                            	} else if (y <= 3.727054120548146e+47) {
                            		tmp = x * ((1.0 - z) / z);
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z):
                            	t_0 = (x * y) / z
                            	tmp = 0
                            	if y <= -1052465834960.0807:
                            		tmp = t_0
                            	elif y <= 3.727054120548146e+47:
                            		tmp = x * ((1.0 - z) / z)
                            	else:
                            		tmp = t_0
                            	return tmp
                            
                            function code(x, y, z)
                            	t_0 = Float64(Float64(x * y) / z)
                            	tmp = 0.0
                            	if (y <= -1052465834960.0807)
                            		tmp = t_0;
                            	elseif (y <= 3.727054120548146e+47)
                            		tmp = Float64(x * Float64(Float64(1.0 - z) / z));
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z)
                            	t_0 = (x * y) / z;
                            	tmp = 0.0;
                            	if (y <= -1052465834960.0807)
                            		tmp = t_0;
                            	elseif (y <= 3.727054120548146e+47)
                            		tmp = x * ((1.0 - z) / z);
                            	else
                            		tmp = t_0;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -1052465834960.0807], t$95$0, If[LessEqual[y, 3.727054120548146e+47], N[(x * N[(N[(1.0 - z), $MachinePrecision] / z), $MachinePrecision]), $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 = ((x * y) / z) IN
                            		LET tmp_1 = IF (y <= (372705412054814616519807377301979582364609675264)) THEN (x * (((1) - z) / z)) ELSE t_0 ENDIF IN
                            		LET tmp = IF (y <= (-10524658349600806884765625e-13)) THEN t_0 ELSE tmp_1 ENDIF IN
                            	tmp
                            END code
                            \begin{array}{l}
                            t_0 := \frac{x \cdot y}{z}\\
                            \mathbf{if}\;y \leq -1052465834960.0807:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;y \leq 3.727054120548146 \cdot 10^{+47}:\\
                            \;\;\;\;x \cdot \frac{1 - z}{z}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if y < -1052465834960.0807 or 3.7270541205481462e47 < y

                              1. Initial program 88.1%

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

                                \[\leadsto \frac{x \cdot y}{z} \]
                              3. Step-by-step derivation
                                1. Applied rewrites37.9%

                                  \[\leadsto \frac{x \cdot y}{z} \]

                                if -1052465834960.0807 < y < 3.7270541205481462e47

                                1. Initial program 88.1%

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

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

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

                                      \[\leadsto x \cdot \frac{1 - z}{z} \]
                                  3. Recombined 2 regimes into one program.
                                  4. Add Preprocessing

                                  Alternative 7: 61.2% accurate, 0.6× speedup?

                                  \[\begin{array}{l} t_0 := \frac{x \cdot y}{z}\\ \mathbf{if}\;y \leq -1052465834960.0807:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 7.825512041966673 \cdot 10^{-241}:\\ \;\;\;\;-x\\ \mathbf{elif}\;y \leq 6.0861756995371585 \cdot 10^{-56}:\\ \;\;\;\;\frac{x \cdot 1}{z}\\ \mathbf{elif}\;y \leq 1.3602103140396139 \cdot 10^{+44}:\\ \;\;\;\;-x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                  (FPCore (x y z)
                                    :precision binary64
                                    :pre TRUE
                                    (let* ((t_0 (/ (* x y) z)))
                                    (if (<= y -1052465834960.0807)
                                      t_0
                                      (if (<= y 7.825512041966673e-241)
                                        (- x)
                                        (if (<= y 6.0861756995371585e-56)
                                          (/ (* x 1.0) z)
                                          (if (<= y 1.3602103140396139e+44) (- x) t_0))))))
                                  double code(double x, double y, double z) {
                                  	double t_0 = (x * y) / z;
                                  	double tmp;
                                  	if (y <= -1052465834960.0807) {
                                  		tmp = t_0;
                                  	} else if (y <= 7.825512041966673e-241) {
                                  		tmp = -x;
                                  	} else if (y <= 6.0861756995371585e-56) {
                                  		tmp = (x * 1.0) / z;
                                  	} else if (y <= 1.3602103140396139e+44) {
                                  		tmp = -x;
                                  	} else {
                                  		tmp = t_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 = (x * y) / z
                                      if (y <= (-1052465834960.0807d0)) then
                                          tmp = t_0
                                      else if (y <= 7.825512041966673d-241) then
                                          tmp = -x
                                      else if (y <= 6.0861756995371585d-56) then
                                          tmp = (x * 1.0d0) / z
                                      else if (y <= 1.3602103140396139d+44) then
                                          tmp = -x
                                      else
                                          tmp = t_0
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z) {
                                  	double t_0 = (x * y) / z;
                                  	double tmp;
                                  	if (y <= -1052465834960.0807) {
                                  		tmp = t_0;
                                  	} else if (y <= 7.825512041966673e-241) {
                                  		tmp = -x;
                                  	} else if (y <= 6.0861756995371585e-56) {
                                  		tmp = (x * 1.0) / z;
                                  	} else if (y <= 1.3602103140396139e+44) {
                                  		tmp = -x;
                                  	} else {
                                  		tmp = t_0;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z):
                                  	t_0 = (x * y) / z
                                  	tmp = 0
                                  	if y <= -1052465834960.0807:
                                  		tmp = t_0
                                  	elif y <= 7.825512041966673e-241:
                                  		tmp = -x
                                  	elif y <= 6.0861756995371585e-56:
                                  		tmp = (x * 1.0) / z
                                  	elif y <= 1.3602103140396139e+44:
                                  		tmp = -x
                                  	else:
                                  		tmp = t_0
                                  	return tmp
                                  
                                  function code(x, y, z)
                                  	t_0 = Float64(Float64(x * y) / z)
                                  	tmp = 0.0
                                  	if (y <= -1052465834960.0807)
                                  		tmp = t_0;
                                  	elseif (y <= 7.825512041966673e-241)
                                  		tmp = Float64(-x);
                                  	elseif (y <= 6.0861756995371585e-56)
                                  		tmp = Float64(Float64(x * 1.0) / z);
                                  	elseif (y <= 1.3602103140396139e+44)
                                  		tmp = Float64(-x);
                                  	else
                                  		tmp = t_0;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z)
                                  	t_0 = (x * y) / z;
                                  	tmp = 0.0;
                                  	if (y <= -1052465834960.0807)
                                  		tmp = t_0;
                                  	elseif (y <= 7.825512041966673e-241)
                                  		tmp = -x;
                                  	elseif (y <= 6.0861756995371585e-56)
                                  		tmp = (x * 1.0) / z;
                                  	elseif (y <= 1.3602103140396139e+44)
                                  		tmp = -x;
                                  	else
                                  		tmp = t_0;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -1052465834960.0807], t$95$0, If[LessEqual[y, 7.825512041966673e-241], (-x), If[LessEqual[y, 6.0861756995371585e-56], N[(N[(x * 1.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[y, 1.3602103140396139e+44], (-x), 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 = ((x * y) / z) IN
                                  		LET tmp_3 = IF (y <= (136021031403961389778144811202915211990269952)) THEN (- x) ELSE t_0 ENDIF IN
                                  		LET tmp_2 = IF (y <= (608617569953715847383020142152988646781552843501122468032166573672501320793423505102428259776529128880760695395406714041436981769938238391419449424546428417670540511608123779296875e-235)) THEN ((x * (1)) / z) ELSE tmp_3 ENDIF IN
                                  		LET tmp_1 = IF (y <= (7825512041966672853149061833024848145741259471463953425826701928316354299253894443550887647529617691555103045178802084223083459417946424089739317184876326987001071549707527866686728894636015048777119092755314859418168216300370683768453778626869184118617999897889083656479568842149493187419723569635941958900192777263669597812333509821604562802585264287045052093868863129252771099469561515609955651810464521184628675804317382262977929440836678740169207983042177878508192938504170462873121645352354516050952872232896749133362868281044303818523710009449241007670861370606150975159920335499919019639492034912109375e-850)) THEN (- x) ELSE tmp_2 ENDIF IN
                                  		LET tmp = IF (y <= (-10524658349600806884765625e-13)) THEN t_0 ELSE tmp_1 ENDIF IN
                                  	tmp
                                  END code
                                  \begin{array}{l}
                                  t_0 := \frac{x \cdot y}{z}\\
                                  \mathbf{if}\;y \leq -1052465834960.0807:\\
                                  \;\;\;\;t\_0\\
                                  
                                  \mathbf{elif}\;y \leq 7.825512041966673 \cdot 10^{-241}:\\
                                  \;\;\;\;-x\\
                                  
                                  \mathbf{elif}\;y \leq 6.0861756995371585 \cdot 10^{-56}:\\
                                  \;\;\;\;\frac{x \cdot 1}{z}\\
                                  
                                  \mathbf{elif}\;y \leq 1.3602103140396139 \cdot 10^{+44}:\\
                                  \;\;\;\;-x\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_0\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 3 regimes
                                  2. if y < -1052465834960.0807 or 1.3602103140396139e44 < y

                                    1. Initial program 88.1%

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

                                      \[\leadsto \frac{x \cdot y}{z} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites37.9%

                                        \[\leadsto \frac{x \cdot y}{z} \]

                                      if -1052465834960.0807 < y < 7.8255120419666729e-241 or 6.0861756995371585e-56 < y < 1.3602103140396139e44

                                      1. Initial program 88.1%

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

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

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

                                            \[\leadsto -x \]

                                          if 7.8255120419666729e-241 < y < 6.0861756995371585e-56

                                          1. Initial program 88.1%

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

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

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

                                              \[\leadsto \frac{x \cdot 1}{z} \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites29.6%

                                                \[\leadsto \frac{x \cdot 1}{z} \]
                                            4. Recombined 3 regimes into one program.
                                            5. Add Preprocessing

                                            Alternative 8: 61.0% accurate, 0.8× speedup?

                                            \[\begin{array}{l} t_0 := \frac{x \cdot y}{z}\\ \mathbf{if}\;y \leq -1052465834960.0807:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 1.3602103140396139 \cdot 10^{+44}:\\ \;\;\;\;-x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                                            (FPCore (x y z)
                                              :precision binary64
                                              :pre TRUE
                                              (let* ((t_0 (/ (* x y) z)))
                                              (if (<= y -1052465834960.0807)
                                                t_0
                                                (if (<= y 1.3602103140396139e+44) (- x) t_0))))
                                            double code(double x, double y, double z) {
                                            	double t_0 = (x * y) / z;
                                            	double tmp;
                                            	if (y <= -1052465834960.0807) {
                                            		tmp = t_0;
                                            	} else if (y <= 1.3602103140396139e+44) {
                                            		tmp = -x;
                                            	} else {
                                            		tmp = t_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 = (x * y) / z
                                                if (y <= (-1052465834960.0807d0)) then
                                                    tmp = t_0
                                                else if (y <= 1.3602103140396139d+44) then
                                                    tmp = -x
                                                else
                                                    tmp = t_0
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z) {
                                            	double t_0 = (x * y) / z;
                                            	double tmp;
                                            	if (y <= -1052465834960.0807) {
                                            		tmp = t_0;
                                            	} else if (y <= 1.3602103140396139e+44) {
                                            		tmp = -x;
                                            	} else {
                                            		tmp = t_0;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z):
                                            	t_0 = (x * y) / z
                                            	tmp = 0
                                            	if y <= -1052465834960.0807:
                                            		tmp = t_0
                                            	elif y <= 1.3602103140396139e+44:
                                            		tmp = -x
                                            	else:
                                            		tmp = t_0
                                            	return tmp
                                            
                                            function code(x, y, z)
                                            	t_0 = Float64(Float64(x * y) / z)
                                            	tmp = 0.0
                                            	if (y <= -1052465834960.0807)
                                            		tmp = t_0;
                                            	elseif (y <= 1.3602103140396139e+44)
                                            		tmp = Float64(-x);
                                            	else
                                            		tmp = t_0;
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z)
                                            	t_0 = (x * y) / z;
                                            	tmp = 0.0;
                                            	if (y <= -1052465834960.0807)
                                            		tmp = t_0;
                                            	elseif (y <= 1.3602103140396139e+44)
                                            		tmp = -x;
                                            	else
                                            		tmp = t_0;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[y, -1052465834960.0807], t$95$0, If[LessEqual[y, 1.3602103140396139e+44], (-x), 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 = ((x * y) / z) IN
                                            		LET tmp_1 = IF (y <= (136021031403961389778144811202915211990269952)) THEN (- x) ELSE t_0 ENDIF IN
                                            		LET tmp = IF (y <= (-10524658349600806884765625e-13)) THEN t_0 ELSE tmp_1 ENDIF IN
                                            	tmp
                                            END code
                                            \begin{array}{l}
                                            t_0 := \frac{x \cdot y}{z}\\
                                            \mathbf{if}\;y \leq -1052465834960.0807:\\
                                            \;\;\;\;t\_0\\
                                            
                                            \mathbf{elif}\;y \leq 1.3602103140396139 \cdot 10^{+44}:\\
                                            \;\;\;\;-x\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;t\_0\\
                                            
                                            
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if y < -1052465834960.0807 or 1.3602103140396139e44 < y

                                              1. Initial program 88.1%

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

                                                \[\leadsto \frac{x \cdot y}{z} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites37.9%

                                                  \[\leadsto \frac{x \cdot y}{z} \]

                                                if -1052465834960.0807 < y < 1.3602103140396139e44

                                                1. Initial program 88.1%

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

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

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

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

                                                  Alternative 9: 39.3% accurate, 6.5× speedup?

                                                  \[-x \]
                                                  (FPCore (x y z)
                                                    :precision binary64
                                                    :pre TRUE
                                                    (- x))
                                                  double code(double x, double y, double z) {
                                                  	return -x;
                                                  }
                                                  
                                                  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
                                                  end function
                                                  
                                                  public static double code(double x, double y, double z) {
                                                  	return -x;
                                                  }
                                                  
                                                  def code(x, y, z):
                                                  	return -x
                                                  
                                                  function code(x, y, z)
                                                  	return Float64(-x)
                                                  end
                                                  
                                                  function tmp = code(x, y, z)
                                                  	tmp = -x;
                                                  end
                                                  
                                                  code[x_, y_, z_] := (-x)
                                                  
                                                  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
                                                  END code
                                                  -x
                                                  
                                                  Derivation
                                                  1. Initial program 88.1%

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

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

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

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

                                                      Reproduce

                                                      ?
                                                      herbie shell --seed 2026092 
                                                      (FPCore (x y z)
                                                        :name "Diagrams.TwoD.Segment.Bernstein:evaluateBernstein from diagrams-lib-1.3.0.3"
                                                        :precision binary64
                                                        (/ (* x (+ (- y z) 1.0)) z))