?

Average Error: 0.1 → 0.1
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 0.1

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

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

Alternatives

Alternative 1
Error0.5
Cost7113
\[\begin{array}{l} \mathbf{if}\;z \leq -0.62 \lor \neg \left(z \leq 1.5 \cdot 10^{-14}\right):\\ \;\;\;\;\left(x + 1\right) - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 2
Error4.5
Cost6985
\[\begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{+61} \lor \neg \left(z \leq 2.9 \cdot 10^{+37}\right):\\ \;\;\;\;x - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 3
Error11.1
Cost6921
\[\begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{+138} \lor \neg \left(z \leq 1.46 \cdot 10^{+144}\right):\\ \;\;\;\;z \cdot \left(-\sin y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 4
Error12.0
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-5} \lor \neg \left(y \leq 1.5 \cdot 10^{-7}\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;1 + \left(x - y \cdot z\right)\\ \end{array} \]
Alternative 5
Error18.5
Cost6728
\[\begin{array}{l} \mathbf{if}\;x \leq -5.7 \cdot 10^{-11}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{-56}:\\ \;\;\;\;\cos y\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 6
Error19.2
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -8400000000000:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 3100:\\ \;\;\;\;1 + \left(x - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 7
Error21.6
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -5.5 \cdot 10^{-17}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 7.2 \cdot 10^{-67}:\\ \;\;\;\;1 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 8
Error24.8
Cost192
\[x + 1 \]
Alternative 9
Error36.9
Cost64
\[x \]

Error

Reproduce?

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