Average Error: 0.1 → 0.1
Time: 40.0s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\frac{x}{\frac{y}{\sin y}}\]
x \cdot \frac{\sin y}{y}
\frac{x}{\frac{y}{\sin y}}
double f(double x, double y) {
        double r5956338 = x;
        double r5956339 = y;
        double r5956340 = sin(r5956339);
        double r5956341 = r5956340 / r5956339;
        double r5956342 = r5956338 * r5956341;
        return r5956342;
}

double f(double x, double y) {
        double r5956343 = x;
        double r5956344 = y;
        double r5956345 = sin(r5956344);
        double r5956346 = r5956344 / r5956345;
        double r5956347 = r5956343 / r5956346;
        return r5956347;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[x \cdot \frac{\sin y}{y}\]
  2. Using strategy rm
  3. Applied div-inv0.3

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

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot \left(\sin y \cdot \frac{1}{y}\right)\]
  6. Applied associate-*l*0.3

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \left(\sin y \cdot \frac{1}{y}\right)\right)}\]
  7. Simplified0.1

    \[\leadsto 1 \cdot \color{blue}{\frac{x}{\frac{y}{\sin y}}}\]
  8. Final simplification0.1

    \[\leadsto \frac{x}{\frac{y}{\sin y}}\]

Reproduce

herbie shell --seed 2019165 +o rules:numerics
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  (* x (/ (sin y) y)))