?

Average Error: 0.0 → 0.0
Time: 9.7s
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 0.0

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

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

Alternatives

Alternative 1
Error0.6
Cost13385
\[\begin{array}{l} t_0 := z \cdot \sin y\\ \mathbf{if}\;x \leq -5.6 \cdot 10^{-9} \lor \neg \left(x \leq 0.0016\right):\\ \;\;\;\;\left(x + 1\right) - t_0\\ \mathbf{else}:\\ \;\;\;\;\cos y - t_0\\ \end{array} \]
Alternative 2
Error0.4
Cost7113
\[\begin{array}{l} \mathbf{if}\;z \leq -1.3 \lor \neg \left(z \leq 0.85\right):\\ \;\;\;\;\left(x + 1\right) - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 3
Error4.4
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -23000 \lor \neg \left(z \leq 7.4\right):\\ \;\;\;\;x - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 4
Error12.2
Cost6921
\[\begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+93} \lor \neg \left(z \leq 5.6 \cdot 10^{+188}\right):\\ \;\;\;\;z \cdot \left(-\sin y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 5
Error12.2
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -900 \lor \neg \left(y \leq 7 \cdot 10^{+18}\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;\left(x + 1\right) + \left(y \cdot \left(y \cdot -0.5\right) - y \cdot z\right)\\ \end{array} \]
Alternative 6
Error19.1
Cost6728
\[\begin{array}{l} \mathbf{if}\;x \leq -1.02 \cdot 10^{-8}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 5.9 \cdot 10^{-210}:\\ \;\;\;\;\cos y\\ \mathbf{elif}\;x \leq 1.4 \cdot 10^{+145}:\\ \;\;\;\;1 + \left(x - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 7
Error19.0
Cost1096
\[\begin{array}{l} \mathbf{if}\;y \leq -1500000000:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 5.3 \cdot 10^{+20}:\\ \;\;\;\;\left(x + 1\right) + \left(y \cdot \left(y \cdot -0.5\right) - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + -1\\ \end{array} \]
Alternative 8
Error19.0
Cost968
\[\begin{array}{l} \mathbf{if}\;y \leq -23000000:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 5.3 \cdot 10^{+20}:\\ \;\;\;\;\left(x + 1\right) + y \cdot \left(y \cdot -0.5 - z\right)\\ \mathbf{else}:\\ \;\;\;\;x + -1\\ \end{array} \]
Alternative 9
Error19.0
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -245000000:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+39}:\\ \;\;\;\;1 + \left(x - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + -1\\ \end{array} \]
Alternative 10
Error22.6
Cost585
\[\begin{array}{l} \mathbf{if}\;z \leq -3.1 \cdot 10^{+99} \lor \neg \left(z \leq 2.9 \cdot 10^{+189}\right):\\ \;\;\;\;x - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 11
Error21.1
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -3.7 \cdot 10^{-10}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 55000000:\\ \;\;\;\;1 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 12
Error24.6
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+187}:\\ \;\;\;\;y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 13
Error25.1
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -0.49:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.2:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 14
Error24.6
Cost192
\[x + 1 \]
Alternative 15
Error50.4
Cost64
\[1 \]

Error

Reproduce?

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