?

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

?

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

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. Final simplification99.9%

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

Alternatives

Alternative 1
Accuracy98.6%
Cost13385
\[\begin{array}{l} t_0 := z \cdot \sin y\\ \mathbf{if}\;x \leq -170 \lor \neg \left(x \leq 0.98\right):\\ \;\;\;\;x - t_0\\ \mathbf{else}:\\ \;\;\;\;\cos y - t_0\\ \end{array} \]
Alternative 2
Accuracy80.8%
Cost7185
\[\begin{array}{l} t_0 := z \cdot \left(-\sin y\right)\\ \mathbf{if}\;z \leq -5.2 \cdot 10^{+268}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+147}:\\ \;\;\;\;x + \left(1 - y \cdot z\right)\\ \mathbf{elif}\;z \leq -1.3 \cdot 10^{+112} \lor \neg \left(z \leq 1.5 \cdot 10^{+148}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 3
Accuracy92.0%
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+111} \lor \neg \left(z \leq 1.7 \cdot 10^{+31}\right):\\ \;\;\;\;x - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 4
Accuracy80.8%
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{-7} \lor \neg \left(y \leq 2.2 \cdot 10^{-13}\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;x + \left(1 - y \cdot z\right)\\ \end{array} \]
Alternative 5
Accuracy70.4%
Cost6728
\[\begin{array}{l} \mathbf{if}\;x \leq -6.8 \cdot 10^{-9}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{-27}:\\ \;\;\;\;\cos y\\ \mathbf{else}:\\ \;\;\;\;x + \left(1 - y \cdot z\right)\\ \end{array} \]
Alternative 6
Accuracy69.7%
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -5.6 \cdot 10^{+25}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{-13}:\\ \;\;\;\;x + \left(1 - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 7
Accuracy66.9%
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{-10}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 6.5 \cdot 10^{-12}:\\ \;\;\;\;1 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 8
Accuracy60.7%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -0.9:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.3 \cdot 10^{-15}:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 9
Accuracy61.8%
Cost192
\[x + 1 \]
Alternative 10
Accuracy21.4%
Cost64
\[1 \]

Error

Reproduce?

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