?

Average Accuracy: 99.9% → 99.9%
Time: 10.4s
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.7%
Cost13385
\[\begin{array}{l} t_0 := z \cdot \sin y\\ \mathbf{if}\;x \leq -1.4 \cdot 10^{-8} \lor \neg \left(x \leq 5.8 \cdot 10^{-38}\right):\\ \;\;\;\;\left(x + 1\right) - t_0\\ \mathbf{else}:\\ \;\;\;\;\cos y - t_0\\ \end{array} \]
Alternative 2
Accuracy80.7%
Cost7185
\[\begin{array}{l} t_0 := z \cdot \left(-\sin y\right)\\ \mathbf{if}\;z \leq -4 \cdot 10^{+177}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq -2.05 \cdot 10^{+116}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;z \leq -2.52 \cdot 10^{+95} \lor \neg \left(z \leq 1.25 \cdot 10^{+48}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 3
Accuracy98.9%
Cost7113
\[\begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+28} \lor \neg \left(z \leq 1\right):\\ \;\;\;\;\left(x + 1\right) - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 4
Accuracy93.3%
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -1.6 \cdot 10^{+29} \lor \neg \left(z \leq 27\right):\\ \;\;\;\;x - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 5
Accuracy80.6%
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -1040000000 \lor \neg \left(y \leq 19000000\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;\left(x + 1\right) - y \cdot z\\ \end{array} \]
Alternative 6
Accuracy71.8%
Cost6728
\[\begin{array}{l} \mathbf{if}\;x \leq -2.7 \cdot 10^{-8}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 7.5 \cdot 10^{-14}:\\ \;\;\;\;\cos y\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 7
Accuracy60.4%
Cost848
\[\begin{array}{l} \mathbf{if}\;y \leq -3.5 \cdot 10^{+63}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq -5.4 \cdot 10^{-100}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq 3.55 \cdot 10^{-124}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-57}:\\ \;\;\;\;1 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 8
Accuracy69.9%
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -2.12 \cdot 10^{+21}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 1.08 \cdot 10^{+24}:\\ \;\;\;\;\left(x + 1\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 9
Accuracy63.3%
Cost452
\[\begin{array}{l} \mathbf{if}\;z \leq 5.1 \cdot 10^{+172}:\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot z\\ \end{array} \]
Alternative 10
Accuracy61.2%
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq 8.6 \cdot 10^{+172}:\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \end{array} \]
Alternative 11
Accuracy60.5%
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{-9}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 12
Accuracy61.4%
Cost192
\[x + 1 \]
Alternative 13
Accuracy21.4%
Cost64
\[1 \]

Error

Reproduce?

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