?

Average Error: 0.1 → 0.1
Time: 12.6s
Precision: binary64
Cost: 13248

?

\[\left(x + \cos y\right) - z \cdot \sin y \]
\[\left(x - z \cdot \sin y\right) + \cos y \]
(FPCore (x y z) :precision binary64 (- (+ x (cos y)) (* z (sin y))))
(FPCore (x y z) :precision binary64 (+ (- x (* z (sin y))) (cos 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 - (z * sin(y))) + cos(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 - (z * sin(y))) + cos(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 - (z * Math.sin(y))) + Math.cos(y);
}
def code(x, y, z):
	return (x + math.cos(y)) - (z * math.sin(y))
def code(x, y, z):
	return (x - (z * math.sin(y))) + math.cos(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 - Float64(z * sin(y))) + cos(y))
end
function tmp = code(x, y, z)
	tmp = (x + cos(y)) - (z * sin(y));
end
function tmp = code(x, y, z)
	tmp = (x - (z * sin(y))) + cos(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[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Cos[y], $MachinePrecision]), $MachinePrecision]
\left(x + \cos y\right) - z \cdot \sin y
\left(x - z \cdot \sin y\right) + \cos 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. Applied egg-rr0.1

    \[\leadsto \color{blue}{\left(x - z \cdot \sin y\right) + \cos y} \]
  3. Final simplification0.1

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

Alternatives

Alternative 1
Error0.4
Cost13449
\[\begin{array}{l} \mathbf{if}\;z \leq -1.8 \lor \neg \left(z \leq 0.088\right):\\ \;\;\;\;\mathsf{fma}\left(\sin y, -z, x + 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 2
Error6.0
Cost13385
\[\begin{array}{l} \mathbf{if}\;x \leq -0.000405 \lor \neg \left(x \leq 1.8 \cdot 10^{-5}\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;\cos y - z \cdot \sin y\\ \end{array} \]
Alternative 3
Error11.4
Cost6921
\[\begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+122} \lor \neg \left(z \leq 4.2 \cdot 10^{+172}\right):\\ \;\;\;\;\sin y \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array} \]
Alternative 4
Error19.9
Cost6861
\[\begin{array}{l} \mathbf{if}\;x \leq -1.35 \cdot 10^{+81}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq -3.2 \cdot 10^{-87} \lor \neg \left(x \leq 1.32 \cdot 10^{-63}\right):\\ \;\;\;\;1 + \left(x - z \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\cos y\\ \end{array} \]
Alternative 5
Error12.6
Cost6857
\[\begin{array}{l} \mathbf{if}\;y \leq -0.000202 \lor \neg \left(y \leq 64000000000000\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;1 + \left(x - z \cdot y\right)\\ \end{array} \]
Alternative 6
Error19.7
Cost712
\[\begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+37}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;y \leq 7.5 \cdot 10^{+14}:\\ \;\;\;\;1 + \left(x - z \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 7
Error21.8
Cost584
\[\begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-14}:\\ \;\;\;\;x + 1\\ \mathbf{elif}\;x \leq 1.8 \cdot 10^{-40}:\\ \;\;\;\;1 - z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 8
Error24.6
Cost388
\[\begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+270}:\\ \;\;\;\;z \cdot \left(-y\right)\\ \mathbf{else}:\\ \;\;\;\;x + 1\\ \end{array} \]
Alternative 9
Error25.3
Cost328
\[\begin{array}{l} \mathbf{if}\;x \leq -1:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.65:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
Alternative 10
Error24.9
Cost192
\[x + 1 \]
Alternative 11
Error50.2
Cost64
\[1 \]

Error

Reproduce?

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