Average Error: 0.1 → 0.1
Time: 46.2s
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.7
Cost7048
\[\begin{array}{l} \mathbf{if}\;z \leq -4.411552019242329 \lor \neg \left(z \leq 9.231496610728872 \cdot 10^{-110}\right):\\ \;\;\;\;x + z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;x \cdot \cos y\\ \end{array}\]
Alternative 2
Error15.4
Cost7562
\[\begin{array}{l} \mathbf{if}\;y \leq -0.0007964734916068528:\\ \;\;\;\;x \cdot \cos y\\ \mathbf{elif}\;y \leq 0.17893328512251064:\\ \;\;\;\;\left(x + y \cdot z\right) - \left(y \cdot y\right) \cdot \left(x \cdot 0.5 + y \cdot \left(z \cdot 0.16666666666666666\right)\right)\\ \mathbf{elif}\;y \leq 5.116343572629984 \cdot 10^{+246} \lor \neg \left(y \leq 1.9157988469942 \cdot 10^{+276}\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \sin y\\ \end{array}\]
Alternative 3
Error15.5
Cost6920
\[\begin{array}{l} \mathbf{if}\;y \leq -0.0007964734916068528 \lor \neg \left(y \leq 0.05272274975251243\right):\\ \;\;\;\;x \cdot \cos y\\ \mathbf{else}:\\ \;\;\;\;\left(x + y \cdot z\right) - \left(y \cdot y\right) \cdot \left(x \cdot 0.5 + y \cdot \left(z \cdot 0.16666666666666666\right)\right)\\ \end{array}\]
Alternative 4
Error30.5
Cost320
\[x + y \cdot z\]
Alternative 5
Error37.1
Cost834
\[\begin{array}{l} \mathbf{if}\;x \leq -6.00319968229266 \cdot 10^{-171}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 8.499998298007809 \cdot 10^{-103}:\\ \;\;\;\;y \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array}\]
Alternative 6
Error38.7
Cost64
\[x\]

Error

Time

Derivation

  1. Initial program 0.1

    \[x \cdot \cos y + z \cdot \sin y\]
  2. Using strategy rm
  3. Applied pow1_binary64_76410.1

    \[\leadsto x \cdot \cos y + z \cdot \color{blue}{{\sin y}^{1}}\]
  4. Applied pow1_binary64_76410.1

    \[\leadsto x \cdot \cos y + \color{blue}{{z}^{1}} \cdot {\sin y}^{1}\]
  5. Applied pow-prod-down_binary64_76510.1

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

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

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

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

Reproduce

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