[R] R install on silicon Mac lacks long.double capability

Richard O'Keefe r@oknz @end|ng |rom gm@||@com
Thu Oct 23 22:19:41 CEST 2025


Just a general observation: long double doesn't have to be supported
*in silicon* to be available and useful.
"__float128 is available on i386, x86_64, IA-64, LoongArch and hppa
HP-UX, as well as on PowerPC..." (GCC).
I used to use long double a lot on UltraSPARC where it was not
implemented in the hardware but emulated.
The binary128 format has been part of IEEE arithmetic since IEEE
754-2008 if not before.
There are also several double-double libraries out there for C and C++l
'long double' in C does not mean 80-bit and never has, it just meant
'whatever you have that is at least
as good as double'. I've seen 64-bit, 80-bit, 80 bits stored in 96,
and 128-bit long doubles.
The bottom line is that wider-than-64-bit floats could very well be
supported on Macs *whatever* the hardware does.
If they *aren't*, that's a business decision by Apple and others.

On Fri, 24 Oct 2025 at 07:47, Jeff Newmiller via R-help
<r-help using r-project.org> wrote:
>
> a) This belongs on r-sig-mac.
>
> b) Apple silicon does not support long double. Run an emulator for an architecture that does, or obtain another computer (e.g. cloud computing?)
>
> c) Don't use homebrew?
>
> On October 23, 2025 8:47:09 AM PDT, Naresh Gurbuxani <naresh_gurbuxani using hotmail.com> wrote:
> >On my new macbook pro, I installed R using package installer R-4.5.1-arm64.pkg
> >My installation lacks long.double and libxml capabilities.  How can these be enabled?
> >
> >My installation was in two steps:
> >1.  Install Xcode developer tools (sudo xcode-select install), GNU fortran compiler (gfortran-14.2-universal.pkg at cran), gnu readline, liblzma, and pcre2 (using macports), texlive, and Xquartz.  Install R using above package installer.
> >2.  Source install.R from https://mac.r-project.org/bin/.  In sudo R session, run install.libs("r-base-dev").  Reinstall R using above package installer.
> >
> >> capabilities()
> >       jpeg         png        tiff       tcltk         X11        aqua
> >       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE
> >   http/ftp     sockets      libxml        fifo      cledit       iconv
> >       TRUE        TRUE       FALSE        TRUE        TRUE        TRUE
> >        NLS       Rprof     profmem       cairo         ICU long.double
> >       TRUE        TRUE        TRUE        TRUE        TRUE       FALSE
> >    libcurl
> >       TRUE
> >> sessionInfo()
> >R version 4.5.1 (2025-06-13)
> >Platform: aarch64-apple-darwin20
> >Running under: macOS Sequoia 15.4.1
> >
> >Matrix products: default
> >BLAS:   /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRblas.0.dylib
> >LAPACK: /Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.1
> >
> >locale:
> >[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> >
> >time zone: America/New_York
> >tzcode source: internal
> >
> >attached base packages:
> >[1] stats     graphics  utils     datasets  grDevices methods   base
> >
> >other attached packages:
> >[1] latticeExtra_0.6-31 lattice_0.22-7      colorspace_2.1-2
> >
> >loaded via a namespace (and not attached):
> >[1] compiler_4.5.1     deldir_2.0-4       RColorBrewer_1.1-3 Rcpp_1.1.0
> >[5] interp_1.1-6       jpeg_0.1-11        grid_4.5.1         png_0.1-8
> >>
> >
> >nareshgurbuxani$ gfortran --version
> >GNU Fortran (GCC) 14.2.0
> >Copyright (C) 2024 Free Software Foundation, Inc.
> >This is free software; see the source for copying conditions.  There is NO
> >warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> >______________________________________________
> >R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
> --
> Sent from my phone. Please excuse my brevity.
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list