From r.d.morey at rug.nl  Thu Oct  7 20:28:32 2010
From: r.d.morey at rug.nl (Richard D. Morey)
Date: Thu, 07 Oct 2010 20:28:32 +0200
Subject: [Rd] long double, C, fortran
In-Reply-To: <mailman.21.1286445608.10801.r-devel@r-project.org>
References: <mailman.21.1286445608.10801.r-devel@r-project.org>
Message-ID: <4CAE1150.2050006@rug.nl>

  I'm using .Call() to call C code from R under Windows (on an Intel 
Core 2 duo). The C code involves some very small numbers, and I think 
I'm losing precision using doubles. I thought I might use long doubles 
to see if I can get that precision back. I have a few questions:

1. Does this affect the portability to other OSs or processors?
2. I'm returning the results in a matrix. Will a matrix of REALs be 
sufficient for holding long doubles, or will it be cast back to doubles?
3. Will calls to FORTRAN BLAS (like dsymv, dpotrf, dpotri) still work 
with long doubles?

Thanks for any help you can provide.

-- 
Richard D. Morey
Assistant Professor
Psychometrics and Statistics
Rijksuniversiteit Groningen / University of Groningen
http://drsmorey.org/research/rdmorey



[Rd] long double, C, fortran
Richard D. Morey