Average Error: 0.1 → 0.1
Time: 6.4s
Precision: binary64
Cost: 13248
\[\left(x + \cos y\right) - z \cdot \sin y\]
\[\left(x + \cos y\right) - z \cdot \sin y\]
\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));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Alternatives

Alternative 1
Error6.9
Cost13762
\[\begin{array}{l} \mathbf{if}\;x \leq -4.617795998451085 \cdot 10^{+52}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.1853413812390224 \cdot 10^{-31}:\\ \;\;\;\;\cos y - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array}\]
Alternative 2
Error12.7
Cost8453
\[\begin{array}{l} \mathbf{if}\;y \leq -1.518515463397373 \cdot 10^{+133}:\\ \;\;\;\;x + \cos y\\ \mathbf{elif}\;y \leq -2.4577894350339715 \cdot 10^{+88}:\\ \;\;\;\;-z \cdot \sin y\\ \mathbf{elif}\;y \leq -6.929473909826237 \cdot 10^{+24}:\\ \;\;\;\;x + \cos y\\ \mathbf{elif}\;y \leq -5.053716960464881:\\ \;\;\;\;-z \cdot \sin y\\ \mathbf{elif}\;y \leq 4.295310622478322 \cdot 10^{+26}:\\ \;\;\;\;\left(x + \cos y\right) - y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x + \cos y\\ \end{array}\]
Alternative 3
Error12.9
Cost8204
\[\begin{array}{l} \mathbf{if}\;y \leq -2.6612415537441975 \cdot 10^{+132}:\\ \;\;\;\;x + \cos y\\ \mathbf{elif}\;y \leq -2.5106536642892974 \cdot 10^{+88}:\\ \;\;\;\;-z \cdot \sin y\\ \mathbf{elif}\;y \leq -5.812743572593929 \cdot 10^{+24}:\\ \;\;\;\;x + \cos y\\ \mathbf{elif}\;y \leq -5.178985653066986:\\ \;\;\;\;-z \cdot \sin y\\ \mathbf{elif}\;y \leq -0.0003124677607253619 \lor \neg \left(y \leq 7.6669548423569 \cdot 10^{-14}\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;\left(x + 1\right) - y \cdot z\\ \end{array}\]
Alternative 4
Error12.3
Cost6920
\[\begin{array}{l} \mathbf{if}\;y \leq -0.0002719120595556238 \lor \neg \left(y \leq 7.6669548423569 \cdot 10^{-14}\right):\\ \;\;\;\;x + \cos y\\ \mathbf{else}:\\ \;\;\;\;\left(x + 1\right) - y \cdot z\\ \end{array}\]
Alternative 5
Error19.4
Cost1032
\[\begin{array}{l} \mathbf{if}\;y \leq -1.753118415588741 \cdot 10^{+30} \lor \neg \left(y \leq 4.083348596622708 \cdot 10^{+26}\right):\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;\left(x + 1\right) - y \cdot \left(z + y \cdot 0.5\right)\\ \end{array}\]
Alternative 6
Error19.3
Cost776
\[\begin{array}{l} \mathbf{if}\;y \leq -3.649977632017701 \lor \neg \left(y \leq 8.531729774650604 \cdot 10^{+29}\right):\\ \;\;\;\;x + 1\\ \mathbf{else}:\\ \;\;\;\;\left(x + 1\right) - y \cdot z\\ \end{array}\]
Alternative 7
Error24.7
Cost192
\[x + 1\]
Alternative 8
Error25.6
Cost706
\[\begin{array}{l} \mathbf{if}\;x \leq -1.4886679085051663 \cdot 10^{-21}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.0194997779622874:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array}\]
Alternative 9
Error50.4
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.1

    \[\left(x + \cos y\right) - z \cdot \sin y\]
  2. Simplified0.1

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

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

Reproduce

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