home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / sci / math / symbolic / 3408 < prev    next >
Encoding:
Text File  |  1993-01-10  |  1.7 KB  |  41 lines

  1. Newsgroups: sci.math.symbolic
  2. Path: sparky!uunet!gumby!wupost!spool.mu.edu!umn.edu!stecher
  3. From: stecher@atlas.socsci.umn.edu (Jack Stecher)
  4. Subject: Compiled Functions in Mma
  5. Message-ID: <C0nFt4.F0B@news2.cis.umn.edu>
  6. Sender: stecher@atlas.socsci.umn.edu
  7. Nntp-Posting-Host: daphne.socsci.umn.edu
  8. Organization: Department of Economics, Univ of Minn
  9. Date: Sun, 10 Jan 1993 17:41:27 GMT
  10. Lines: 29
  11.  
  12. I've been trying to use compiled functions in Mma 2.1, and have run into
  13. some difficulties.
  14.  
  15. First, the difficulty I suspect there isn't a way around:  Does anyone know
  16. if there's a way to use Compile when the arguments are matrices?  Didn't
  17. think so....
  18.  
  19. Now, for one that just confuses me:  I'm using Mma on a Dec/Ultrix type
  20. station, and don't know where to find the stats routines.  It's easy enough
  21. to write the formula for a normal density, and the normal cdf can be written
  22. using Erf.  I used Newton's method to solve iteratively for a normal quantile
  23. corresponding to a given probability.
  24.  
  25. When I used uncompiled code for my everything, solving the normal quantile
  26. for .0001 took something like 8 seconds; with compiled code, it took something
  27. like half a second.  But then I loaded a data set to do statistical calcula-
  28. tions on.  The calculations used my compiled code within the routines (I
  29. was computing log-likelihood functions), and were incredibly slow.  Well, after
  30. I finished, I timed the normal quantile for .0001, and it took something like
  31. 20 seconds, using compiled code.
  32.  
  33. Anyone have any clues about where I should look for the problem?
  34.  
  35. Jack Stecher
  36. stecher@atlas.socsci.umn.edu
  37. --
  38. A government big enough to give you all you want
  39. is big enough to take it all away.
  40.                         --Barry Goldwater
  41.