?

Average Error: 0.1 → 0.1
Time: 7.9s
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.1

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

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

Alternatives

Alternative 1
Error19.7
Cost7516
\[\begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;x \leq -9.5 \cdot 10^{-33}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq -1.8 \cdot 10^{-64}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq -2.95 \cdot 10^{-174}:\\ \;\;\;\;y + \left(z + x\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-303}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq 4 \cdot 10^{-199}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-179}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq 2.2 \cdot 10^{-32}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 2
Error22.0
Cost7256
\[\begin{array}{l} \mathbf{if}\;x \leq -8 \cdot 10^{-35}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq -2.35 \cdot 10^{-66}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq -4.9 \cdot 10^{-176}:\\ \;\;\;\;y + \left(z + x\right)\\ \mathbf{elif}\;x \leq 4.3 \cdot 10^{-297}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq 6 \cdot 10^{-195}:\\ \;\;\;\;z + y\\ \mathbf{elif}\;x \leq 8.8 \cdot 10^{-39}:\\ \;\;\;\;\sin y\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 3
Error14.4
Cost6992
\[\begin{array}{l} \mathbf{if}\;x \leq -1.2 \cdot 10^{-16}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{-92}:\\ \;\;\;\;z + \sin y\\ \mathbf{elif}\;x \leq 3.3 \cdot 10^{-27}:\\ \;\;\;\;\cos y \cdot z\\ \mathbf{elif}\;x \leq 8.4 \cdot 10^{-23}:\\ \;\;\;\;\sin y\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 4
Error10.7
Cost6988
\[\begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;z \leq -2.7 \cdot 10^{+109}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -9 \cdot 10^{-15}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+97}:\\ \;\;\;\;\sin y + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error6.7
Cost6984
\[\begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;z \leq -4.6 \cdot 10^{+110}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{+98}:\\ \;\;\;\;\left(x + \sin y\right) + z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error19.9
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -1.72 \cdot 10^{+134}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 2.9 \cdot 10^{-26}:\\ \;\;\;\;y + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 7
Error21.1
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -9.5 \cdot 10^{-74}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-250}:\\ \;\;\;\;z + y\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
Alternative 8
Error35.4
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -9.2 \cdot 10^{-74}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.6 \cdot 10^{-250}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 9
Error28.9
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -1.96 \cdot 10^{+33}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 7 \cdot 10^{-32}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error21.7
Cost192
\[z + x \]
Alternative 11
Error36.1
Cost64
\[x \]

Error

Reproduce?

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