Average Error: 0.1 → 0.1
Time: 8.3s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\frac{\sin y}{y} \cdot x\]
x \cdot \frac{\sin y}{y}
\frac{\sin y}{y} \cdot x
double f(double x, double y) {
        double r110286 = x;
        double r110287 = y;
        double r110288 = sin(r110287);
        double r110289 = r110288 / r110287;
        double r110290 = r110286 * r110289;
        return r110290;
}

double f(double x, double y) {
        double r110291 = y;
        double r110292 = sin(r110291);
        double r110293 = r110292 / r110291;
        double r110294 = x;
        double r110295 = r110293 * r110294;
        return r110295;
}

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. Taylor expanded around inf 7.0

    \[\leadsto \color{blue}{\frac{x \cdot \sin y}{y}}\]
  3. Simplified0.2

    \[\leadsto \color{blue}{\frac{x}{\frac{y}{\sin y}}}\]
  4. Using strategy rm
  5. Applied div-inv0.2

    \[\leadsto \color{blue}{x \cdot \frac{1}{\frac{y}{\sin y}}}\]
  6. Simplified0.1

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

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

Reproduce

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