?

Average Error: 0.1 → 0.1
Time: 10.1s
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
Error12.1
Cost7184
\[\begin{array}{l} t_0 := \sin y \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+84}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+91}:\\ \;\;\;\;\cos y + x\\ \mathbf{elif}\;z \leq 4.1 \cdot 10^{+144}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 2.05 \cdot 10^{+190}:\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error1.0
Cost7112
\[\begin{array}{l} t_0 := \left(x + 1\right) - z \cdot \sin y\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{+14}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.8 \cdot 10^{-43}:\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error4.6
Cost6984
\[\begin{array}{l} t_0 := x - z \cdot \sin y\\ \mathbf{if}\;z \leq -3 \cdot 10^{+18}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+49}:\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error12.0
Cost6856
\[\begin{array}{l} t_0 := \cos y + x\\ \mathbf{if}\;y \leq -13:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 0.00052:\\ \;\;\;\;x + \left(1 - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error20.3
Cost6728
\[\begin{array}{l} t_0 := x + \left(1 - y \cdot z\right)\\ \mathbf{if}\;x \leq -4.4 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 2.3 \cdot 10^{-17}:\\ \;\;\;\;\cos y\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error21.0
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -5:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 8.5 \cdot 10^{-7}:\\ \;\;\;\;1 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 7
Error21.5
Cost580
\[\begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+62}:\\ \;\;\;\;x + -1\\ \mathbf{else}:\\ \;\;\;\;x + \left(1 - y \cdot z\right)\\ \end{array} \]
Alternative 8
Error23.9
Cost520
\[\begin{array}{l} t_0 := y \cdot \left(-z\right)\\ \mathbf{if}\;z \leq -2.15 \cdot 10^{+204}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 2.55 \cdot 10^{+275}:\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error25.1
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -5:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 12:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error24.6
Cost192
\[x + 1 \]
Alternative 11
Error50.2
Cost64
\[1 \]

Error

Reproduce?

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