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



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