Average Error: 0.1 → 0.1
Time: 5.4s
Precision: binary64
Cost: 13248
\[x \cdot \cos y - z \cdot \sin y\]
\[x \cdot \cos y - z \cdot \sin y\]
x \cdot \cos y - z \cdot \sin y
x \cdot \cos y - 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
Error8.3
Cost7048
\[\begin{array}{l} \mathbf{if}\;x \leq -5.110291561466219 \cdot 10^{+61} \lor \neg \left(x \leq 1.566947469422516 \cdot 10^{+73}\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \sin y\\ \end{array}\]
Alternative 2
Error16.3
Cost7619
\[\begin{array}{l} \mathbf{if}\;y \leq -2.277340817064507 \cdot 10^{+172}:\\ \;\;\;\;-z \cdot \sin y\\ \mathbf{elif}\;y \leq -0.0003136828338515734:\\ \;\;\;\;x \cdot \cos y\\ \mathbf{elif}\;y \leq 0.035175556323187133:\\ \;\;\;\;x - y \cdot \left(z + y \cdot \left(x \cdot 0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;-z \cdot \sin y\\ \end{array}\]
Alternative 3
Error16.7
Cost6920
\[\begin{array}{l} \mathbf{if}\;y \leq -0.0003136828338515734 \lor \neg \left(y \leq 5.461493382191782 \cdot 10^{+20}\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.9
Cost320
\[x - y \cdot z\]
Alternative 5
Error39.2
Cost64
\[x\]
Alternative 6
Error61.8
Cost64
\[-1\]
Alternative 7
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}{x \cdot \cos y - z \cdot \sin y}\]
  3. Final simplification0.1

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

Reproduce

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