Skip to content
Prev 37690 / 63421 Next

Non identical numerical results from R code vs C/C++ code?

Thanks Paul for the hints.
After some tests, reducing portion of my code, I found that simply doing 
a naive computation of 'crossprod' in C does NOT give exactly the same 
results as calling the Fortran underlying routine (dsyrk) as used in the 
R source code.
I will try the double 0.0 to see if it makes a difference.

What do you mean by

"You also need to be careful about
conversion from integer to real, to do double conversion."


?
Where are the trap in this type of conversion?
Thanks.

Renaud
On 10/09/2010 16:07, Paul Gilbert wrote: