Average Error: 0.1 → 0.1
Time: 5.5s
Precision: binary64
Cost: 13248
\[x \cdot \cos y + z \cdot \sin y\]
\[z \cdot \sin y + x \cdot \cos y\]
x \cdot \cos y + z \cdot \sin y
z \cdot \sin y + x \cdot \cos y
(FPCore (x y z) :precision binary64 (+ (* x (cos y)) (* z (sin y))))
(FPCore (x y z) :precision binary64 (+ (* z (sin y)) (* x (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 (z * sin(y)) + (x * cos(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
Error8.3
Cost7048
\[\begin{array}{l} \mathbf{if}\;x \leq -1.470539932393163 \cdot 10^{+62} \lor \neg \left(x \leq 1.2283565887335996 \cdot 10^{+85}\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \sin y + x\\ \end{array}\]
Alternative 2
Error15.9
Cost7562
\[\begin{array}{l} \mathbf{if}\;y \leq -0.0003122042002747951:\\ \;\;\;\;x \cdot \cos y\\ \mathbf{elif}\;y \leq 0.0001253325168202152:\\ \;\;\;\;x + y \cdot \left(z + y \cdot \left(x \cdot -0.5\right)\right)\\ \mathbf{elif}\;y \leq 1.0783110509492972 \cdot 10^{+250} \lor \neg \left(y \leq 3.7818007728958533 \cdot 10^{+291}\right):\\ \;\;\;\;z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \cos y\\ \end{array}\]
Alternative 3
Error16.2
Cost6920
\[\begin{array}{l} \mathbf{if}\;y \leq -0.0003122042002747951 \lor \neg \left(y \leq 152215.74440737173\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot \left(z + y \cdot \left(x \cdot -0.5\right)\right)\\ \end{array}\]
Alternative 4
Error30.7
Cost320
\[x + z \cdot y\]
Alternative 5
Error38.9
Cost64
\[x\]
Alternative 6
Error61.8
Cost64
\[1\]

Error

Derivation

  1. Initial program 0.1

    \[x \cdot \cos y + z \cdot \sin y\]
  2. Simplified0.1

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

    \[\leadsto z \cdot \sin y + x \cdot \cos y\]

Reproduce

herbie shell --seed 2021044 
(FPCore (x y z)
  :name "Diagrams.ThreeD.Transform:aboutY from diagrams-lib-1.3.0.3"
  :precision binary64
  (+ (* x (cos y)) (* z (sin y))))