Re: [R-pkg-devel] Use of long double in configuration

2025-05-04 Thread J C Nash
By "short double" I simply meant the 64 bit double without the extended precision. Wikipedia has a "long double" article, and is quite good in showing the diversity of interpretations. I've not spent much time looking at the standards since the 80s, except to note the move to make the extended

Re: [R-pkg-devel] Use of long double in configuration

2025-05-04 Thread Simon Urbanek
John, it's sort of the other way around: because neither the implementation, format nor precision of "long double" are defined by the C standard (it's not even required to be based on IEEE 754/IEC 60559 at all), it is essentially left to the compilers+runtimes to do whatever they choose, making

Re: [R-pkg-devel] Use of long double in configuration

2025-04-30 Thread J C Nash
As one of original 30-some members of 1985 IEEE 754, I find it discouraging that we are treating long-double as the exception, when it is the introduction of "short double" in M1 etc chips that have forced the issue. There are strong commercial reasons, but they aren't computational ones. JN On

Re: [R-pkg-devel] Use of long double in configuration

2025-04-30 Thread Tim Taylor
Thank you all! Everything is clear. Tim On Wed, 30 Apr 2025, at 10:07 AM, Tomas Kalibera wrote: > On 4/30/25 10:43, Tim Taylor wrote: >> Cheers for the quick response. >> >> To clarify my question: Is it correct to say that as long as packages do not >> assume the greater precision provided by

Re: [R-pkg-devel] Use of long double in configuration

2025-04-30 Thread Tomas Kalibera
On 4/30/25 10:43, Tim Taylor wrote: Cheers for the quick response. To clarify my question: Is it correct to say that as long as packages do not assume the greater precision provided by 'double' there is no reason they cannot use 'long double' to get *possible* advantages (e.g. in summations)

Re: [R-pkg-devel] Use of long double in configuration

2025-04-30 Thread Tim Taylor
Cheers for the quick response. To clarify my question: Is it correct to say that as long as packages do not assume the greater precision provided by 'double' there is no reason they cannot use 'long double' to get *possible* advantages (e.g. in summations). AFAICT 'long double' is (and has alwa

Re: [R-pkg-devel] Use of long double in configuration

2025-04-30 Thread Simon Urbanek
Tim, no, and as far as I can tell some of the claims in that thread are incorrect. Whether long double is identical to double is irrelevant and has nothing to do with it. R has a configuration option --enable-long-double which governs whether R should use algorithms which can benefit from exte

Re: [R-pkg-devel] Use of long double in configuration

2025-04-30 Thread Uwe Ligges
On 30.04.2025 10:25, Tim Taylor wrote: Is it correct to say that R's conditional use of long double is around ensuring things work on platforms which have 'long double' identical to 'double' types, as opposed to there being an odd compiler targeted that does not even have any concept of 'lon

[R-pkg-devel] Use of long double in configuration

2025-04-30 Thread Tim Taylor
Is it correct to say that R's conditional use of long double is around ensuring things work on platforms which have 'long double' identical to 'double' types, as opposed to there being an odd compiler targeted that does not even have any concept of 'long double' type? As background this was mot