From mpietro at outlook.com  Sat Dec  8 03:26:26 2012
From: mpietro at outlook.com (mpietro)
Date: Fri, 7 Dec 2012 18:26:26 -0800 (PST)
Subject: [Rd] C function, double problem
Message-ID: <1354933586648-4652537.post@n4.nabble.com>

Hi everybody,

here's my problem:

i call a C function which calculates a large number of double values and
puts them into an array which is passed from R as a parameter in the
function (like  .C("function", other parameters, result =  as.double( c ( 1
: quantity ) ). 
When the values come back to R in the result array, they are all truncated
to their integer value (i.e. I lose the decimal parts). 
I think that the problem is that this calculated double numbers are actually
too long, with many decimals, because i changed in code  the calculated
values with arbitrary double values with a few decimals and it works.

Has anybody any idea of where the problem is?

Thanks in advance!



--
View this message in context: http://r.789695.n4.nabble.com/C-function-double-problem-tp4652537.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] C function, double problem
mpietro