Average Error: 0.1 → 0.1
Time: 16.3s
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 \]

Alternatives

Alternative 1
Error0.8
Cost13384
\[\begin{array}{l} t_0 := \left(1 + x\right) - z \cdot \sin y\\ \mathbf{if}\;x \leq -4 \cdot 10^{-5}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 9 \cdot 10^{-31}:\\ \;\;\;\;\cos y - \sin y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error10.0
Cost7248
\[\begin{array}{l} t_0 := z \cdot \sin y\\ t_1 := x - t_0\\ \mathbf{if}\;x \leq -0.95:\\ \;\;\;\;t_1\\ \mathbf{elif}\;x \leq 4.2 \cdot 10^{-248}:\\ \;\;\;\;1 - t_0\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-54}:\\ \;\;\;\;\cos y - y \cdot z\\ \mathbf{elif}\;x \leq 65000:\\ \;\;\;\;\left(1 + x\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error9.0
Cost7112
\[\begin{array}{l} t_0 := \left(1 + x\right) - z \cdot \sin y\\ \mathbf{if}\;x \leq 6.5 \cdot 10^{-252}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;x \leq 4.4 \cdot 10^{-45}:\\ \;\;\;\;\cos y - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error5.1
Cost7112
\[\begin{array}{l} t_0 := \left(1 + x\right) - z \cdot \sin y\\ \mathbf{if}\;z \leq -1.6 \cdot 10^{-70}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-173}:\\ \;\;\;\;\left(x + \cos y\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error16.5
Cost6984
\[\begin{array}{l} t_0 := 1 - z \cdot \sin y\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+113}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+93}:\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 6
Error8.5
Cost6984
\[\begin{array}{l} t_0 := x - z \cdot \sin y\\ \mathbf{if}\;y \leq -1.5 \cdot 10^{-6}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{-35}:\\ \;\;\;\;\left(1 + x\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error18.3
Cost6920
\[\begin{array}{l} t_0 := \left(-z\right) \cdot \sin y\\ \mathbf{if}\;z \leq -1.5 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 6.5 \cdot 10^{+157}:\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error19.2
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -2.6 \cdot 10^{+17}:\\ \;\;\;\;1 + x\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+41}:\\ \;\;\;\;\left(1 + x\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \]
Alternative 9
Error24.2
Cost584
\[\begin{array}{l} t_0 := 1 - y \cdot z\\ \mathbf{if}\;z \leq -3 \cdot 10^{+121}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+221}:\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 10
Error22.4
Cost584
\[\begin{array}{l} t_0 := x - y \cdot z\\ \mathbf{if}\;z \leq -7.8 \cdot 10^{+146}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;z \leq 3 \cdot 10^{+193}:\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error24.4
Cost192
\[1 + x \]
Alternative 12
Error36.6
Cost64
\[x \]

Error

Reproduce

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