Average Error: 0.0 → 0.0
Time: 3.5s
Precision: 64
\[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
\[\log \left(\frac{1}{x} + \sqrt{\sqrt{1} + x} \cdot \frac{\sqrt{\sqrt{1} - x}}{x}\right)\]
\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)
\log \left(\frac{1}{x} + \sqrt{\sqrt{1} + x} \cdot \frac{\sqrt{\sqrt{1} - x}}{x}\right)
double f(double x) {
        double r41348 = 1.0;
        double r41349 = x;
        double r41350 = r41348 / r41349;
        double r41351 = r41349 * r41349;
        double r41352 = r41348 - r41351;
        double r41353 = sqrt(r41352);
        double r41354 = r41353 / r41349;
        double r41355 = r41350 + r41354;
        double r41356 = log(r41355);
        return r41356;
}

double f(double x) {
        double r41357 = 1.0;
        double r41358 = x;
        double r41359 = r41357 / r41358;
        double r41360 = sqrt(r41357);
        double r41361 = r41360 + r41358;
        double r41362 = sqrt(r41361);
        double r41363 = r41360 - r41358;
        double r41364 = sqrt(r41363);
        double r41365 = r41364 / r41358;
        double r41366 = r41362 * r41365;
        double r41367 = r41359 + r41366;
        double r41368 = log(r41367);
        return r41368;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{x}\right)\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.0

    \[\leadsto \log \left(\frac{1}{x} + \frac{\sqrt{1 - x \cdot x}}{\color{blue}{1 \cdot x}}\right)\]
  4. Applied add-sqr-sqrt0.0

    \[\leadsto \log \left(\frac{1}{x} + \frac{\sqrt{\color{blue}{\sqrt{1} \cdot \sqrt{1}} - x \cdot x}}{1 \cdot x}\right)\]
  5. Applied difference-of-squares0.0

    \[\leadsto \log \left(\frac{1}{x} + \frac{\sqrt{\color{blue}{\left(\sqrt{1} + x\right) \cdot \left(\sqrt{1} - x\right)}}}{1 \cdot x}\right)\]
  6. Applied sqrt-prod0.0

    \[\leadsto \log \left(\frac{1}{x} + \frac{\color{blue}{\sqrt{\sqrt{1} + x} \cdot \sqrt{\sqrt{1} - x}}}{1 \cdot x}\right)\]
  7. Applied times-frac0.0

    \[\leadsto \log \left(\frac{1}{x} + \color{blue}{\frac{\sqrt{\sqrt{1} + x}}{1} \cdot \frac{\sqrt{\sqrt{1} - x}}{x}}\right)\]
  8. Simplified0.0

    \[\leadsto \log \left(\frac{1}{x} + \color{blue}{\sqrt{\sqrt{1} + x}} \cdot \frac{\sqrt{\sqrt{1} - x}}{x}\right)\]
  9. Final simplification0.0

    \[\leadsto \log \left(\frac{1}{x} + \sqrt{\sqrt{1} + x} \cdot \frac{\sqrt{\sqrt{1} - x}}{x}\right)\]

Reproduce

herbie shell --seed 2020046 
(FPCore (x)
  :name "Hyperbolic arc-(co)secant"
  :precision binary64
  (log (+ (/ 1 x) (/ (sqrt (- 1 (* x x))) x))))