?

Average Accuracy: 100.0% → 99.6%
Time: 1.7s
Precision: binary64
Cost: 448

?

\[\sqrt{1 - x \cdot x} \]
\[1 + -0.5 \cdot \left(x \cdot x\right) \]
(FPCore (x) :precision binary64 (sqrt (- 1.0 (* x x))))
(FPCore (x) :precision binary64 (+ 1.0 (* -0.5 (* x x))))
double code(double x) {
	return sqrt((1.0 - (x * x)));
}
double code(double x) {
	return 1.0 + (-0.5 * (x * x));
}
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 + ((-0.5d0) * (x * x))
end function
public static double code(double x) {
	return Math.sqrt((1.0 - (x * x)));
}
public static double code(double x) {
	return 1.0 + (-0.5 * (x * x));
}
def code(x):
	return math.sqrt((1.0 - (x * x)))
def code(x):
	return 1.0 + (-0.5 * (x * x))
function code(x)
	return sqrt(Float64(1.0 - Float64(x * x)))
end
function code(x)
	return Float64(1.0 + Float64(-0.5 * Float64(x * x)))
end
function tmp = code(x)
	tmp = sqrt((1.0 - (x * x)));
end
function tmp = code(x)
	tmp = 1.0 + (-0.5 * (x * x));
end
code[x_] := N[Sqrt[N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_] := N[(1.0 + N[(-0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\sqrt{1 - x \cdot x}
1 + -0.5 \cdot \left(x \cdot x\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 100.0%

    \[\sqrt{1 - x \cdot x} \]
  2. Taylor expanded in x around 0 100.0%

    \[\leadsto \color{blue}{1 + -0.5 \cdot {x}^{2}} \]
  3. Simplified100.0%

    \[\leadsto \color{blue}{1 + -0.5 \cdot \left(x \cdot x\right)} \]
    Step-by-step derivation

    [Start]100.0

    \[ 1 + -0.5 \cdot {x}^{2} \]

    unpow2 [=>]100.0

    \[ 1 + -0.5 \cdot \color{blue}{\left(x \cdot x\right)} \]
  4. Final simplification100.0%

    \[\leadsto 1 + -0.5 \cdot \left(x \cdot x\right) \]

Alternatives

Alternative 1
Accuracy99.1%
Cost64
\[1 \]

Error

Reproduce?

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