Average Error: 0.1 → 0.2
Time: 11.5s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[x \cdot \left(\sin y \cdot \frac{1}{y}\right)\]
x \cdot \frac{\sin y}{y}
x \cdot \left(\sin y \cdot \frac{1}{y}\right)
double f(double x, double y) {
        double r102023 = x;
        double r102024 = y;
        double r102025 = sin(r102024);
        double r102026 = r102025 / r102024;
        double r102027 = r102023 * r102026;
        return r102027;
}

double f(double x, double y) {
        double r102028 = x;
        double r102029 = y;
        double r102030 = sin(r102029);
        double r102031 = 1.0;
        double r102032 = r102031 / r102029;
        double r102033 = r102030 * r102032;
        double r102034 = r102028 * r102033;
        return r102034;
}

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.2

    \[\leadsto x \cdot \color{blue}{\left(\sin y \cdot \frac{1}{y}\right)}\]
  4. Final simplification0.2

    \[\leadsto x \cdot \left(\sin y \cdot \frac{1}{y}\right)\]

Reproduce

herbie shell --seed 2019235 
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  :precision binary64
  (* x (/ (sin y) y)))