?

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

?

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

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.8%

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

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

Alternatives

Alternative 1
Accuracy74.7%
Cost7253
\[\begin{array}{l} t_0 := z \cdot \cos y\\ t_1 := x \cdot \sin y\\ \mathbf{if}\;y \leq -1.2 \cdot 10^{+104}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq -0.0305:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{-13}:\\ \;\;\;\;z + x \cdot y\\ \mathbf{elif}\;y \leq 3.05 \cdot 10^{+47} \lor \neg \left(y \leq 1.9 \cdot 10^{+145}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 2
Accuracy86.3%
Cost6985
\[\begin{array}{l} \mathbf{if}\;x \leq -4.2 \cdot 10^{-44} \lor \neg \left(x \leq 8.5 \cdot 10^{-24}\right):\\ \;\;\;\;x \cdot \sin y + z\\ \mathbf{else}:\\ \;\;\;\;z \cdot \cos y\\ \end{array} \]
Alternative 3
Accuracy74.2%
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{-5} \lor \neg \left(y \leq 4.3 \cdot 10^{-13}\right):\\ \;\;\;\;z \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;z + x \cdot y\\ \end{array} \]
Alternative 4
Accuracy38.9%
Cost324
\[\begin{array}{l} \mathbf{if}\;x \leq -8.5 \cdot 10^{+64}:\\ \;\;\;\;x \cdot y\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 5
Accuracy51.5%
Cost320
\[z + x \cdot y \]
Alternative 6
Accuracy38.2%
Cost64
\[z \]

Error

Reproduce?

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