?

Average Error: 0.1 → 0.1
Time: 12.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 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
Error6.5
Cost13384
\[\begin{array}{l} \mathbf{if}\;x \leq -1.02 \cdot 10^{-10}:\\ \;\;\;\;\cos y + x\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{+39}:\\ \;\;\;\;\cos y - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 2
Error11.3
Cost6920
\[\begin{array}{l} t_0 := z \cdot \left(-\sin y\right)\\ \mathbf{if}\;z \leq -3.1 \cdot 10^{+177}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5.2 \cdot 10^{+183}:\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error11.8
Cost6856
\[\begin{array}{l} t_0 := \cos y + x\\ \mathbf{if}\;y \leq -0.0056:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 2.4:\\ \;\;\;\;\left(x + 1\right) + y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error18.8
Cost776
\[\begin{array}{l} \mathbf{if}\;y \leq -16500:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 5.2 \cdot 10^{+26}:\\ \;\;\;\;\left(x + 1\right) + y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 5
Error20.7
Cost648
\[\begin{array}{l} \mathbf{if}\;x \leq -3.2 \cdot 10^{-10}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 3.9 \cdot 10^{-13}:\\ \;\;\;\;1 + y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 6
Error24.2
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+262}:\\ \;\;\;\;\left(-z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 7
Error24.8
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -0.0033:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 0.245:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 8
Error24.3
Cost192
\[x + 1 \]
Alternative 9
Error50.3
Cost64
\[1 \]

Error

Reproduce?

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