?

Average Error: 0.1 → 0.1
Time: 5.0s
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
Error14.3
Cost6988
\[\begin{array}{l} \mathbf{if}\;x \leq -2.55 \cdot 10^{-23}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;x \leq -7.4 \cdot 10^{-212}:\\ \;\;\;\;\cos y \cdot z\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-18}:\\ \;\;\;\;\sin y + z\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 2
Error8.2
Cost6984
\[\begin{array}{l} t_0 := x + z \cdot \cos y\\ \mathbf{if}\;y \leq -14:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-10}:\\ \;\;\;\;\left(y + x\right) + z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error0.7
Cost6984
\[\begin{array}{l} t_0 := x + z \cdot \cos y\\ \mathbf{if}\;z \leq -1000:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 9.5 \cdot 10^{-30}:\\ \;\;\;\;\left(x + \sin y\right) + z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error19.2
Cost6860
\[\begin{array}{l} t_0 := \left(y + x\right) + z\\ \mathbf{if}\;x \leq -4.5 \cdot 10^{-93}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-236}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 1.7 \cdot 10^{-199}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-36}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 5
Error16.9
Cost6856
\[\begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+176}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+68}:\\ \;\;\;\;x + z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error18.5
Cost584
\[\begin{array}{l} \mathbf{if}\;y \leq -8.4 \cdot 10^{+24}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-10}:\\ \;\;\;\;\left(y + x\right) + z\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 7
Error20.4
Cost456
\[\begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-133}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;x \leq -2.4 \cdot 10^{-300}:\\ \;\;\;\;z + y\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
Alternative 8
Error45.6
Cost328
\[\begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{-188}:\\ \;\;\;\;z\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-152}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;z\\ \end{array} \]
Alternative 9
Error20.9
Cost192
\[x + z \]
Alternative 10
Error59.8
Cost64
\[y \]

Error

Reproduce?

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