Average Error: 0.0 → 0.0
Time: 1.8s
Precision: 64
\[\sqrt{1 - x \cdot x}\]
\[\log \left(e^{\sqrt{1 - x \cdot x}}\right)\]
\sqrt{1 - x \cdot x}
\log \left(e^{\sqrt{1 - x \cdot x}}\right)
double code(double x) {
	return ((double) sqrt(((double) (1.0 - ((double) (x * x))))));
}
double code(double x) {
	return ((double) log(((double) exp(((double) sqrt(((double) (1.0 - ((double) (x * x))))))))));
}

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

    \[\sqrt{1 - x \cdot x}\]
  2. Using strategy rm
  3. Applied add-log-exp0.0

    \[\leadsto \color{blue}{\log \left(e^{\sqrt{1 - x \cdot x}}\right)}\]
  4. Final simplification0.0

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

Reproduce

herbie shell --seed 2020120 
(FPCore (x)
  :name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
  :precision binary64
  (sqrt (- 1 (* x x))))