Re: [Rd] c++ code on amd64

2006-04-17 Thread Thomas Lumley
On Sun, 16 Apr 2006, Prof Brian Ripley wrote: > You mention 'float' repeatedly. A %f argument in Rprintf (and printf) > refers to a _double_. Given how little you have shown us it has to be > entirely guesswork, but is cel.GetIntensity(1) perhaps a float? If so > what happens is I believe undef

Re: [Rd] c++ code on amd64

2006-04-16 Thread Kasper Daniel Hansen
Prof Ripley (and others): Thank you very much for the idea of the casting problems inside Rprintf. Unfortunately that did not work. I have now trimmed everything to a simple example, see below. The cel methods are indeed defined as floats respectively integers like class FusionCELData { p

Re: [Rd] c++ code on amd64

2006-04-16 Thread Prof Brian Ripley
You mention 'float' repeatedly. A %f argument in Rprintf (and printf) refers to a _double_. Given how little you have shown us it has to be entirely guesswork, but is cel.GetIntensity(1) perhaps a float? If so what happens is I believe undefined and compiler-specific. (Normally headers forc

[Rd] c++ code on amd64

2006-04-16 Thread Kasper Daniel Hansen
Hi Brief synopsis: I am having a rather peculiar problem regarding a C++ library. It seems that functions from this library behave differently when compiled using R as opposed to being compiled directly from the command line. The problem is only seen on the amd64 platform (using gcc 4.0.2