---Zsbán Ambrus wrote:
> Sure, just use the implementation in GSL
> (http://www.gnu.org/software/gsl/).  I think this works:
>
>    probit =: 'libgsl.so gsl_cdf_ugaussian_Pinv > d d' & (15!:0"_ 0)
>    probit (%~i.)10
> __ _1.28155 _0.841621 _0.524401 _0.253347 0 0.253347 0.524401
> 0.841621 1.28155

Thanks Ambrus, I got this to work in my Ubuntu VM once I worked out that 
libgsl.so was installed as libgsl.so.0, but haven't had any luck in Windows 
yet. Below is an outline of my investigations in case it helps point out the 
cause of my problem.

Downloaded and installed gsl-1.8.exe from this site: 
<http://gnuwin32.sourceforge.net/packages/gsl.htm>

   load 'dll files'
   fexist 'C:\Program Files\GnuWin32\bin\libgsl.dll'
1
   probit =: '"C:\Program Files\GnuWin32\bin\libgsl.dll"  
gsl_cdf_ugaussian_Pinv > d d' & (15!:0"_ 0)
   probit 0.4
|domain error: probit
|       probit 0.4
   cder''
1 0  NB. file not found

   fexist 'C:\Progra~1\GnuWin32\bin\libgsl.dll'
1
   probit =: 'C:\Progra~1\GnuWin32\bin\libgsl.dll  gsl_cdf_ugaussian_Pinv > d 
d' & (15!:0"_ 0)
   probit 0.4
|domain error: probit
|       probit 0.4
   cder''
1 0
   NB. maybe is is a file required by libgsl.dll that isn't found?
   NB. Try making "C:\Progra~1\GnuWin32\bin" my working dir
   1!:43 ''
C:\Program Files\j602
   1!:44 'C:\Program Files\GnuWin32\bin'

   1!:43 ''
C:\Program Files\GnuWin32\bin
   fexist 'libgsl.dll'
1
   probit =: 'libgsl.dll  gsl_cdf_ugaussian_Pinv > d d' & (15!:0"_ 0)
   probit 0.4
NB. J crashes.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to