[Rd] Strange number produced by dnorm

Tong Wang wangtong at usc.edu
Tue Apr 3 10:37:23 CEST 2007

Hi All,
    I just started to learn compiling C codes for R usage, and got a problem when I was playing with my 'hello world' code. 
#include <R.h>
#include <Rdefines.h>    
#include <Rmath.h>

SEXP test( ) {
  double x;
  printf(" x value is: %d \n",x);

   I got the result :    x value is: -466460838 

Could someone explain to me what was wrong here ?

Thanks a lot. 


More information about the R-devel mailing list