Average Error: 0.1 → 0.1
Time: 33.7s
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.8
Cost7048
\[\begin{array}{l} \mathbf{if}\;x \leq -1.200477246076265 \cdot 10^{+95} \lor \neg \left(x \leq 6.883527615635147 \cdot 10^{+64}\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;x - z \cdot \sin y\\ \end{array}\]
Alternative 2
Error16.5
Cost8261
\[\begin{array}{l} \mathbf{if}\;y \leq -2.987572139209016 \cdot 10^{+94}:\\ \;\;\;\;x \cdot \cos y\\ \mathbf{elif}\;y \leq -2.0866100708274394 \cdot 10^{+42}:\\ \;\;\;\;-z \cdot \sin y\\ \mathbf{elif}\;y \leq -0.0007837728650564244:\\ \;\;\;\;x \cdot \cos y\\ \mathbf{elif}\;y \leq 2.710610693309144 \cdot 10^{-10}:\\ \;\;\;\;x - y \cdot z\\ \mathbf{elif}\;y \leq 4.964768059498051 \cdot 10^{+235}:\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;-z \cdot \sin y\\ \end{array}\]
Alternative 3
Error16.6
Cost6920
\[\begin{array}{l} \mathbf{if}\;y \leq -0.00012454247102483822 \lor \neg \left(y \leq 2.710610693309144 \cdot 10^{-10}\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;x - y \cdot z\\ \end{array}\]
Alternative 4
Error30.9
Cost320
\[x - y \cdot z\]
Alternative 5
Error38.1
Cost898
\[\begin{array}{l} \mathbf{if}\;x \leq -1.3864080488888556 \cdot 10^{-26}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 1.372989190797458 \cdot 10^{-177}:\\ \;\;\;\;-y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array}\]
Alternative 6
Error38.8
Cost64
\[x\]

Error

Time

Derivation

  1. Initial program 0.1

    \[x \cdot \cos y - z \cdot \sin y\]
  2. Using strategy rm
  3. Applied *-un-lft-identity_binary64_82620.1

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \cos y\right)} - z \cdot \sin y\]
  4. Using strategy rm
  5. Applied *-un-lft-identity_binary64_82620.1

    \[\leadsto \color{blue}{1 \cdot \left(1 \cdot \left(x \cdot \cos y\right) - z \cdot \sin y\right)}\]
  6. Simplified0.1

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

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

Reproduce

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