Average Error: 0.0 → 0.0
Time: 1.8s
Precision: binary64
Cost: 6976
\[\sqrt{1 - x \cdot x} \]
\[\left(1 + \sqrt{1 - x \cdot x}\right) + -1 \]
(FPCore (x) :precision binary64 (sqrt (- 1.0 (* x x))))
(FPCore (x) :precision binary64 (+ (+ 1.0 (sqrt (- 1.0 (* x x)))) -1.0))
double code(double x) {
	return sqrt((1.0 - (x * x)));
}
double code(double x) {
	return (1.0 + sqrt((1.0 - (x * x)))) + -1.0;
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = sqrt((1.0d0 - (x * x)))
end function
real(8) function code(x)
    real(8), intent (in) :: x
    code = (1.0d0 + sqrt((1.0d0 - (x * x)))) + (-1.0d0)
end function
public static double code(double x) {
	return Math.sqrt((1.0 - (x * x)));
}
public static double code(double x) {
	return (1.0 + Math.sqrt((1.0 - (x * x)))) + -1.0;
}
def code(x):
	return math.sqrt((1.0 - (x * x)))
def code(x):
	return (1.0 + math.sqrt((1.0 - (x * x)))) + -1.0
function code(x)
	return sqrt(Float64(1.0 - Float64(x * x)))
end
function code(x)
	return Float64(Float64(1.0 + sqrt(Float64(1.0 - Float64(x * x)))) + -1.0)
end
function tmp = code(x)
	tmp = sqrt((1.0 - (x * x)));
end
function tmp = code(x)
	tmp = (1.0 + sqrt((1.0 - (x * x)))) + -1.0;
end
code[x_] := N[Sqrt[N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_] := N[(N[(1.0 + N[Sqrt[N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]
\sqrt{1 - x \cdot x}
\left(1 + \sqrt{1 - x \cdot x}\right) + -1

Error

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. Applied egg-rr0.0

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

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

Alternatives

Alternative 1
Error0.0
Cost6720
\[\sqrt{1 - x \cdot x} \]
Alternative 2
Error0.6
Cost64
\[1 \]

Error

Reproduce

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