Average Error: 0.1 → 0.1
Time: 40.4s
Precision: binary64
Cost: 576
\[x \cdot \sin y + z \cdot \cos y\]
\[\sin y \cdot x + z \cdot \cos y\]
x \cdot \sin y + z \cdot \cos y
\sin y \cdot x + z \cdot \cos y
(FPCore (x y z) :precision binary64 (+ (* x (sin y)) (* z (cos y))))
(FPCore (x y z) :precision binary64 (+ (* (sin y) x) (* z (cos y))))
double code(double x, double y, double z) {
	return (x * sin(y)) + (z * cos(y));
}
double code(double x, double y, double z) {
	return (sin(y) * x) + (z * 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
Alternative 1
Accuracy0.6
Cost1152
\[\sqrt[3]{\sin y} \cdot \left(x \cdot \left(\sqrt[3]{\sin y} \cdot \sqrt[3]{\sin y}\right)\right) + z \cdot \cos y\]
Alternative 2
Accuracy16.3
Cost1282
\[\begin{array}{l} \mathbf{if}\;y \leq -1.0020864880581464 \cdot 10^{+31}:\\ \;\;\;\;x \cdot \sin y + e^{\log \left(z \cdot \cos y\right)}\\ \mathbf{elif}\;y \leq 889267.4237019415:\\ \;\;\;\;z \cdot \cos y + y \cdot x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \cos y + \sqrt{\sin y} \cdot \left(x \cdot \sqrt{\sin y}\right)\\ \end{array}\]
Alternative 3
Accuracy24.9
Cost1089
\[\begin{array}{l} \mathbf{if}\;y \leq 1.20288981711236 \cdot 10^{-310}:\\ \;\;\;\;x \cdot \sin y + e^{\log \left(z \cdot \cos y\right)}\\ \mathbf{else}:\\ \;\;\;\;z \cdot \cos y + \sqrt{\sin y} \cdot \left(x \cdot \sqrt{\sin y}\right)\\ \end{array}\]
Alternative 4
Accuracy33.9
Cost704
\[x \cdot \sin y + e^{\log \left(z \cdot \cos y\right)}\]

Derivation

  1. Initial program 0.1

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

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \sin y\right)} + z \cdot \cos y\]
  4. Using strategy rm
  5. Applied pow1_binary64_62770.1

    \[\leadsto \color{blue}{{\left(1 \cdot \left(x \cdot \sin y\right) + z \cdot \cos y\right)}^{1}}\]
  6. Using strategy rm
  7. Applied *-commutative_binary64_61470.1

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

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

Reproduce

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