Hello List, Hi Alex,
I'm playing around with the native function again (after a long long time
;-) and somehow I don't manage to call a native wrapper with double arg.

Using rmath from R, random value from poisson distribution:^
 ## double›  rpois(double);

This works
: (native "libRmath.so" "rpois" 1.0 (2.567 . 1.0))
-> 5
: (native "libRmath.so" "rpois" 1.0 (2.567 . 1.0))
  -> 2

This works too:
  ## int› imax2(int, int);

: (de imax2 (X) (native "libRmath.so" "imax2" 'I 3 6))
-> imax2
: (imax2 3 6)
-> 6

but this dumps
: (de rpois (X) (native "libRmath.so" "rpois" 1.0  (X . 1.0) ) )
-> rpois
: (rpois 2.567)
Segmentation fault

When I debug it, X=3 when the function is called.
So probably my function call is wrong?

Cheers
Thorsten

Reply via email to