Question: Is it possible to setup authentication in jboss 4.2.2 (tomcat in fact). to support clients/browsers with cookies disabled.

For now when I block all cookies in IE, after logging int, JBoss returns:
HTTP Status 408 - The time allowed for the login process has been exceeded. If you wish to continue you must either click back twice and re-click the link you requested or close and re-open your browser

Answer: 
You have two issues here: First, `3L` implicitly promotes to `double` not `long double` so even though you assign the return value to a `long double` it's still using the low precision version of `sqrt`. You'll need to `static_cast` 3 to `long double` as the argument. Secondly, only the `double` version of `sqrt` is imported into the global namespace because function overloading isn't supported in C, you have to use `std::sqrt` instead.

Thus:

`long double s=std::sqrt(static_cast<long double>(3));`
Is the value from the 'regular' version of double sqrt() experiencing a greater granularity of rounding than the long double? This is what we would expect. It could be that this 'granular' rounding happens to be hitting close to the correct value - closer than the long double sqrt.

The way to check this would be to try multiple values and compare.