Average Error: 0.1 → 0.1
Time: 10.0s
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
Error1.2
Cost7112
\[\begin{array}{l} t_0 := \left(x + 1\right) - z \cdot \sin y\\ \mathbf{if}\;z \leq -8.20266596069657 \cdot 10^{+42}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5.754616414316947 \cdot 10^{-24}:\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error5.4
Cost6984
\[\begin{array}{l} t_0 := x - z \cdot \sin y\\ \mathbf{if}\;z \leq -1.3440119274247626 \cdot 10^{+101}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 2.1752525735512484 \cdot 10^{-18}:\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 3
Error11.7
Cost6920
\[\begin{array}{l} t_0 := z \cdot \left(-\sin y\right)\\ \mathbf{if}\;z \leq -4.3558872437979956 \cdot 10^{+178}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.907462836815851 \cdot 10^{+182}:\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error13.1
Cost6856
\[\begin{array}{l} t_0 := x + \cos y\\ \mathbf{if}\;y \leq -1213188.7799515845:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 7.388100587500896 \cdot 10^{-30}:\\ \;\;\;\;\left(x + 1\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error19.5
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -3156118704422.5156:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 108447536.14616328:\\ \;\;\;\;\left(x + 1\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 6
Error21.8
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -1159624358053.3381:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 0.2110975273385656:\\ \;\;\;\;1 - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 7
Error23.9
Cost520
\[\begin{array}{l} t_0 := z \cdot \left(-y\right)\\ \mathbf{if}\;z \leq -2.775295171516073 \cdot 10^{+224}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 1.5296243285835838 \cdot 10^{+247}:\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error24.9
Cost192
\[x + 1 \]
Alternative 9
Error37.5
Cost64
\[x \]

Error

Reproduce

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