?

Average Accuracy: 99.9% → 99.9%
Time: 6.6s
Precision: binary64
Cost: 13248

?

\[\left(x + \sin y\right) + z \cdot \cos y \]
\[\left(x + \sin y\right) + 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]
\left(x + \sin y\right) + z \cdot \cos y
\left(x + \sin y\right) + z \cdot \cos y

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.9%

    \[\left(x + \sin y\right) + z \cdot \cos y \]
  2. Final simplification99.9%

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

Alternatives

Alternative 1
Accuracy90.1%
Cost7113
\[\begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+15} \lor \neg \left(z \leq 1.8 \cdot 10^{+89}\right):\\ \;\;\;\;z \cdot \cos y + \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(x + \sin y\right) + z\\ \end{array} \]
Alternative 2
Accuracy82.7%
Cost6720
\[\left(x + \sin y\right) + z \]
Alternative 3
Accuracy71.0%
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -1.45 \cdot 10^{+54}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+26}:\\ \;\;\;\;z + \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 4
Accuracy67.1%
Cost192
\[x + z \]

Error

Reproduce?

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