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

Percentage Accurate: 99.9% → 99.9%
Time: 3.4s
Alternatives: 12
Speedup: 1.0×

Specification

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

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

      \[\leadsto \sin y + \mathsf{fma}\left(\cos y, z, x\right) \]
    2. Add Preprocessing

    Alternative 2: 90.2% accurate, 0.9× speedup?

    \[\begin{array}{l} t_0 := \left(x + \sin y\right) + z\\ \mathbf{if}\;x \leq -1.2064225709139271 \cdot 10^{-51}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;x \leq 1.3907246641268288 \cdot 10^{-133}:\\ \;\;\;\;\mathsf{fma}\left(z, \cos y, \sin y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
    (FPCore (x y z)
      :precision binary64
      :pre TRUE
      (let* ((t_0 (+ (+ x (sin y)) z)))
      (if (<= x -1.2064225709139271e-51)
        t_0
        (if (<= x 1.3907246641268288e-133) (fma z (cos y) (sin y)) t_0))))
    double code(double x, double y, double z) {
    	double t_0 = (x + sin(y)) + z;
    	double tmp;
    	if (x <= -1.2064225709139271e-51) {
    		tmp = t_0;
    	} else if (x <= 1.3907246641268288e-133) {
    		tmp = fma(z, cos(y), sin(y));
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	t_0 = Float64(Float64(x + sin(y)) + z)
    	tmp = 0.0
    	if (x <= -1.2064225709139271e-51)
    		tmp = t_0;
    	elseif (x <= 1.3907246641268288e-133)
    		tmp = fma(z, cos(y), sin(y));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -1.2064225709139271e-51], t$95$0, If[LessEqual[x, 1.3907246641268288e-133], N[(z * N[Cos[y], $MachinePrecision] + N[Sin[y], $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 + (sin(y))) + z) IN
    		LET tmp_1 = IF (x <= (13907246641268287719553288589367698732274009277678938853341083963550402305825730272558285284260707557226592286720658421468340914383077588215032524302117800378662076704866440675793204111827833749549383931163536547600078549247750976353053708772891633938598045310131695191357079148094045872458853184477607279647119117250357415993544663024295005016028881072998046875e-494)) THEN ((z * (cos(y))) + (sin(y))) ELSE t_0 ENDIF IN
    		LET tmp = IF (x <= (-1206422570913927125523414655424086006973612323856849477897271803401450903142584014094535191051817179243784378392130538577803905582984389521783441523439250886440277099609375e-222)) THEN t_0 ELSE tmp_1 ENDIF IN
    	tmp
    END code
    \begin{array}{l}
    t_0 := \left(x + \sin y\right) + z\\
    \mathbf{if}\;x \leq -1.2064225709139271 \cdot 10^{-51}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;x \leq 1.3907246641268288 \cdot 10^{-133}:\\
    \;\;\;\;\mathsf{fma}\left(z, \cos y, \sin y\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if x < -1.2064225709139271e-51 or 1.3907246641268288e-133 < x

      1. Initial program 99.9%

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

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

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

        if -1.2064225709139271e-51 < x < 1.3907246641268288e-133

        1. Initial program 99.9%

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

          \[\leadsto \sin y + z \cdot \cos y \]
        3. Step-by-step derivation
          1. Applied rewrites58.7%

            \[\leadsto \sin y + z \cdot \cos y \]
          2. Step-by-step derivation
            1. Applied rewrites58.7%

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

          Alternative 3: 89.6% accurate, 1.4× speedup?

          \[\begin{array}{l} t_0 := z \cdot \cos y\\ \mathbf{if}\;z \leq -5.28748223434074 \cdot 10^{+73}:\\ \;\;\;\;\left(x + y\right) + t\_0\\ \mathbf{elif}\;z \leq 9.798786776982002 \cdot 10^{+41}:\\ \;\;\;\;\left(x + \sin y\right) + z\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\frac{1}{t\_0}}\\ \end{array} \]
          (FPCore (x y z)
            :precision binary64
            :pre TRUE
            (let* ((t_0 (* z (cos y))))
            (if (<= z -5.28748223434074e+73)
              (+ (+ x y) t_0)
              (if (<= z 9.798786776982002e+41)
                (+ (+ x (sin y)) z)
                (/ 1.0 (/ 1.0 t_0))))))
          double code(double x, double y, double z) {
          	double t_0 = z * cos(y);
          	double tmp;
          	if (z <= -5.28748223434074e+73) {
          		tmp = (x + y) + t_0;
          	} else if (z <= 9.798786776982002e+41) {
          		tmp = (x + sin(y)) + z;
          	} else {
          		tmp = 1.0 / (1.0 / 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 = z * cos(y)
              if (z <= (-5.28748223434074d+73)) then
                  tmp = (x + y) + t_0
              else if (z <= 9.798786776982002d+41) then
                  tmp = (x + sin(y)) + z
              else
                  tmp = 1.0d0 / (1.0d0 / t_0)
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double t_0 = z * Math.cos(y);
          	double tmp;
          	if (z <= -5.28748223434074e+73) {
          		tmp = (x + y) + t_0;
          	} else if (z <= 9.798786776982002e+41) {
          		tmp = (x + Math.sin(y)) + z;
          	} else {
          		tmp = 1.0 / (1.0 / t_0);
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = z * math.cos(y)
          	tmp = 0
          	if z <= -5.28748223434074e+73:
          		tmp = (x + y) + t_0
          	elif z <= 9.798786776982002e+41:
          		tmp = (x + math.sin(y)) + z
          	else:
          		tmp = 1.0 / (1.0 / t_0)
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(z * cos(y))
          	tmp = 0.0
          	if (z <= -5.28748223434074e+73)
          		tmp = Float64(Float64(x + y) + t_0);
          	elseif (z <= 9.798786776982002e+41)
          		tmp = Float64(Float64(x + sin(y)) + z);
          	else
          		tmp = Float64(1.0 / Float64(1.0 / t_0));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	t_0 = z * cos(y);
          	tmp = 0.0;
          	if (z <= -5.28748223434074e+73)
          		tmp = (x + y) + t_0;
          	elseif (z <= 9.798786776982002e+41)
          		tmp = (x + sin(y)) + z;
          	else
          		tmp = 1.0 / (1.0 / t_0);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.28748223434074e+73], N[(N[(x + y), $MachinePrecision] + t$95$0), $MachinePrecision], If[LessEqual[z, 9.798786776982002e+41], N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision], N[(1.0 / N[(1.0 / t$95$0), $MachinePrecision]), $MachinePrecision]]]]
          
          f(x, y, z):
          	x in [-inf, +inf],
          	y in [-inf, +inf],
          	z in [-inf, +inf]
          code: THEORY
          BEGIN
          f(x, y, z: real): real =
          	LET t_0 = (z * (cos(y))) IN
          		LET tmp_1 = IF (z <= (979878677698200176404151365115154792448000)) THEN ((x + (sin(y))) + z) ELSE ((1) / ((1) / t_0)) ENDIF IN
          		LET tmp = IF (z <= (-52874822343407397655864544993387752694108327141706237168610951579553497088)) THEN ((x + y) + t_0) ELSE tmp_1 ENDIF IN
          	tmp
          END code
          \begin{array}{l}
          t_0 := z \cdot \cos y\\
          \mathbf{if}\;z \leq -5.28748223434074 \cdot 10^{+73}:\\
          \;\;\;\;\left(x + y\right) + t\_0\\
          
          \mathbf{elif}\;z \leq 9.798786776982002 \cdot 10^{+41}:\\
          \;\;\;\;\left(x + \sin y\right) + z\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{1}{\frac{1}{t\_0}}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -5.2874822343407398e73

            1. Initial program 99.9%

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

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

                \[\leadsto \left(x + y\right) + z \cdot \cos y \]

              if -5.2874822343407398e73 < z < 9.7987867769820018e41

              1. Initial program 99.9%

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

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

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

                if 9.7987867769820018e41 < z

                1. Initial program 99.9%

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

                  \[\leadsto x + z \]
                3. Step-by-step derivation
                  1. Applied rewrites66.3%

                    \[\leadsto x + z \]
                  2. Applied rewrites66.1%

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

                    \[\leadsto \frac{1}{\frac{1}{z \cdot \cos y}} \]
                  4. Step-by-step derivation
                    1. Applied rewrites42.6%

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

                  Alternative 4: 88.5% accurate, 1.5× speedup?

                  \[\begin{array}{l} t_0 := \left(x + y\right) + z \cdot \cos y\\ \mathbf{if}\;z \leq -5.28748223434074 \cdot 10^{+73}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 6.994970959352771 \cdot 10^{+79}:\\ \;\;\;\;\left(x + \sin y\right) + z\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                  (FPCore (x y z)
                    :precision binary64
                    :pre TRUE
                    (let* ((t_0 (+ (+ x y) (* z (cos y)))))
                    (if (<= z -5.28748223434074e+73)
                      t_0
                      (if (<= z 6.994970959352771e+79) (+ (+ x (sin y)) z) t_0))))
                  double code(double x, double y, double z) {
                  	double t_0 = (x + y) + (z * cos(y));
                  	double tmp;
                  	if (z <= -5.28748223434074e+73) {
                  		tmp = t_0;
                  	} else if (z <= 6.994970959352771e+79) {
                  		tmp = (x + sin(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 * cos(y))
                      if (z <= (-5.28748223434074d+73)) then
                          tmp = t_0
                      else if (z <= 6.994970959352771d+79) then
                          tmp = (x + sin(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 * Math.cos(y));
                  	double tmp;
                  	if (z <= -5.28748223434074e+73) {
                  		tmp = t_0;
                  	} else if (z <= 6.994970959352771e+79) {
                  		tmp = (x + Math.sin(y)) + z;
                  	} else {
                  		tmp = t_0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z):
                  	t_0 = (x + y) + (z * math.cos(y))
                  	tmp = 0
                  	if z <= -5.28748223434074e+73:
                  		tmp = t_0
                  	elif z <= 6.994970959352771e+79:
                  		tmp = (x + math.sin(y)) + z
                  	else:
                  		tmp = t_0
                  	return tmp
                  
                  function code(x, y, z)
                  	t_0 = Float64(Float64(x + y) + Float64(z * cos(y)))
                  	tmp = 0.0
                  	if (z <= -5.28748223434074e+73)
                  		tmp = t_0;
                  	elseif (z <= 6.994970959352771e+79)
                  		tmp = Float64(Float64(x + sin(y)) + z);
                  	else
                  		tmp = t_0;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	t_0 = (x + y) + (z * cos(y));
                  	tmp = 0.0;
                  	if (z <= -5.28748223434074e+73)
                  		tmp = t_0;
                  	elseif (z <= 6.994970959352771e+79)
                  		tmp = (x + sin(y)) + z;
                  	else
                  		tmp = t_0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + y), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.28748223434074e+73], t$95$0, If[LessEqual[z, 6.994970959352771e+79], N[(N[(x + N[Sin[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 * (cos(y)))) IN
                  		LET tmp_1 = IF (z <= (69949709593527711519130508415402423261954380287341550860642068283017517170950144)) THEN ((x + (sin(y))) + z) ELSE t_0 ENDIF IN
                  		LET tmp = IF (z <= (-52874822343407397655864544993387752694108327141706237168610951579553497088)) THEN t_0 ELSE tmp_1 ENDIF IN
                  	tmp
                  END code
                  \begin{array}{l}
                  t_0 := \left(x + y\right) + z \cdot \cos y\\
                  \mathbf{if}\;z \leq -5.28748223434074 \cdot 10^{+73}:\\
                  \;\;\;\;t\_0\\
                  
                  \mathbf{elif}\;z \leq 6.994970959352771 \cdot 10^{+79}:\\
                  \;\;\;\;\left(x + \sin y\right) + z\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;t\_0\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if z < -5.2874822343407398e73 or 6.9949709593527712e79 < z

                    1. Initial program 99.9%

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

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

                        \[\leadsto \left(x + y\right) + z \cdot \cos y \]

                      if -5.2874822343407398e73 < z < 6.9949709593527712e79

                      1. Initial program 99.9%

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

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

                          \[\leadsto \left(x + \sin y\right) + z \]
                      4. Recombined 2 regimes into one program.
                      5. Add Preprocessing

                      Alternative 5: 85.8% accurate, 1.6× speedup?

                      \[\begin{array}{l} t_0 := \mathsf{fma}\left(z, \cos y, y\right)\\ \mathbf{if}\;z \leq -2.6050087589972047 \cdot 10^{+231}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 3.29415652404265 \cdot 10^{+104}:\\ \;\;\;\;\left(x + \sin y\right) + z\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                      (FPCore (x y z)
                        :precision binary64
                        :pre TRUE
                        (let* ((t_0 (fma z (cos y) y)))
                        (if (<= z -2.6050087589972047e+231)
                          t_0
                          (if (<= z 3.29415652404265e+104) (+ (+ x (sin y)) z) t_0))))
                      double code(double x, double y, double z) {
                      	double t_0 = fma(z, cos(y), y);
                      	double tmp;
                      	if (z <= -2.6050087589972047e+231) {
                      		tmp = t_0;
                      	} else if (z <= 3.29415652404265e+104) {
                      		tmp = (x + sin(y)) + z;
                      	} else {
                      		tmp = t_0;
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z)
                      	t_0 = fma(z, cos(y), y)
                      	tmp = 0.0
                      	if (z <= -2.6050087589972047e+231)
                      		tmp = t_0;
                      	elseif (z <= 3.29415652404265e+104)
                      		tmp = Float64(Float64(x + sin(y)) + z);
                      	else
                      		tmp = t_0;
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[z, -2.6050087589972047e+231], t$95$0, If[LessEqual[z, 3.29415652404265e+104], N[(N[(x + N[Sin[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 = ((z * (cos(y))) + y) IN
                      		LET tmp_1 = IF (z <= (329415652404265010418554586415017209981269810080201608232477072466112801212201144210986410850081598078976)) THEN ((x + (sin(y))) + z) ELSE t_0 ENDIF IN
                      		LET tmp = IF (z <= (-2605008758997204731862540525904623120202226198490563335109080502117871832311430881960948842708104076398331597073757562736175411220495072925082581483231614811605404858423706667269037393238998684482922839234465216156774559113321381888)) THEN t_0 ELSE tmp_1 ENDIF IN
                      	tmp
                      END code
                      \begin{array}{l}
                      t_0 := \mathsf{fma}\left(z, \cos y, y\right)\\
                      \mathbf{if}\;z \leq -2.6050087589972047 \cdot 10^{+231}:\\
                      \;\;\;\;t\_0\\
                      
                      \mathbf{elif}\;z \leq 3.29415652404265 \cdot 10^{+104}:\\
                      \;\;\;\;\left(x + \sin y\right) + z\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;t\_0\\
                      
                      
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if z < -2.6050087589972047e231 or 3.2941565240426501e104 < z

                        1. Initial program 99.9%

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

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

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

                            \[\leadsto y + z \cdot \cos y \]
                          3. Step-by-step derivation
                            1. Applied rewrites38.5%

                              \[\leadsto y + z \cdot \cos y \]
                            2. Step-by-step derivation
                              1. Applied rewrites38.5%

                                \[\leadsto \mathsf{fma}\left(z, \cos y, y\right) \]

                              if -2.6050087589972047e231 < z < 3.2941565240426501e104

                              1. Initial program 99.9%

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

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

                                  \[\leadsto \left(x + \sin y\right) + z \]
                              4. Recombined 2 regimes into one program.
                              5. Add Preprocessing

                              Alternative 6: 76.9% accurate, 1.7× speedup?

                              \[\begin{array}{l} \mathbf{if}\;x \leq -1.3693315375584638 \cdot 10^{-23}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;x \leq 1.8401859998667305 \cdot 10^{-111}:\\ \;\;\;\;\sin y + z\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
                              (FPCore (x y z)
                                :precision binary64
                                :pre TRUE
                                (if (<= x -1.3693315375584638e-23)
                                (+ x z)
                                (if (<= x 1.8401859998667305e-111) (+ (sin y) z) (+ x z))))
                              double code(double x, double y, double z) {
                              	double tmp;
                              	if (x <= -1.3693315375584638e-23) {
                              		tmp = x + z;
                              	} else if (x <= 1.8401859998667305e-111) {
                              		tmp = sin(y) + z;
                              	} else {
                              		tmp = x + 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 (x <= (-1.3693315375584638d-23)) then
                                      tmp = x + z
                                  else if (x <= 1.8401859998667305d-111) then
                                      tmp = sin(y) + z
                                  else
                                      tmp = x + z
                                  end if
                                  code = tmp
                              end function
                              
                              public static double code(double x, double y, double z) {
                              	double tmp;
                              	if (x <= -1.3693315375584638e-23) {
                              		tmp = x + z;
                              	} else if (x <= 1.8401859998667305e-111) {
                              		tmp = Math.sin(y) + z;
                              	} else {
                              		tmp = x + z;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z):
                              	tmp = 0
                              	if x <= -1.3693315375584638e-23:
                              		tmp = x + z
                              	elif x <= 1.8401859998667305e-111:
                              		tmp = math.sin(y) + z
                              	else:
                              		tmp = x + z
                              	return tmp
                              
                              function code(x, y, z)
                              	tmp = 0.0
                              	if (x <= -1.3693315375584638e-23)
                              		tmp = Float64(x + z);
                              	elseif (x <= 1.8401859998667305e-111)
                              		tmp = Float64(sin(y) + z);
                              	else
                              		tmp = Float64(x + z);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z)
                              	tmp = 0.0;
                              	if (x <= -1.3693315375584638e-23)
                              		tmp = x + z;
                              	elseif (x <= 1.8401859998667305e-111)
                              		tmp = sin(y) + z;
                              	else
                              		tmp = x + z;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_] := If[LessEqual[x, -1.3693315375584638e-23], N[(x + z), $MachinePrecision], If[LessEqual[x, 1.8401859998667305e-111], N[(N[Sin[y], $MachinePrecision] + z), $MachinePrecision], N[(x + 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 (x <= (184018599986673049805691613416603898063221139119644273742008916997875723735219713640021868179631727986170486433482239334249893247915031318203120656150366966758516334389313631113526126602288921270947752277548694013337231896514795509136510648494433478015723861463863258135231770751261137775145471096038818359375e-419)) THEN ((sin(y)) + z) ELSE (x + z) ENDIF IN
                              	LET tmp = IF (x <= (-13693315375584637783697793251116340862481554836732444073609167058125368754417650052346289157867431640625e-126)) THEN (x + z) ELSE tmp_1 ENDIF IN
                              	tmp
                              END code
                              \begin{array}{l}
                              \mathbf{if}\;x \leq -1.3693315375584638 \cdot 10^{-23}:\\
                              \;\;\;\;x + z\\
                              
                              \mathbf{elif}\;x \leq 1.8401859998667305 \cdot 10^{-111}:\\
                              \;\;\;\;\sin y + z\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;x + z\\
                              
                              
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if x < -1.3693315375584638e-23 or 1.8401859998667305e-111 < x

                                1. Initial program 99.9%

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

                                  \[\leadsto x + z \]
                                3. Step-by-step derivation
                                  1. Applied rewrites66.3%

                                    \[\leadsto x + z \]

                                  if -1.3693315375584638e-23 < x < 1.8401859998667305e-111

                                  1. Initial program 99.9%

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

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

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

                                      \[\leadsto \sin y + z \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites41.6%

                                        \[\leadsto \sin y + z \]
                                    4. Recombined 2 regimes into one program.
                                    5. Add Preprocessing

                                    Alternative 7: 70.3% accurate, 2.6× speedup?

                                    \[\begin{array}{l} \mathbf{if}\;y \leq -1.4406378747069113:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 62203358.3813149:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.5, z, -0.16666666666666666 \cdot y\right), y, 1\right), y, z + x\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
                                    (FPCore (x y z)
                                      :precision binary64
                                      :pre TRUE
                                      (if (<= y -1.4406378747069113)
                                      (+ x z)
                                      (if (<= y 62203358.3813149)
                                        (fma
                                         (fma (fma -0.5 z (* -0.16666666666666666 y)) y 1.0)
                                         y
                                         (+ z x))
                                        (+ x z))))
                                    double code(double x, double y, double z) {
                                    	double tmp;
                                    	if (y <= -1.4406378747069113) {
                                    		tmp = x + z;
                                    	} else if (y <= 62203358.3813149) {
                                    		tmp = fma(fma(fma(-0.5, z, (-0.16666666666666666 * y)), y, 1.0), y, (z + x));
                                    	} else {
                                    		tmp = x + z;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z)
                                    	tmp = 0.0
                                    	if (y <= -1.4406378747069113)
                                    		tmp = Float64(x + z);
                                    	elseif (y <= 62203358.3813149)
                                    		tmp = fma(fma(fma(-0.5, z, Float64(-0.16666666666666666 * y)), y, 1.0), y, Float64(z + x));
                                    	else
                                    		tmp = Float64(x + z);
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_] := If[LessEqual[y, -1.4406378747069113], N[(x + z), $MachinePrecision], If[LessEqual[y, 62203358.3813149], N[(N[(N[(-0.5 * z + N[(-0.16666666666666666 * y), $MachinePrecision]), $MachinePrecision] * y + 1.0), $MachinePrecision] * y + N[(z + x), $MachinePrecision]), $MachinePrecision], N[(x + 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 <= (622033583813149034976959228515625e-25)) THEN (((((((-5e-1) * z) + ((-1666666666666666574148081281236954964697360992431640625e-55) * y)) * y) + (1)) * y) + (z + x)) ELSE (x + z) ENDIF IN
                                    	LET tmp = IF (y <= (-14406378747069112922218891981174238026142120361328125e-52)) THEN (x + z) ELSE tmp_1 ENDIF IN
                                    	tmp
                                    END code
                                    \begin{array}{l}
                                    \mathbf{if}\;y \leq -1.4406378747069113:\\
                                    \;\;\;\;x + z\\
                                    
                                    \mathbf{elif}\;y \leq 62203358.3813149:\\
                                    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.5, z, -0.16666666666666666 \cdot y\right), y, 1\right), y, z + x\right)\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;x + z\\
                                    
                                    
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if y < -1.4406378747069113 or 62203358.381314903 < y

                                      1. Initial program 99.9%

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

                                        \[\leadsto x + z \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites66.3%

                                          \[\leadsto x + z \]

                                        if -1.4406378747069113 < y < 62203358.381314903

                                        1. Initial program 99.9%

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

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

                                            \[\leadsto x + \left(z + y \cdot \left(1 + y \cdot \mathsf{fma}\left(-0.5, z, -0.16666666666666666 \cdot y\right)\right)\right) \]
                                          2. Applied rewrites54.5%

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

                                        Alternative 8: 69.6% accurate, 3.0× speedup?

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

                                          1. Initial program 99.9%

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

                                            \[\leadsto x + z \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites66.3%

                                              \[\leadsto x + z \]

                                            if -7.0137591712311951e82 < y < 0.0037464000066246743

                                            1. Initial program 99.9%

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

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

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

                                            Alternative 9: 69.6% accurate, 5.5× speedup?

                                            \[\begin{array}{l} \mathbf{if}\;y \leq -8.607816989253337 \cdot 10^{+45}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 1.8336408030534186 \cdot 10^{-26}:\\ \;\;\;\;x + \left(y + z\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
                                            (FPCore (x y z)
                                              :precision binary64
                                              :pre TRUE
                                              (if (<= y -8.607816989253337e+45)
                                              (+ x z)
                                              (if (<= y 1.8336408030534186e-26) (+ x (+ y z)) (+ x z))))
                                            double code(double x, double y, double z) {
                                            	double tmp;
                                            	if (y <= -8.607816989253337e+45) {
                                            		tmp = x + z;
                                            	} else if (y <= 1.8336408030534186e-26) {
                                            		tmp = x + (y + z);
                                            	} else {
                                            		tmp = x + 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 <= (-8.607816989253337d+45)) then
                                                    tmp = x + z
                                                else if (y <= 1.8336408030534186d-26) then
                                                    tmp = x + (y + z)
                                                else
                                                    tmp = x + z
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z) {
                                            	double tmp;
                                            	if (y <= -8.607816989253337e+45) {
                                            		tmp = x + z;
                                            	} else if (y <= 1.8336408030534186e-26) {
                                            		tmp = x + (y + z);
                                            	} else {
                                            		tmp = x + z;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z):
                                            	tmp = 0
                                            	if y <= -8.607816989253337e+45:
                                            		tmp = x + z
                                            	elif y <= 1.8336408030534186e-26:
                                            		tmp = x + (y + z)
                                            	else:
                                            		tmp = x + z
                                            	return tmp
                                            
                                            function code(x, y, z)
                                            	tmp = 0.0
                                            	if (y <= -8.607816989253337e+45)
                                            		tmp = Float64(x + z);
                                            	elseif (y <= 1.8336408030534186e-26)
                                            		tmp = Float64(x + Float64(y + z));
                                            	else
                                            		tmp = Float64(x + z);
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z)
                                            	tmp = 0.0;
                                            	if (y <= -8.607816989253337e+45)
                                            		tmp = x + z;
                                            	elseif (y <= 1.8336408030534186e-26)
                                            		tmp = x + (y + z);
                                            	else
                                            		tmp = x + z;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_] := If[LessEqual[y, -8.607816989253337e+45], N[(x + z), $MachinePrecision], If[LessEqual[y, 1.8336408030534186e-26], N[(x + N[(y + z), $MachinePrecision]), $MachinePrecision], N[(x + 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 <= (18336408030534185630147711339110589968349689998395717197550123900054680307902810199038867722265422344207763671875e-138)) THEN (x + (y + z)) ELSE (x + z) ENDIF IN
                                            	LET tmp = IF (y <= (-8607816989253337160308850915516592192007176192)) THEN (x + z) ELSE tmp_1 ENDIF IN
                                            	tmp
                                            END code
                                            \begin{array}{l}
                                            \mathbf{if}\;y \leq -8.607816989253337 \cdot 10^{+45}:\\
                                            \;\;\;\;x + z\\
                                            
                                            \mathbf{elif}\;y \leq 1.8336408030534186 \cdot 10^{-26}:\\
                                            \;\;\;\;x + \left(y + z\right)\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;x + z\\
                                            
                                            
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 2 regimes
                                            2. if y < -8.6078169892533372e45 or 1.8336408030534186e-26 < y

                                              1. Initial program 99.9%

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

                                                \[\leadsto x + z \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites66.3%

                                                  \[\leadsto x + z \]

                                                if -8.6078169892533372e45 < y < 1.8336408030534186e-26

                                                1. Initial program 99.9%

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

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

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

                                                Alternative 10: 66.3% accurate, 21.2× speedup?

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

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

                                                  \[\leadsto x + z \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites66.3%

                                                    \[\leadsto x + z \]
                                                  2. Add Preprocessing

                                                  Alternative 11: 29.4% accurate, 21.2× speedup?

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

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

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

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

                                                      \[\leadsto y + z \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites29.4%

                                                        \[\leadsto y + z \]
                                                      2. Add Preprocessing

                                                      Alternative 12: 26.1% accurate, 76.4× speedup?

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

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

                                                        \[\leadsto x + z \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites66.3%

                                                          \[\leadsto x + z \]
                                                        2. Taylor expanded in x around 0

                                                          \[\leadsto z \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites26.1%

                                                            \[\leadsto z \]
                                                          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, C"
                                                            :precision binary64
                                                            (+ (+ x (sin y)) (* z (cos y))))