Skip to content

Instantly share code, notes, and snippets.

@jayemerson
Created July 10, 2011 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayemerson/1074268 to your computer and use it in GitHub Desktop.
Save jayemerson/1074268 to your computer and use it in GitHub Desktop.
This works and does what I want...
sub rexp(*@args) {
return Q:PIR {
$P0 = find_lex '@args'
.local num arg1
arg1 = $P0[0]
.local pmc libRmath, rexp
.local num ans
libRmath = loadlib "libRmath"
rexp = dlfunc libRmath, "rexp", "dd"
ans = rexp(arg1)
%r = box ans
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment