?

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

?

\[\left(x + \cos y\right) - z \cdot \sin y \]
\[\cos y + \left(x - z \cdot \sin y\right) \]
(FPCore (x y z) :precision binary64 (- (+ x (cos y)) (* z (sin y))))
(FPCore (x y z) :precision binary64 (+ (cos y) (- x (* z (sin y)))))
double code(double x, double y, double z) {
	return (x + cos(y)) - (z * sin(y));
}
double code(double x, double y, double z) {
	return cos(y) + (x - (z * sin(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 + cos(y)) - (z * sin(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 = cos(y) + (x - (z * sin(y)))
end function
public static double code(double x, double y, double z) {
	return (x + Math.cos(y)) - (z * Math.sin(y));
}
public static double code(double x, double y, double z) {
	return Math.cos(y) + (x - (z * Math.sin(y)));
}
def code(x, y, z):
	return (x + math.cos(y)) - (z * math.sin(y))
def code(x, y, z):
	return math.cos(y) + (x - (z * math.sin(y)))
function code(x, y, z)
	return Float64(Float64(x + cos(y)) - Float64(z * sin(y)))
end
function code(x, y, z)
	return Float64(cos(y) + Float64(x - Float64(z * sin(y))))
end
function tmp = code(x, y, z)
	tmp = (x + cos(y)) - (z * sin(y));
end
function tmp = code(x, y, z)
	tmp = cos(y) + (x - (z * sin(y)));
end
code[x_, y_, z_] := N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_, z_] := N[(N[Cos[y], $MachinePrecision] + N[(x - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(x + \cos y\right) - z \cdot \sin y
\cos y + \left(x - z \cdot \sin y\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.9%

    \[\left(x + \cos y\right) - z \cdot \sin y \]
  2. Applied egg-rr99.9%

    \[\leadsto \color{blue}{\left(x - z \cdot \sin y\right) + \cos y} \]
  3. Final simplification99.9%

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

Alternatives

Alternative 1
Accuracy97.4%
Cost13385
\[\begin{array}{l} t_0 := z \cdot \sin y\\ \mathbf{if}\;x \leq -0.88 \lor \neg \left(x \leq 2.9 \cdot 10^{-29}\right):\\ \;\;\;\;x - t_0\\ \mathbf{else}:\\ \;\;\;\;\cos y - t_0\\ \end{array} \]
Alternative 2
Accuracy81.3%
Cost7185
\[\begin{array}{l} t_0 := z \cdot \left(-\sin y\right)\\ \mathbf{if}\;z \leq -1.02 \cdot 10^{+220}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{+140}:\\ \;\;\;\;1 + \left(x - z \cdot y\right)\\ \mathbf{elif}\;z \leq -4.2 \cdot 10^{+71} \lor \neg \left(z \leq 2.1 \cdot 10^{+146}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 3
Accuracy93.5%
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -66000000000 \lor \neg \left(z \leq 42000000000000\right):\\ \;\;\;\;x - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 4
Accuracy80.6%
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -1.36 \lor \neg \left(y \leq 1.2 \cdot 10^{-5}\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;1 + \left(x - z \cdot y\right)\\ \end{array} \]
Alternative 5
Accuracy71.4%
Cost6728
\[\begin{array}{l} \mathbf{if}\;x \leq -7.6 \cdot 10^{-8}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 3.8 \cdot 10^{-16}:\\ \;\;\;\;\cos y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(x + 1\right) + \frac{1}{x}\right) + \frac{-1}{x + -1}\\ \end{array} \]
Alternative 6
Accuracy69.4%
Cost1096
\[\begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{+19}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{-5}:\\ \;\;\;\;\left(x + 1\right) + y \cdot \left(y \cdot -0.5 - z\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{x + -1} + x \cdot \frac{x}{x + -1}\\ \end{array} \]
Alternative 7
Accuracy69.4%
Cost969
\[\begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+23} \lor \neg \left(y \leq 1.2 \cdot 10^{-5}\right):\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;\left(x + 1\right) + y \cdot \left(y \cdot -0.5 - z\right)\\ \end{array} \]
Alternative 8
Accuracy69.4%
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+39}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+23}:\\ \;\;\;\;1 + \left(x - z \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 9
Accuracy65.8%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-93}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 9.5 \cdot 10^{-34}:\\ \;\;\;\;1 - z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 10
Accuracy62.1%
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{+250}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 11
Accuracy60.8%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -230:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Accuracy61.6%
Cost192
\[x + 1 \]
Alternative 13
Accuracy20.6%
Cost64
\[1 \]

Error

Reproduce?

herbie shell --seed 2023141 
(FPCore (x y z)
  :name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, B"
  :precision binary64
  (- (+ x (cos y)) (* z (sin y))))