Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, B

Percentage Accurate: 99.9% → 99.9%
Time: 3.1s
Alternatives: 10
Speedup: N/A×

Specification

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

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

\[x + \left(\cos y - \sin y \cdot z\right) \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (+ x (- (cos y) (* (sin y) z))))
double code(double x, double y, double z) {
	return x + (cos(y) - (sin(y) * 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 + (cos(y) - (sin(y) * z))
end function
public static double code(double x, double y, double z) {
	return x + (Math.cos(y) - (Math.sin(y) * z));
}
def code(x, y, z):
	return x + (math.cos(y) - (math.sin(y) * z))
function code(x, y, z)
	return Float64(x + Float64(cos(y) - Float64(sin(y) * z)))
end
function tmp = code(x, y, z)
	tmp = x + (cos(y) - (sin(y) * z));
end
code[x_, y_, z_] := N[(x + N[(N[Cos[y], $MachinePrecision] - N[(N[Sin[y], $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 + ((cos(y)) - ((sin(y)) * z))
END code
x + \left(\cos y - \sin y \cdot z\right)
Derivation
  1. Initial program 99.9%

    \[\left(x + \cos y\right) - z \cdot \sin y \]
  2. Step-by-step derivation
    1. Applied rewrites99.9%

      \[\leadsto x + \left(\cos y - \sin y \cdot z\right) \]
    2. Add Preprocessing

    Alternative 2: 98.6% accurate, 0.4× speedup?

    \[\begin{array}{l} t_0 := x + \cos y\\ t_1 := z \cdot \sin y\\ t_2 := t\_0 - t\_1\\ t_3 := \left(x + 1\right) - t\_1\\ \mathbf{if}\;t\_2 \leq -500:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 50000000000000:\\ \;\;\;\;\frac{x \cdot t\_0}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \]
    (FPCore (x y z)
      :precision binary64
      :pre TRUE
      (let* ((t_0 (+ x (cos y)))
           (t_1 (* z (sin y)))
           (t_2 (- t_0 t_1))
           (t_3 (- (+ x 1.0) t_1)))
      (if (<= t_2 -500.0)
        t_3
        (if (<= t_2 50000000000000.0) (/ (* x t_0) x) t_3))))
    double code(double x, double y, double z) {
    	double t_0 = x + cos(y);
    	double t_1 = z * sin(y);
    	double t_2 = t_0 - t_1;
    	double t_3 = (x + 1.0) - t_1;
    	double tmp;
    	if (t_2 <= -500.0) {
    		tmp = t_3;
    	} else if (t_2 <= 50000000000000.0) {
    		tmp = (x * t_0) / x;
    	} else {
    		tmp = t_3;
    	}
    	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) :: t_1
        real(8) :: t_2
        real(8) :: t_3
        real(8) :: tmp
        t_0 = x + cos(y)
        t_1 = z * sin(y)
        t_2 = t_0 - t_1
        t_3 = (x + 1.0d0) - t_1
        if (t_2 <= (-500.0d0)) then
            tmp = t_3
        else if (t_2 <= 50000000000000.0d0) then
            tmp = (x * t_0) / x
        else
            tmp = t_3
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = x + Math.cos(y);
    	double t_1 = z * Math.sin(y);
    	double t_2 = t_0 - t_1;
    	double t_3 = (x + 1.0) - t_1;
    	double tmp;
    	if (t_2 <= -500.0) {
    		tmp = t_3;
    	} else if (t_2 <= 50000000000000.0) {
    		tmp = (x * t_0) / x;
    	} else {
    		tmp = t_3;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = x + math.cos(y)
    	t_1 = z * math.sin(y)
    	t_2 = t_0 - t_1
    	t_3 = (x + 1.0) - t_1
    	tmp = 0
    	if t_2 <= -500.0:
    		tmp = t_3
    	elif t_2 <= 50000000000000.0:
    		tmp = (x * t_0) / x
    	else:
    		tmp = t_3
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(x + cos(y))
    	t_1 = Float64(z * sin(y))
    	t_2 = Float64(t_0 - t_1)
    	t_3 = Float64(Float64(x + 1.0) - t_1)
    	tmp = 0.0
    	if (t_2 <= -500.0)
    		tmp = t_3;
    	elseif (t_2 <= 50000000000000.0)
    		tmp = Float64(Float64(x * t_0) / x);
    	else
    		tmp = t_3;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = x + cos(y);
    	t_1 = z * sin(y);
    	t_2 = t_0 - t_1;
    	t_3 = (x + 1.0) - t_1;
    	tmp = 0.0;
    	if (t_2 <= -500.0)
    		tmp = t_3;
    	elseif (t_2 <= 50000000000000.0)
    		tmp = (x * t_0) / x;
    	else
    		tmp = t_3;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$0 - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x + 1.0), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -500.0], t$95$3, If[LessEqual[t$95$2, 50000000000000.0], N[(N[(x * t$95$0), $MachinePrecision] / x), $MachinePrecision], t$95$3]]]]]]
    
    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 + (cos(y))) IN
    		LET t_1 = (z * (sin(y))) IN
    			LET t_2 = (t_0 - t_1) IN
    				LET t_3 = ((x + (1)) - t_1) IN
    					LET tmp_1 = IF (t_2 <= (5e13)) THEN ((x * t_0) / x) ELSE t_3 ENDIF IN
    					LET tmp = IF (t_2 <= (-500)) THEN t_3 ELSE tmp_1 ENDIF IN
    	tmp
    END code
    \begin{array}{l}
    t_0 := x + \cos y\\
    t_1 := z \cdot \sin y\\
    t_2 := t\_0 - t\_1\\
    t_3 := \left(x + 1\right) - t\_1\\
    \mathbf{if}\;t\_2 \leq -500:\\
    \;\;\;\;t\_3\\
    
    \mathbf{elif}\;t\_2 \leq 50000000000000:\\
    \;\;\;\;\frac{x \cdot t\_0}{x}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_3\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -500 or 5e13 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y)))

      1. Initial program 99.9%

        \[\left(x + \cos y\right) - z \cdot \sin y \]
      2. Taylor expanded in y around 0

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

          \[\leadsto \left(x + 1\right) - z \cdot \sin y \]

        if -500 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 5e13

        1. Initial program 99.9%

          \[\left(x + \cos y\right) - z \cdot \sin y \]
        2. Step-by-step derivation
          1. Applied rewrites99.9%

            \[\leadsto x + \left(\cos y - \sin y \cdot z\right) \]
          2. Applied rewrites74.9%

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

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

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

          Alternative 3: 98.4% accurate, 0.4× speedup?

          \[\begin{array}{l} t_0 := z \cdot \sin y\\ t_1 := \left(x + \cos y\right) - t\_0\\ t_2 := \left(x + 1\right) - t\_0\\ \mathbf{if}\;t\_1 \leq -500:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0.9998:\\ \;\;\;\;\frac{x \cdot \cos y}{x}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
          (FPCore (x y z)
            :precision binary64
            :pre TRUE
            (let* ((t_0 (* z (sin y)))
                 (t_1 (- (+ x (cos y)) t_0))
                 (t_2 (- (+ x 1.0) t_0)))
            (if (<= t_1 -500.0)
              t_2
              (if (<= t_1 0.9998) (/ (* x (cos y)) x) t_2))))
          double code(double x, double y, double z) {
          	double t_0 = z * sin(y);
          	double t_1 = (x + cos(y)) - t_0;
          	double t_2 = (x + 1.0) - t_0;
          	double tmp;
          	if (t_1 <= -500.0) {
          		tmp = t_2;
          	} else if (t_1 <= 0.9998) {
          		tmp = (x * cos(y)) / x;
          	} else {
          		tmp = t_2;
          	}
          	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) :: t_1
              real(8) :: t_2
              real(8) :: tmp
              t_0 = z * sin(y)
              t_1 = (x + cos(y)) - t_0
              t_2 = (x + 1.0d0) - t_0
              if (t_1 <= (-500.0d0)) then
                  tmp = t_2
              else if (t_1 <= 0.9998d0) then
                  tmp = (x * cos(y)) / x
              else
                  tmp = t_2
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double t_0 = z * Math.sin(y);
          	double t_1 = (x + Math.cos(y)) - t_0;
          	double t_2 = (x + 1.0) - t_0;
          	double tmp;
          	if (t_1 <= -500.0) {
          		tmp = t_2;
          	} else if (t_1 <= 0.9998) {
          		tmp = (x * Math.cos(y)) / x;
          	} else {
          		tmp = t_2;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = z * math.sin(y)
          	t_1 = (x + math.cos(y)) - t_0
          	t_2 = (x + 1.0) - t_0
          	tmp = 0
          	if t_1 <= -500.0:
          		tmp = t_2
          	elif t_1 <= 0.9998:
          		tmp = (x * math.cos(y)) / x
          	else:
          		tmp = t_2
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(z * sin(y))
          	t_1 = Float64(Float64(x + cos(y)) - t_0)
          	t_2 = Float64(Float64(x + 1.0) - t_0)
          	tmp = 0.0
          	if (t_1 <= -500.0)
          		tmp = t_2;
          	elseif (t_1 <= 0.9998)
          		tmp = Float64(Float64(x * cos(y)) / x);
          	else
          		tmp = t_2;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	t_0 = z * sin(y);
          	t_1 = (x + cos(y)) - t_0;
          	t_2 = (x + 1.0) - t_0;
          	tmp = 0.0;
          	if (t_1 <= -500.0)
          		tmp = t_2;
          	elseif (t_1 <= 0.9998)
          		tmp = (x * cos(y)) / x;
          	else
          		tmp = t_2;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + 1.0), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, -500.0], t$95$2, If[LessEqual[t$95$1, 0.9998], N[(N[(x * N[Cos[y], $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], t$95$2]]]]]
          
          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 * (sin(y))) IN
          		LET t_1 = ((x + (cos(y))) - t_0) IN
          			LET t_2 = ((x + (1)) - t_0) IN
          				LET tmp_1 = IF (t_1 <= (999800000000000022026824808563105762004852294921875e-51)) THEN ((x * (cos(y))) / x) ELSE t_2 ENDIF IN
          				LET tmp = IF (t_1 <= (-500)) THEN t_2 ELSE tmp_1 ENDIF IN
          	tmp
          END code
          \begin{array}{l}
          t_0 := z \cdot \sin y\\
          t_1 := \left(x + \cos y\right) - t\_0\\
          t_2 := \left(x + 1\right) - t\_0\\
          \mathbf{if}\;t\_1 \leq -500:\\
          \;\;\;\;t\_2\\
          
          \mathbf{elif}\;t\_1 \leq 0.9998:\\
          \;\;\;\;\frac{x \cdot \cos y}{x}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_2\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -500 or 0.99980000000000002 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y)))

            1. Initial program 99.9%

              \[\left(x + \cos y\right) - z \cdot \sin y \]
            2. Taylor expanded in y around 0

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

                \[\leadsto \left(x + 1\right) - z \cdot \sin y \]

              if -500 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 0.99980000000000002

              1. Initial program 99.9%

                \[\left(x + \cos y\right) - z \cdot \sin y \]
              2. Step-by-step derivation
                1. Applied rewrites99.9%

                  \[\leadsto x + \left(\cos y - \sin y \cdot z\right) \]
                2. Applied rewrites74.9%

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

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

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

                    \[\leadsto \frac{x \cdot \cos y}{x} \]
                  3. Step-by-step derivation
                    1. Applied rewrites32.5%

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

                  Alternative 4: 72.2% accurate, 0.4× speedup?

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

                    1. Initial program 99.9%

                      \[\left(x + \cos y\right) - z \cdot \sin y \]
                    2. Taylor expanded in x around inf

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

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

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

                          \[\leadsto x \cdot \left(1 + \frac{1}{x}\right) \]
                        2. Applied rewrites61.8%

                          \[\leadsto x - -1 \]

                        if -500 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 0.99980000000000002

                        1. Initial program 99.9%

                          \[\left(x + \cos y\right) - z \cdot \sin y \]
                        2. Step-by-step derivation
                          1. Applied rewrites99.9%

                            \[\leadsto x + \left(\cos y - \sin y \cdot z\right) \]
                          2. Applied rewrites74.9%

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

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

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

                              \[\leadsto \frac{x \cdot \cos y}{x} \]
                            3. Step-by-step derivation
                              1. Applied rewrites32.5%

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

                            Alternative 5: 69.5% accurate, 1.7× speedup?

                            \[\begin{array}{l} t_0 := -\sin y \cdot z\\ \mathbf{if}\;z \leq -3.737729305523624 \cdot 10^{+231}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 1.7607919014336375 \cdot 10^{+58}:\\ \;\;\;\;x - -1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                            (FPCore (x y z)
                              :precision binary64
                              :pre TRUE
                              (let* ((t_0 (- (* (sin y) z))))
                              (if (<= z -3.737729305523624e+231)
                                t_0
                                (if (<= z 1.7607919014336375e+58) (- x -1.0) t_0))))
                            double code(double x, double y, double z) {
                            	double t_0 = -(sin(y) * z);
                            	double tmp;
                            	if (z <= -3.737729305523624e+231) {
                            		tmp = t_0;
                            	} else if (z <= 1.7607919014336375e+58) {
                            		tmp = x - -1.0;
                            	} 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 = -(sin(y) * z)
                                if (z <= (-3.737729305523624d+231)) then
                                    tmp = t_0
                                else if (z <= 1.7607919014336375d+58) then
                                    tmp = x - (-1.0d0)
                                else
                                    tmp = t_0
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z) {
                            	double t_0 = -(Math.sin(y) * z);
                            	double tmp;
                            	if (z <= -3.737729305523624e+231) {
                            		tmp = t_0;
                            	} else if (z <= 1.7607919014336375e+58) {
                            		tmp = x - -1.0;
                            	} else {
                            		tmp = t_0;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z):
                            	t_0 = -(math.sin(y) * z)
                            	tmp = 0
                            	if z <= -3.737729305523624e+231:
                            		tmp = t_0
                            	elif z <= 1.7607919014336375e+58:
                            		tmp = x - -1.0
                            	else:
                            		tmp = t_0
                            	return tmp
                            
                            function code(x, y, z)
                            	t_0 = Float64(-Float64(sin(y) * z))
                            	tmp = 0.0
                            	if (z <= -3.737729305523624e+231)
                            		tmp = t_0;
                            	elseif (z <= 1.7607919014336375e+58)
                            		tmp = Float64(x - -1.0);
                            	else
                            		tmp = t_0;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z)
                            	t_0 = -(sin(y) * z);
                            	tmp = 0.0;
                            	if (z <= -3.737729305523624e+231)
                            		tmp = t_0;
                            	elseif (z <= 1.7607919014336375e+58)
                            		tmp = x - -1.0;
                            	else
                            		tmp = t_0;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_] := Block[{t$95$0 = (-N[(N[Sin[y], $MachinePrecision] * z), $MachinePrecision])}, If[LessEqual[z, -3.737729305523624e+231], t$95$0, If[LessEqual[z, 1.7607919014336375e+58], N[(x - -1.0), $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 = (- ((sin(y)) * z)) IN
                            		LET tmp_1 = IF (z <= (17607919014336374748535380586874903373695221280381807362048)) THEN (x - (-1)) ELSE t_0 ENDIF IN
                            		LET tmp = IF (z <= (-3737729305523624032107527104040697113816461946576530999971219869223156379245005075091390095789724225462510454890464459924249846547795888638982488968222765902797659955335860345197956621663714593787998809591943458119245969122012430336)) THEN t_0 ELSE tmp_1 ENDIF IN
                            	tmp
                            END code
                            \begin{array}{l}
                            t_0 := -\sin y \cdot z\\
                            \mathbf{if}\;z \leq -3.737729305523624 \cdot 10^{+231}:\\
                            \;\;\;\;t\_0\\
                            
                            \mathbf{elif}\;z \leq 1.7607919014336375 \cdot 10^{+58}:\\
                            \;\;\;\;x - -1\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_0\\
                            
                            
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if z < -3.737729305523624e231 or 1.7607919014336375e58 < z

                              1. Initial program 99.9%

                                \[\left(x + \cos y\right) - z \cdot \sin y \]
                              2. Taylor expanded in z around inf

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

                                  \[\leadsto -1 \cdot \left(z \cdot \sin y\right) \]
                                2. Step-by-step derivation
                                  1. Applied rewrites28.3%

                                    \[\leadsto -\sin y \cdot z \]

                                  if -3.737729305523624e231 < z < 1.7607919014336375e58

                                  1. Initial program 99.9%

                                    \[\left(x + \cos y\right) - z \cdot \sin y \]
                                  2. Taylor expanded in x around inf

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

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

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

                                        \[\leadsto x \cdot \left(1 + \frac{1}{x}\right) \]
                                      2. Applied rewrites61.8%

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

                                    Alternative 6: 69.4% accurate, 2.5× speedup?

                                    \[\begin{array}{l} \mathbf{if}\;y \leq -2.77957140983966 \cdot 10^{+34}:\\ \;\;\;\;x - -1\\ \mathbf{elif}\;y \leq 0.0037464000066246743:\\ \;\;\;\;1 + \left(x + y \cdot \left(y \cdot \left(0.16666666666666666 \cdot \left(y \cdot z\right) - 0.5\right) - z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \]
                                    (FPCore (x y z)
                                      :precision binary64
                                      :pre TRUE
                                      (if (<= y -2.77957140983966e+34)
                                      (- x -1.0)
                                      (if (<= y 0.0037464000066246743)
                                        (+
                                         1.0
                                         (+ x (* y (- (* y (- (* 0.16666666666666666 (* y z)) 0.5)) z))))
                                        (- x -1.0))))
                                    double code(double x, double y, double z) {
                                    	double tmp;
                                    	if (y <= -2.77957140983966e+34) {
                                    		tmp = x - -1.0;
                                    	} else if (y <= 0.0037464000066246743) {
                                    		tmp = 1.0 + (x + (y * ((y * ((0.16666666666666666 * (y * z)) - 0.5)) - z)));
                                    	} else {
                                    		tmp = x - -1.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 <= (-2.77957140983966d+34)) then
                                            tmp = x - (-1.0d0)
                                        else if (y <= 0.0037464000066246743d0) then
                                            tmp = 1.0d0 + (x + (y * ((y * ((0.16666666666666666d0 * (y * z)) - 0.5d0)) - z)))
                                        else
                                            tmp = x - (-1.0d0)
                                        end if
                                        code = tmp
                                    end function
                                    
                                    public static double code(double x, double y, double z) {
                                    	double tmp;
                                    	if (y <= -2.77957140983966e+34) {
                                    		tmp = x - -1.0;
                                    	} else if (y <= 0.0037464000066246743) {
                                    		tmp = 1.0 + (x + (y * ((y * ((0.16666666666666666 * (y * z)) - 0.5)) - z)));
                                    	} else {
                                    		tmp = x - -1.0;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    def code(x, y, z):
                                    	tmp = 0
                                    	if y <= -2.77957140983966e+34:
                                    		tmp = x - -1.0
                                    	elif y <= 0.0037464000066246743:
                                    		tmp = 1.0 + (x + (y * ((y * ((0.16666666666666666 * (y * z)) - 0.5)) - z)))
                                    	else:
                                    		tmp = x - -1.0
                                    	return tmp
                                    
                                    function code(x, y, z)
                                    	tmp = 0.0
                                    	if (y <= -2.77957140983966e+34)
                                    		tmp = Float64(x - -1.0);
                                    	elseif (y <= 0.0037464000066246743)
                                    		tmp = Float64(1.0 + Float64(x + Float64(y * Float64(Float64(y * Float64(Float64(0.16666666666666666 * Float64(y * z)) - 0.5)) - z))));
                                    	else
                                    		tmp = Float64(x - -1.0);
                                    	end
                                    	return tmp
                                    end
                                    
                                    function tmp_2 = code(x, y, z)
                                    	tmp = 0.0;
                                    	if (y <= -2.77957140983966e+34)
                                    		tmp = x - -1.0;
                                    	elseif (y <= 0.0037464000066246743)
                                    		tmp = 1.0 + (x + (y * ((y * ((0.16666666666666666 * (y * z)) - 0.5)) - z)));
                                    	else
                                    		tmp = x - -1.0;
                                    	end
                                    	tmp_2 = tmp;
                                    end
                                    
                                    code[x_, y_, z_] := If[LessEqual[y, -2.77957140983966e+34], N[(x - -1.0), $MachinePrecision], If[LessEqual[y, 0.0037464000066246743], N[(1.0 + N[(x + N[(y * N[(N[(y * N[(N[(0.16666666666666666 * N[(y * z), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - -1.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 <= (3746400006624674323962853605962664005346596240997314453125e-60)) THEN ((1) + (x + (y * ((y * (((1666666666666666574148081281236954964697360992431640625e-55) * (y * z)) - (5e-1))) - z)))) ELSE (x - (-1)) ENDIF IN
                                    	LET tmp = IF (y <= (-27795714098396601956655166650318848)) THEN (x - (-1)) ELSE tmp_1 ENDIF IN
                                    	tmp
                                    END code
                                    \begin{array}{l}
                                    \mathbf{if}\;y \leq -2.77957140983966 \cdot 10^{+34}:\\
                                    \;\;\;\;x - -1\\
                                    
                                    \mathbf{elif}\;y \leq 0.0037464000066246743:\\
                                    \;\;\;\;1 + \left(x + y \cdot \left(y \cdot \left(0.16666666666666666 \cdot \left(y \cdot z\right) - 0.5\right) - z\right)\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x - -1\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if y < -2.7795714098396602e34 or 0.0037464000066246743 < y

                                      1. Initial program 99.9%

                                        \[\left(x + \cos y\right) - z \cdot \sin y \]
                                      2. Taylor expanded in x around inf

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

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

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

                                            \[\leadsto x \cdot \left(1 + \frac{1}{x}\right) \]
                                          2. Applied rewrites61.8%

                                            \[\leadsto x - -1 \]

                                          if -2.7795714098396602e34 < y < 0.0037464000066246743

                                          1. Initial program 99.9%

                                            \[\left(x + \cos y\right) - z \cdot \sin y \]
                                          2. Taylor expanded in y around 0

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

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

                                          Alternative 7: 69.1% accurate, 4.7× speedup?

                                          \[\begin{array}{l} \mathbf{if}\;y \leq -7.202250336853939 \cdot 10^{+61}:\\ \;\;\;\;x - -1\\ \mathbf{elif}\;y \leq 3.7534046655014413 \cdot 10^{+58}:\\ \;\;\;\;x - \mathsf{fma}\left(z, y, -1\right)\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \]
                                          (FPCore (x y z)
                                            :precision binary64
                                            :pre TRUE
                                            (if (<= y -7.202250336853939e+61)
                                            (- x -1.0)
                                            (if (<= y 3.7534046655014413e+58) (- x (fma z y -1.0)) (- x -1.0))))
                                          double code(double x, double y, double z) {
                                          	double tmp;
                                          	if (y <= -7.202250336853939e+61) {
                                          		tmp = x - -1.0;
                                          	} else if (y <= 3.7534046655014413e+58) {
                                          		tmp = x - fma(z, y, -1.0);
                                          	} else {
                                          		tmp = x - -1.0;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(x, y, z)
                                          	tmp = 0.0
                                          	if (y <= -7.202250336853939e+61)
                                          		tmp = Float64(x - -1.0);
                                          	elseif (y <= 3.7534046655014413e+58)
                                          		tmp = Float64(x - fma(z, y, -1.0));
                                          	else
                                          		tmp = Float64(x - -1.0);
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[x_, y_, z_] := If[LessEqual[y, -7.202250336853939e+61], N[(x - -1.0), $MachinePrecision], If[LessEqual[y, 3.7534046655014413e+58], N[(x - N[(z * y + -1.0), $MachinePrecision]), $MachinePrecision], N[(x - -1.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 <= (37534046655014413318163465982650524569175125961626804551680)) THEN (x - ((z * y) + (-1))) ELSE (x - (-1)) ENDIF IN
                                          	LET tmp = IF (y <= (-72022503368539393057692374051802676984285611840510104690491392)) THEN (x - (-1)) ELSE tmp_1 ENDIF IN
                                          	tmp
                                          END code
                                          \begin{array}{l}
                                          \mathbf{if}\;y \leq -7.202250336853939 \cdot 10^{+61}:\\
                                          \;\;\;\;x - -1\\
                                          
                                          \mathbf{elif}\;y \leq 3.7534046655014413 \cdot 10^{+58}:\\
                                          \;\;\;\;x - \mathsf{fma}\left(z, y, -1\right)\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;x - -1\\
                                          
                                          
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if y < -7.2022503368539393e61 or 3.7534046655014413e58 < y

                                            1. Initial program 99.9%

                                              \[\left(x + \cos y\right) - z \cdot \sin y \]
                                            2. Taylor expanded in x around inf

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

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

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

                                                  \[\leadsto x \cdot \left(1 + \frac{1}{x}\right) \]
                                                2. Applied rewrites61.8%

                                                  \[\leadsto x - -1 \]

                                                if -7.2022503368539393e61 < y < 3.7534046655014413e58

                                                1. Initial program 99.9%

                                                  \[\left(x + \cos y\right) - z \cdot \sin y \]
                                                2. Taylor expanded in y around 0

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

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

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

                                                  Alternative 8: 61.8% accurate, 21.2× speedup?

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

                                                    \[\left(x + \cos y\right) - z \cdot \sin y \]
                                                  2. Taylor expanded in x around inf

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

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

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

                                                        \[\leadsto x \cdot \left(1 + \frac{1}{x}\right) \]
                                                      2. Applied rewrites61.8%

                                                        \[\leadsto x - -1 \]
                                                      3. Add Preprocessing

                                                      Alternative 9: 61.1% accurate, 0.5× speedup?

                                                      \[\begin{array}{l} t_0 := \left(x + \cos y\right) - z \cdot \sin y\\ t_1 := -\left(-x\right)\\ \mathbf{if}\;t\_0 \leq -0.05:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 2:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
                                                      (FPCore (x y z)
                                                        :precision binary64
                                                        :pre TRUE
                                                        (let* ((t_0 (- (+ x (cos y)) (* z (sin y)))) (t_1 (- (- x))))
                                                        (if (<= t_0 -0.05) t_1 (if (<= t_0 2.0) 1.0 t_1))))
                                                      double code(double x, double y, double z) {
                                                      	double t_0 = (x + cos(y)) - (z * sin(y));
                                                      	double t_1 = -(-x);
                                                      	double tmp;
                                                      	if (t_0 <= -0.05) {
                                                      		tmp = t_1;
                                                      	} else if (t_0 <= 2.0) {
                                                      		tmp = 1.0;
                                                      	} else {
                                                      		tmp = t_1;
                                                      	}
                                                      	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) :: t_1
                                                          real(8) :: tmp
                                                          t_0 = (x + cos(y)) - (z * sin(y))
                                                          t_1 = -(-x)
                                                          if (t_0 <= (-0.05d0)) then
                                                              tmp = t_1
                                                          else if (t_0 <= 2.0d0) then
                                                              tmp = 1.0d0
                                                          else
                                                              tmp = t_1
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double x, double y, double z) {
                                                      	double t_0 = (x + Math.cos(y)) - (z * Math.sin(y));
                                                      	double t_1 = -(-x);
                                                      	double tmp;
                                                      	if (t_0 <= -0.05) {
                                                      		tmp = t_1;
                                                      	} else if (t_0 <= 2.0) {
                                                      		tmp = 1.0;
                                                      	} else {
                                                      		tmp = t_1;
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x, y, z):
                                                      	t_0 = (x + math.cos(y)) - (z * math.sin(y))
                                                      	t_1 = -(-x)
                                                      	tmp = 0
                                                      	if t_0 <= -0.05:
                                                      		tmp = t_1
                                                      	elif t_0 <= 2.0:
                                                      		tmp = 1.0
                                                      	else:
                                                      		tmp = t_1
                                                      	return tmp
                                                      
                                                      function code(x, y, z)
                                                      	t_0 = Float64(Float64(x + cos(y)) - Float64(z * sin(y)))
                                                      	t_1 = Float64(-Float64(-x))
                                                      	tmp = 0.0
                                                      	if (t_0 <= -0.05)
                                                      		tmp = t_1;
                                                      	elseif (t_0 <= 2.0)
                                                      		tmp = 1.0;
                                                      	else
                                                      		tmp = t_1;
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(x, y, z)
                                                      	t_0 = (x + cos(y)) - (z * sin(y));
                                                      	t_1 = -(-x);
                                                      	tmp = 0.0;
                                                      	if (t_0 <= -0.05)
                                                      		tmp = t_1;
                                                      	elseif (t_0 <= 2.0)
                                                      		tmp = 1.0;
                                                      	else
                                                      		tmp = t_1;
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = (-(-x))}, If[LessEqual[t$95$0, -0.05], t$95$1, If[LessEqual[t$95$0, 2.0], 1.0, 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 = ((x + (cos(y))) - (z * (sin(y)))) IN
                                                      		LET t_1 = (- (- x)) IN
                                                      			LET tmp_1 = IF (t_0 <= (2)) THEN (1) ELSE t_1 ENDIF IN
                                                      			LET tmp = IF (t_0 <= (-5000000000000000277555756156289135105907917022705078125e-56)) THEN t_1 ELSE tmp_1 ENDIF IN
                                                      	tmp
                                                      END code
                                                      \begin{array}{l}
                                                      t_0 := \left(x + \cos y\right) - z \cdot \sin y\\
                                                      t_1 := -\left(-x\right)\\
                                                      \mathbf{if}\;t\_0 \leq -0.05:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      \mathbf{elif}\;t\_0 \leq 2:\\
                                                      \;\;\;\;1\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;t\_1\\
                                                      
                                                      
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -0.050000000000000003 or 2 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y)))

                                                        1. Initial program 99.9%

                                                          \[\left(x + \cos y\right) - z \cdot \sin y \]
                                                        2. Taylor expanded in y around 0

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

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

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

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

                                                              \[\leadsto -1 \cdot \left(-1 \cdot x\right) \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites42.4%

                                                                \[\leadsto -1 \cdot \left(-1 \cdot x\right) \]
                                                              2. Step-by-step derivation
                                                                1. Applied rewrites42.4%

                                                                  \[\leadsto -\left(-x\right) \]

                                                                if -0.050000000000000003 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 2

                                                                1. Initial program 99.9%

                                                                  \[\left(x + \cos y\right) - z \cdot \sin y \]
                                                                2. Taylor expanded in x around inf

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

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

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

                                                                      \[\leadsto x \cdot \left(1 + \frac{1}{x}\right) \]
                                                                    2. Applied rewrites61.8%

                                                                      \[\leadsto x - -1 \]
                                                                    3. Taylor expanded in x around 0

                                                                      \[\leadsto 1 \]
                                                                    4. Step-by-step derivation
                                                                      1. Applied rewrites21.8%

                                                                        \[\leadsto 1 \]
                                                                    5. Recombined 2 regimes into one program.
                                                                    6. Add Preprocessing

                                                                    Alternative 10: 21.8% accurate, 76.4× speedup?

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

                                                                      \[\left(x + \cos y\right) - z \cdot \sin y \]
                                                                    2. Taylor expanded in x around inf

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

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

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

                                                                          \[\leadsto x \cdot \left(1 + \frac{1}{x}\right) \]
                                                                        2. Applied rewrites61.8%

                                                                          \[\leadsto x - -1 \]
                                                                        3. Taylor expanded in x around 0

                                                                          \[\leadsto 1 \]
                                                                        4. Step-by-step derivation
                                                                          1. Applied rewrites21.8%

                                                                            \[\leadsto 1 \]
                                                                          2. Add Preprocessing

                                                                          Reproduce

                                                                          ?
                                                                          herbie shell --seed 2026092 
                                                                          (FPCore (x y z)
                                                                            :name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, B"
                                                                            :precision binary64
                                                                            (- (+ x (cos y)) (* z (sin y))))