Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, B

Percentage Accurate: 100.0% → 100.0%
Time: 5.5s
Alternatives: 5
Speedup: 1.2×

Specification

?
\[\begin{array}{l} \\ x + \left(y - x\right) \cdot z \end{array} \]
(FPCore (x y z) :precision binary64 (+ x (* (- y x) z)))
double code(double x, double y, double z) {
	return x + ((y - x) * z);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + ((y - x) * z)
end function
public static double code(double x, double y, double z) {
	return x + ((y - x) * z);
}
def code(x, y, z):
	return x + ((y - x) * z)
function code(x, y, z)
	return Float64(x + Float64(Float64(y - x) * z))
end
function tmp = code(x, y, z)
	tmp = x + ((y - x) * z);
end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - x\right) \cdot z
\end{array}

Sampling outcomes in binary64 precision:

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

\[\begin{array}{l} \\ x + \left(y - x\right) \cdot z \end{array} \]
(FPCore (x y z) :precision binary64 (+ x (* (- y x) z)))
double code(double x, double y, double z) {
	return x + ((y - x) * z);
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x + ((y - x) * z)
end function
public static double code(double x, double y, double z) {
	return x + ((y - x) * z);
}
def code(x, y, z):
	return x + ((y - x) * z)
function code(x, y, z)
	return Float64(x + Float64(Float64(y - x) * z))
end
function tmp = code(x, y, z)
	tmp = x + ((y - x) * z);
end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - x\right) \cdot z
\end{array}

Alternative 1: 100.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(y - x, z, x\right) \end{array} \]
(FPCore (x y z) :precision binary64 (fma (- y x) z x))
double code(double x, double y, double z) {
	return fma((y - x), z, x);
}
function code(x, y, z)
	return fma(Float64(y - x), z, x)
end
code[x_, y_, z_] := N[(N[(y - x), $MachinePrecision] * z + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(y - x, z, x\right)
\end{array}
Derivation
  1. Initial program 100.0%

    \[x + \left(y - x\right) \cdot z \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-+.f64N/A

      \[\leadsto \color{blue}{x + \left(y - x\right) \cdot z} \]
    2. +-commutativeN/A

      \[\leadsto \color{blue}{\left(y - x\right) \cdot z + x} \]
    3. lift-*.f64N/A

      \[\leadsto \color{blue}{\left(y - x\right) \cdot z} + x \]
    4. lower-fma.f64100.0

      \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, z, x\right)} \]
  4. Applied rewrites100.0%

    \[\leadsto \color{blue}{\mathsf{fma}\left(y - x, z, x\right)} \]
  5. Add Preprocessing

Alternative 2: 61.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(-z\right) \cdot x\\ \mathbf{if}\;z \leq -4.2 \cdot 10^{+151}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -1.12 \cdot 10^{-10}:\\ \;\;\;\;z \cdot y\\ \mathbf{elif}\;z \leq 4.4 \cdot 10^{-21}:\\ \;\;\;\;1 \cdot x\\ \mathbf{elif}\;z \leq 1.85 \cdot 10^{+51}:\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* (- z) x)))
   (if (<= z -4.2e+151)
     t_0
     (if (<= z -1.12e-10)
       (* z y)
       (if (<= z 4.4e-21) (* 1.0 x) (if (<= z 1.85e+51) (* z y) t_0))))))
double code(double x, double y, double z) {
	double t_0 = -z * x;
	double tmp;
	if (z <= -4.2e+151) {
		tmp = t_0;
	} else if (z <= -1.12e-10) {
		tmp = z * y;
	} else if (z <= 4.4e-21) {
		tmp = 1.0 * x;
	} else if (z <= 1.85e+51) {
		tmp = z * y;
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: tmp
    t_0 = -z * x
    if (z <= (-4.2d+151)) then
        tmp = t_0
    else if (z <= (-1.12d-10)) then
        tmp = z * y
    else if (z <= 4.4d-21) then
        tmp = 1.0d0 * x
    else if (z <= 1.85d+51) then
        tmp = z * y
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = -z * x;
	double tmp;
	if (z <= -4.2e+151) {
		tmp = t_0;
	} else if (z <= -1.12e-10) {
		tmp = z * y;
	} else if (z <= 4.4e-21) {
		tmp = 1.0 * x;
	} else if (z <= 1.85e+51) {
		tmp = z * y;
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = -z * x
	tmp = 0
	if z <= -4.2e+151:
		tmp = t_0
	elif z <= -1.12e-10:
		tmp = z * y
	elif z <= 4.4e-21:
		tmp = 1.0 * x
	elif z <= 1.85e+51:
		tmp = z * y
	else:
		tmp = t_0
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(-z) * x)
	tmp = 0.0
	if (z <= -4.2e+151)
		tmp = t_0;
	elseif (z <= -1.12e-10)
		tmp = Float64(z * y);
	elseif (z <= 4.4e-21)
		tmp = Float64(1.0 * x);
	elseif (z <= 1.85e+51)
		tmp = Float64(z * y);
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = -z * x;
	tmp = 0.0;
	if (z <= -4.2e+151)
		tmp = t_0;
	elseif (z <= -1.12e-10)
		tmp = z * y;
	elseif (z <= 4.4e-21)
		tmp = 1.0 * x;
	elseif (z <= 1.85e+51)
		tmp = z * y;
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[((-z) * x), $MachinePrecision]}, If[LessEqual[z, -4.2e+151], t$95$0, If[LessEqual[z, -1.12e-10], N[(z * y), $MachinePrecision], If[LessEqual[z, 4.4e-21], N[(1.0 * x), $MachinePrecision], If[LessEqual[z, 1.85e+51], N[(z * y), $MachinePrecision], t$95$0]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(-z\right) \cdot x\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+151}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-10}:\\
\;\;\;\;z \cdot y\\

\mathbf{elif}\;z \leq 4.4 \cdot 10^{-21}:\\
\;\;\;\;1 \cdot x\\

\mathbf{elif}\;z \leq 1.85 \cdot 10^{+51}:\\
\;\;\;\;z \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.2000000000000001e151 or 1.8500000000000001e51 < z

    1. Initial program 100.0%

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

      \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot z\right)} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
      3. mul-1-negN/A

        \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) \cdot x \]
      4. unsub-negN/A

        \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
      5. lower--.f6465.1

        \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
    5. Applied rewrites65.1%

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

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

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

      if -4.2000000000000001e151 < z < -1.12e-10 or 4.4000000000000001e-21 < z < 1.8500000000000001e51

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{y \cdot z} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{z \cdot y} \]
        2. lower-*.f6464.5

          \[\leadsto \color{blue}{z \cdot y} \]
      5. Applied rewrites64.5%

        \[\leadsto \color{blue}{z \cdot y} \]

      if -1.12e-10 < z < 4.4000000000000001e-21

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot z\right)} \]
      4. Step-by-step derivation
        1. *-commutativeN/A

          \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
        2. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
        3. mul-1-negN/A

          \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) \cdot x \]
        4. unsub-negN/A

          \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
        5. lower--.f6469.8

          \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
      5. Applied rewrites69.8%

        \[\leadsto \color{blue}{\left(1 - z\right) \cdot x} \]
      6. Taylor expanded in z around 0

        \[\leadsto 1 \cdot x \]
      7. Step-by-step derivation
        1. Applied rewrites69.8%

          \[\leadsto 1 \cdot x \]
      8. Recombined 3 regimes into one program.
      9. Add Preprocessing

      Alternative 3: 84.9% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-10} \lor \neg \left(z \leq 4.4 \cdot 10^{-21}\right):\\ \;\;\;\;z \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (if (or (<= z -1.12e-10) (not (<= z 4.4e-21))) (* z (- y x)) (* 1.0 x)))
      double code(double x, double y, double z) {
      	double tmp;
      	if ((z <= -1.12e-10) || !(z <= 4.4e-21)) {
      		tmp = z * (y - x);
      	} else {
      		tmp = 1.0 * x;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: tmp
          if ((z <= (-1.12d-10)) .or. (.not. (z <= 4.4d-21))) then
              tmp = z * (y - x)
          else
              tmp = 1.0d0 * x
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double tmp;
      	if ((z <= -1.12e-10) || !(z <= 4.4e-21)) {
      		tmp = z * (y - x);
      	} else {
      		tmp = 1.0 * x;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	tmp = 0
      	if (z <= -1.12e-10) or not (z <= 4.4e-21):
      		tmp = z * (y - x)
      	else:
      		tmp = 1.0 * x
      	return tmp
      
      function code(x, y, z)
      	tmp = 0.0
      	if ((z <= -1.12e-10) || !(z <= 4.4e-21))
      		tmp = Float64(z * Float64(y - x));
      	else
      		tmp = Float64(1.0 * x);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if ((z <= -1.12e-10) || ~((z <= 4.4e-21)))
      		tmp = z * (y - x);
      	else
      		tmp = 1.0 * x;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := If[Or[LessEqual[z, -1.12e-10], N[Not[LessEqual[z, 4.4e-21]], $MachinePrecision]], N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;z \leq -1.12 \cdot 10^{-10} \lor \neg \left(z \leq 4.4 \cdot 10^{-21}\right):\\
      \;\;\;\;z \cdot \left(y - x\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;1 \cdot x\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -1.12e-10 or 4.4000000000000001e-21 < z

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{y \cdot z} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{z \cdot y} \]
          2. lower-*.f6450.4

            \[\leadsto \color{blue}{z \cdot y} \]
        5. Applied rewrites50.4%

          \[\leadsto \color{blue}{z \cdot y} \]
        6. Taylor expanded in z around inf

          \[\leadsto \color{blue}{z \cdot \left(y - x\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \color{blue}{z \cdot \left(y - x\right)} \]
          2. lower--.f6497.3

            \[\leadsto z \cdot \color{blue}{\left(y - x\right)} \]
        8. Applied rewrites97.3%

          \[\leadsto \color{blue}{z \cdot \left(y - x\right)} \]

        if -1.12e-10 < z < 4.4000000000000001e-21

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot z\right)} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
          3. mul-1-negN/A

            \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) \cdot x \]
          4. unsub-negN/A

            \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
          5. lower--.f6469.8

            \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
        5. Applied rewrites69.8%

          \[\leadsto \color{blue}{\left(1 - z\right) \cdot x} \]
        6. Taylor expanded in z around 0

          \[\leadsto 1 \cdot x \]
        7. Step-by-step derivation
          1. Applied rewrites69.8%

            \[\leadsto 1 \cdot x \]
        8. Recombined 2 regimes into one program.
        9. Final simplification85.5%

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-10} \lor \neg \left(z \leq 4.4 \cdot 10^{-21}\right):\\ \;\;\;\;z \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
        10. Add Preprocessing

        Alternative 4: 61.7% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-10} \lor \neg \left(z \leq 4.4 \cdot 10^{-21}\right):\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (or (<= z -1.12e-10) (not (<= z 4.4e-21))) (* z y) (* 1.0 x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if ((z <= -1.12e-10) || !(z <= 4.4e-21)) {
        		tmp = z * y;
        	} else {
        		tmp = 1.0 * x;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: tmp
            if ((z <= (-1.12d-10)) .or. (.not. (z <= 4.4d-21))) then
                tmp = z * y
            else
                tmp = 1.0d0 * x
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if ((z <= -1.12e-10) || !(z <= 4.4e-21)) {
        		tmp = z * y;
        	} else {
        		tmp = 1.0 * x;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if (z <= -1.12e-10) or not (z <= 4.4e-21):
        		tmp = z * y
        	else:
        		tmp = 1.0 * x
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if ((z <= -1.12e-10) || !(z <= 4.4e-21))
        		tmp = Float64(z * y);
        	else
        		tmp = Float64(1.0 * x);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if ((z <= -1.12e-10) || ~((z <= 4.4e-21)))
        		tmp = z * y;
        	else
        		tmp = 1.0 * x;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[Or[LessEqual[z, -1.12e-10], N[Not[LessEqual[z, 4.4e-21]], $MachinePrecision]], N[(z * y), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -1.12 \cdot 10^{-10} \lor \neg \left(z \leq 4.4 \cdot 10^{-21}\right):\\
        \;\;\;\;z \cdot y\\
        
        \mathbf{else}:\\
        \;\;\;\;1 \cdot x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.12e-10 or 4.4000000000000001e-21 < z

          1. Initial program 100.0%

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

            \[\leadsto \color{blue}{y \cdot z} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{z \cdot y} \]
            2. lower-*.f6450.4

              \[\leadsto \color{blue}{z \cdot y} \]
          5. Applied rewrites50.4%

            \[\leadsto \color{blue}{z \cdot y} \]

          if -1.12e-10 < z < 4.4000000000000001e-21

          1. Initial program 100.0%

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

            \[\leadsto \color{blue}{x \cdot \left(1 + -1 \cdot z\right)} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(1 + -1 \cdot z\right) \cdot x} \]
            3. mul-1-negN/A

              \[\leadsto \left(1 + \color{blue}{\left(\mathsf{neg}\left(z\right)\right)}\right) \cdot x \]
            4. unsub-negN/A

              \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
            5. lower--.f6469.8

              \[\leadsto \color{blue}{\left(1 - z\right)} \cdot x \]
          5. Applied rewrites69.8%

            \[\leadsto \color{blue}{\left(1 - z\right) \cdot x} \]
          6. Taylor expanded in z around 0

            \[\leadsto 1 \cdot x \]
          7. Step-by-step derivation
            1. Applied rewrites69.8%

              \[\leadsto 1 \cdot x \]
          8. Recombined 2 regimes into one program.
          9. Final simplification58.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.12 \cdot 10^{-10} \lor \neg \left(z \leq 4.4 \cdot 10^{-21}\right):\\ \;\;\;\;z \cdot y\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
          10. Add Preprocessing

          Alternative 5: 42.0% accurate, 2.0× speedup?

          \[\begin{array}{l} \\ z \cdot y \end{array} \]
          (FPCore (x y z) :precision binary64 (* z y))
          double code(double x, double y, double z) {
          	return z * y;
          }
          
          real(8) function code(x, y, z)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              code = z * y
          end function
          
          public static double code(double x, double y, double z) {
          	return z * y;
          }
          
          def code(x, y, z):
          	return z * y
          
          function code(x, y, z)
          	return Float64(z * y)
          end
          
          function tmp = code(x, y, z)
          	tmp = z * y;
          end
          
          code[x_, y_, z_] := N[(z * y), $MachinePrecision]
          
          \begin{array}{l}
          
          \\
          z \cdot y
          \end{array}
          
          Derivation
          1. Initial program 100.0%

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

            \[\leadsto \color{blue}{y \cdot z} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \color{blue}{z \cdot y} \]
            2. lower-*.f6442.7

              \[\leadsto \color{blue}{z \cdot y} \]
          5. Applied rewrites42.7%

            \[\leadsto \color{blue}{z \cdot y} \]
          6. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2024307 
          (FPCore (x y z)
            :name "Diagrams.ThreeD.Shapes:frustum from diagrams-lib-1.3.0.3, B"
            :precision binary64
            (+ x (* (- y x) z)))