Skip to content
Prev 2125 / 12125 Next

[R-pkg-devel] New package submission error (ieee_arithmetic)

On Wed, Nov 29, 2017 at 4:37 PM, Waleed Almutiry <walmutir at uoguelph.ca> wrote:
[snip]
Hello, Waleed.

I handled Inf and NaN by writing a C function that passes the magic
code words R_NaN and INFINITY and called them as external functions in
Fortran. See the source code of 'utils_and_wrappers.c' and
'delaporte.f95' at [1] for a working example of "set_nan" and
"set_inf"ideas. Originally, I used the actual bitpatterns to make the
functions pure, if not elemental, but Soldaris SPARC through a fit
since it was the opposite endian from the rest of the known universe.
Using the magic R words will ensure that the proper values will be
passed regardless of platform.

Hope that helps,

Avi

[1] https://bitbucket.org/aadler/delaporte