Average Error: 0.1 → 0.1
Time: 3.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 r149000 = x;
        double r149001 = y;
        double r149002 = sin(r149001);
        double r149003 = r149002 / r149001;
        double r149004 = r149000 * r149003;
        return r149004;
}

double f(double x, double y) {
        double r149005 = x;
        double r149006 = y;
        double r149007 = sin(r149006);
        double r149008 = r149007 / r149006;
        double r149009 = log1p(r149008);
        double r149010 = expm1(r149009);
        double r149011 = r149005 * r149010;
        return r149011;
}

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 2020057 +o rules:numerics
(FPCore (x y)
  :name "Linear.Quaternion:$cexp from linear-1.19.1.3"
  :precision binary64
  (* x (/ (sin y) y)))