Average Error: 0.4 → 0.5
Time: 12.4s
Precision: 64
\[\frac{1}{1 - \sin x}\]
\[\frac{1}{{e}^{\left(\log \left(1 - \sin x\right)\right)}}\]
\frac{1}{1 - \sin x}
\frac{1}{{e}^{\left(\log \left(1 - \sin x\right)\right)}}
double f(double x) {
        double r24170730 = 1.0;
        double r24170731 = x;
        double r24170732 = sin(r24170731);
        double r24170733 = r24170730 - r24170732;
        double r24170734 = r24170730 / r24170733;
        return r24170734;
}

double f(double x) {
        double r24170735 = 1.0;
        double r24170736 = exp(1.0);
        double r24170737 = x;
        double r24170738 = sin(r24170737);
        double r24170739 = r24170735 - r24170738;
        double r24170740 = log(r24170739);
        double r24170741 = pow(r24170736, r24170740);
        double r24170742 = r24170735 / r24170741;
        return r24170742;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.4

    \[\frac{1}{1 - \sin x}\]
  2. Using strategy rm
  3. Applied add-exp-log0.4

    \[\leadsto \frac{1}{\color{blue}{e^{\log \left(1 - \sin x\right)}}}\]
  4. Using strategy rm
  5. Applied pow10.4

    \[\leadsto \frac{1}{e^{\log \color{blue}{\left({\left(1 - \sin x\right)}^{1}\right)}}}\]
  6. Applied log-pow0.4

    \[\leadsto \frac{1}{e^{\color{blue}{1 \cdot \log \left(1 - \sin x\right)}}}\]
  7. Applied exp-prod0.5

    \[\leadsto \frac{1}{\color{blue}{{\left(e^{1}\right)}^{\left(\log \left(1 - \sin x\right)\right)}}}\]
  8. Simplified0.5

    \[\leadsto \frac{1}{{\color{blue}{e}}^{\left(\log \left(1 - \sin x\right)\right)}}\]
  9. Final simplification0.5

    \[\leadsto \frac{1}{{e}^{\left(\log \left(1 - \sin x\right)\right)}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "1/(1-sin(x))"
  (/ 1.0 (- 1.0 (sin x))))