Average Error: 0.1 → 0.1
Time: 54.2s
Precision: 64
\[x \cdot \frac{\sin y}{y}\]
\[\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right) \cdot x\]
x \cdot \frac{\sin y}{y}
\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right) \cdot x
double f(double x, double y) {
        double r6673535 = x;
        double r6673536 = y;
        double r6673537 = sin(r6673536);
        double r6673538 = r6673537 / r6673536;
        double r6673539 = r6673535 * r6673538;
        return r6673539;
}

double f(double x, double y) {
        double r6673540 = y;
        double r6673541 = sin(r6673540);
        double r6673542 = r6673541 / r6673540;
        double r6673543 = log1p(r6673542);
        double r6673544 = expm1(r6673543);
        double r6673545 = x;
        double r6673546 = r6673544 * r6673545;
        return r6673546;
}

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 \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\sin y}{y}\right)\right) \cdot x\]

Reproduce

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