Diagrams.ThreeD.Transform:aboutX from diagrams-lib-1.3.0.3, A

Percentage Accurate: 99.8% → 99.8%
Time: 3.4s
Alternatives: 6
Speedup: 1.0×

Specification

?
\[x \cdot \cos y - 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
x \cdot \cos y - 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 6 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.8% accurate, 1.0× speedup?

\[x \cdot \cos y - 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
x \cdot \cos y - z \cdot \sin y

Alternative 1: 86.7% accurate, 1.5× speedup?

\[\begin{array}{l} t_0 := x \cdot 1 - z \cdot \sin y\\ \mathbf{if}\;z \leq -1.5998878487717716 \cdot 10^{-87}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 1.3906905842088115 \cdot 10^{-61}:\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (let* ((t_0 (- (* x 1.0) (* z (sin y)))))
  (if (<= z -1.5998878487717716e-87)
    t_0
    (if (<= z 1.3906905842088115e-61) (* x (cos y)) t_0))))
double code(double x, double y, double z) {
	double t_0 = (x * 1.0) - (z * sin(y));
	double tmp;
	if (z <= -1.5998878487717716e-87) {
		tmp = t_0;
	} else if (z <= 1.3906905842088115e-61) {
		tmp = x * cos(y);
	} 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 * 1.0d0) - (z * sin(y))
    if (z <= (-1.5998878487717716d-87)) then
        tmp = t_0
    else if (z <= 1.3906905842088115d-61) then
        tmp = x * cos(y)
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x * 1.0) - (z * Math.sin(y));
	double tmp;
	if (z <= -1.5998878487717716e-87) {
		tmp = t_0;
	} else if (z <= 1.3906905842088115e-61) {
		tmp = x * Math.cos(y);
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x * 1.0) - (z * math.sin(y))
	tmp = 0
	if z <= -1.5998878487717716e-87:
		tmp = t_0
	elif z <= 1.3906905842088115e-61:
		tmp = x * math.cos(y)
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x * 1.0) - Float64(z * sin(y)))
	tmp = 0.0
	if (z <= -1.5998878487717716e-87)
		tmp = t_0;
	elseif (z <= 1.3906905842088115e-61)
		tmp = Float64(x * cos(y));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x * 1.0) - (z * sin(y));
	tmp = 0.0;
	if (z <= -1.5998878487717716e-87)
		tmp = t_0;
	elseif (z <= 1.3906905842088115e-61)
		tmp = x * cos(y);
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x * 1.0), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5998878487717716e-87], t$95$0, If[LessEqual[z, 1.3906905842088115e-61], N[(x * N[Cos[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 * (1)) - (z * (sin(y)))) IN
		LET tmp_1 = IF (z <= (139069058420881154967487957630223034015355744194129779251587240099952514292987109389899646542932568675618170646032168982972712282179196417877818123690699010641669275401000049896538257598876953125e-255)) THEN (x * (cos(y))) ELSE t_0 ENDIF IN
		LET tmp = IF (z <= (-159988784877177164685523371169830722870522374072384409119026858684832480050318864005140114871679013601761552483193181404403016128515199488354968070059220853336754264519220820635743157089849151568897638446024723319315030689580225953250192105770111083984375e-341)) THEN t_0 ELSE tmp_1 ENDIF IN
	tmp
END code
\begin{array}{l}
t_0 := x \cdot 1 - z \cdot \sin y\\
\mathbf{if}\;z \leq -1.5998878487717716 \cdot 10^{-87}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq 1.3906905842088115 \cdot 10^{-61}:\\
\;\;\;\;x \cdot \cos y\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.5998878487717716e-87 or 1.3906905842088115e-61 < z

    1. Initial program 99.8%

      \[x \cdot \cos y - z \cdot \sin y \]
    2. Taylor expanded in y around 0

      \[\leadsto x \cdot 1 - z \cdot \sin y \]
    3. Step-by-step derivation
      1. Applied rewrites77.3%

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

      if -1.5998878487717716e-87 < z < 1.3906905842088115e-61

      1. Initial program 99.8%

        \[x \cdot \cos y - z \cdot \sin y \]
      2. Taylor expanded in x around inf

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

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

          \[\leadsto x \cdot \cos y \]
        3. Step-by-step derivation
          1. Applied rewrites61.0%

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

        Alternative 2: 74.7% accurate, 1.7× speedup?

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

          1. Initial program 99.8%

            \[x \cdot \cos y - z \cdot \sin y \]
          2. Taylor expanded in x around inf

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

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

              \[\leadsto x \cdot \cos y \]
            3. Step-by-step derivation
              1. Applied rewrites61.0%

                \[\leadsto x \cdot \cos y \]

              if -1.2014353339475216e-53 < x < 1.3907246641268288e-133

              1. Initial program 99.8%

                \[x \cdot \cos y - z \cdot \sin y \]
              2. Taylor expanded in x around 0

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

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

                    \[\leadsto -\sin y \cdot z \]
                3. Recombined 2 regimes into one program.
                4. Add Preprocessing

                Alternative 3: 73.4% accurate, 1.7× speedup?

                \[\begin{array}{l} t_0 := x \cdot \cos y\\ \mathbf{if}\;y \leq -0.0037539651929508304:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 0.2681731775064146:\\ \;\;\;\;x + y \cdot \left(y \cdot \mathsf{fma}\left(-0.5, x, 0.16666666666666666 \cdot \left(y \cdot z\right)\right) - z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \]
                (FPCore (x y z)
                  :precision binary64
                  :pre TRUE
                  (let* ((t_0 (* x (cos y))))
                  (if (<= y -0.0037539651929508304)
                    t_0
                    (if (<= y 0.2681731775064146)
                      (+
                       x
                       (* y (- (* y (fma -0.5 x (* 0.16666666666666666 (* y z)))) z)))
                      t_0))))
                double code(double x, double y, double z) {
                	double t_0 = x * cos(y);
                	double tmp;
                	if (y <= -0.0037539651929508304) {
                		tmp = t_0;
                	} else if (y <= 0.2681731775064146) {
                		tmp = x + (y * ((y * fma(-0.5, x, (0.16666666666666666 * (y * z)))) - z));
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	t_0 = Float64(x * cos(y))
                	tmp = 0.0
                	if (y <= -0.0037539651929508304)
                		tmp = t_0;
                	elseif (y <= 0.2681731775064146)
                		tmp = Float64(x + Float64(y * Float64(Float64(y * fma(-0.5, x, Float64(0.16666666666666666 * Float64(y * z)))) - z)));
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.0037539651929508304], t$95$0, If[LessEqual[y, 0.2681731775064146], N[(x + N[(y * N[(N[(y * N[(-0.5 * x + N[(0.16666666666666666 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]), $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 * (cos(y))) IN
                		LET tmp_1 = IF (y <= (268173177506414617266017330621252767741680145263671875e-54)) THEN (x + (y * ((y * (((-5e-1) * x) + ((1666666666666666574148081281236954964697360992431640625e-55) * (y * z)))) - z))) ELSE t_0 ENDIF IN
                		LET tmp = IF (y <= (-37539651929508303929150514477441902272403240203857421875e-58)) THEN t_0 ELSE tmp_1 ENDIF IN
                	tmp
                END code
                \begin{array}{l}
                t_0 := x \cdot \cos y\\
                \mathbf{if}\;y \leq -0.0037539651929508304:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;y \leq 0.2681731775064146:\\
                \;\;\;\;x + y \cdot \left(y \cdot \mathsf{fma}\left(-0.5, x, 0.16666666666666666 \cdot \left(y \cdot z\right)\right) - z\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -0.0037539651929508304 or 0.26817317750641462 < y

                  1. Initial program 99.8%

                    \[x \cdot \cos y - z \cdot \sin y \]
                  2. Taylor expanded in x around inf

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

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

                      \[\leadsto x \cdot \cos y \]
                    3. Step-by-step derivation
                      1. Applied rewrites61.0%

                        \[\leadsto x \cdot \cos y \]

                      if -0.0037539651929508304 < y < 0.26817317750641462

                      1. Initial program 99.8%

                        \[x \cdot \cos y - z \cdot \sin y \]
                      2. Taylor expanded in y around 0

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

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

                      Alternative 4: 52.7% accurate, 11.6× speedup?

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

                        \[x \cdot \cos y - z \cdot \sin y \]
                      2. Taylor expanded in y around 0

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

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

                            \[\leadsto x - z \cdot y \]
                          2. Add Preprocessing

                          Alternative 5: 39.5% accurate, 19.2× speedup?

                          \[x \cdot 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 \cdot 1
                          
                          Derivation
                          1. Initial program 99.8%

                            \[x \cdot \cos y - z \cdot \sin y \]
                          2. Taylor expanded in x around inf

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

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

                              \[\leadsto x \cdot \cos y \]
                            3. Step-by-step derivation
                              1. Applied rewrites61.0%

                                \[\leadsto x \cdot \cos y \]
                              2. Taylor expanded in y around 0

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

                                  \[\leadsto x \cdot 1 \]
                                2. Add Preprocessing

                                Reproduce

                                ?
                                herbie shell --seed 2026092 
                                (FPCore (x y z)
                                  :name "Diagrams.ThreeD.Transform:aboutX from diagrams-lib-1.3.0.3, A"
                                  :precision binary64
                                  (- (* x (cos y)) (* z (sin y))))