(FPCore (x) :precision binary64 (sqrt (- 1.0 (* x x))))
(FPCore (x) :precision binary64 (exp (* 0.5 (log1p (* x (- x))))))
double code(double x) {
return sqrt((1.0 - (x * x)));
}
double code(double x) {
return exp((0.5 * log1p((x * -x))));
}
public static double code(double x) {
return Math.sqrt((1.0 - (x * x)));
}
public static double code(double x) {
return Math.exp((0.5 * Math.log1p((x * -x))));
}
def code(x): return math.sqrt((1.0 - (x * x)))
def code(x): return math.exp((0.5 * math.log1p((x * -x))))
function code(x) return sqrt(Float64(1.0 - Float64(x * x))) end
function code(x) return exp(Float64(0.5 * log1p(Float64(x * Float64(-x))))) end
code[x_] := N[Sqrt[N[(1.0 - N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[x_] := N[Exp[N[(0.5 * N[Log[1 + N[(x * (-x)), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\sqrt{1 - x \cdot x}
e^{0.5 \cdot \mathsf{log1p}\left(x \cdot \left(-x\right)\right)}



Bits error versus x
Results
Initial program 0.0
Applied egg-rr0.0
Final simplification0.0
herbie shell --seed 2022148
(FPCore (x)
:name "Diagrams.TwoD.Ellipse:ellipse from diagrams-lib-1.3.0.3"
:precision binary64
(sqrt (- 1.0 (* x x))))