Average Error: 0.1 → 0.1
Time: 4.7s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right)\]
x \cdot \frac{\sin y}{y}
x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right)
double f(double x, double y) {
        double r128344 = x;
        double r128345 = y;
        double r128346 = sin(r128345);
        double r128347 = r128346 / r128345;
        double r128348 = r128344 * r128347;
        return r128348;
}

double f(double x, double y) {
        double r128349 = x;
        double r128350 = y;
        double r128351 = sin(r128350);
        double r128352 = r128351 / r128350;
        double r128353 = log1p(r128352);
        double r128354 = expm1(r128353);
        double r128355 = r128349 * r128354;
        return r128355;
}

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 expm1-log1p-u0.1

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

    \[\leadsto x \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right)\]

Reproduce

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