?

Average Error: 0.0 → 0.0
Time: 7.2s
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 0.0

    \[\left(x + \sin y\right) + z \cdot \cos y \]
  2. Final simplification0.0

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

Alternatives

Alternative 1
Error18.6
Cost7516
\[\begin{array}{l} t_0 := z \cdot \cos y\\ \mathbf{if}\;x \leq -5.6 \cdot 10^{-17}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;x \leq -3.5 \cdot 10^{-37}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq -7.5 \cdot 10^{-140}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq -5.1 \cdot 10^{-245}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.5 \cdot 10^{-237}:\\ \;\;\;\;z + \left(x + y\right)\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-91}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 2
Error8.4
Cost6985
\[\begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-5} \lor \neg \left(y \leq 0.0007\right):\\ \;\;\;\;x + z \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;z + \left(x + y\right)\\ \end{array} \]
Alternative 3
Error0.5
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -1.85 \lor \neg \left(z \leq 1.5 \cdot 10^{-14}\right):\\ \;\;\;\;x + z \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;\left(x + \sin y\right) + z\\ \end{array} \]
Alternative 4
Error19.2
Cost6728
\[\begin{array}{l} \mathbf{if}\;y \leq -2.75 \cdot 10^{+206}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq -2.45 \cdot 10^{+191}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{+64}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1:\\ \;\;\;\;z + \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 5
Error19.0
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -3.3 \cdot 10^{+66}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1:\\ \;\;\;\;z + \left(x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 6
Error20.3
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -3.3 \cdot 10^{-121}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;x \leq 6.8 \cdot 10^{-152}:\\ \;\;\;\;y + z\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 7
Error45.5
Cost328
\[\begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-140}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 8.4 \cdot 10^{-155}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 8
Error21.4
Cost192
\[x + z \]
Alternative 9
Error59.7
Cost64
\[y \]

Error

Reproduce?

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