?

Average Accuracy: 99.8% → 99.8%
Time: 11.5s
Precision: binary64
Cost: 13248

?

\[x \cdot \cos y - z \cdot \sin y \]
\[x \cdot \cos y - z \cdot \sin y \]
(FPCore (x y z) :precision binary64 (- (* x (cos y)) (* z (sin y))))
(FPCore (x y z) :precision binary64 (- (* x (cos y)) (* z (sin y))))
double code(double x, double y, double z) {
	return (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)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = (x * cos(y)) - (z * sin(y))
end function
real(8) function code(x, y, z)
    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));
}
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))
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 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
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]
code[x_, y_, z_] := N[(N[(x * N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \cos y - z \cdot \sin y
x \cdot \cos y - z \cdot \sin y

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.8%

    \[x \cdot \cos y - z \cdot \sin y \]
  2. Final simplification99.8%

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

Alternatives

Alternative 1
Accuracy87.1%
Cost7625
\[\begin{array}{l} \mathbf{if}\;x \leq -4.9 \cdot 10^{-45} \lor \neg \left(x \leq 3.4 \cdot 10^{-88}\right):\\ \;\;\;\;\frac{x}{\frac{1}{\cos y}} - \frac{z}{\frac{1}{y} + y \cdot 0.16666666666666666}\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \sin y\\ \end{array} \]
Alternative 2
Accuracy74.7%
Cost7252
\[\begin{array}{l} t_0 := x \cdot \cos y\\ t_1 := \sin y \cdot \left(-z\right)\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{+200}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq -3 \cdot 10^{+148}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{+58}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq -0.22:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 0.0075:\\ \;\;\;\;\left(x - y \cdot z\right) + -0.5 \cdot \left(y \cdot \left(x \cdot y\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Accuracy86.2%
Cost6985
\[\begin{array}{l} \mathbf{if}\;x \leq -1.95 \cdot 10^{+89} \lor \neg \left(x \leq 5.8 \cdot 10^{+20}\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \sin y\\ \end{array} \]
Alternative 4
Accuracy74.3%
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -1.06 \cdot 10^{+14} \lor \neg \left(y \leq 0.029\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;\left(x - y \cdot z\right) + -0.5 \cdot \left(y \cdot \left(x \cdot y\right)\right)\\ \end{array} \]
Alternative 5
Accuracy41.2%
Cost520
\[\begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{-90}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-223}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 6
Accuracy52.6%
Cost320
\[x - y \cdot z \]
Alternative 7
Accuracy39.1%
Cost64
\[x \]

Error

Reproduce?

herbie shell --seed 2023129 
(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))))