judge@alchemy.tcnet.ithaca.ny.us (Rory Toma) (02/19/91)
I seem to be having trouble getting the two to be mutually compatable. My system crashes, so it's hard to detect errors. Any suggestions? rory
ben@epmooch.UUCP (Rev. Ben A. Mesander) (02/20/91)
>In article <VmcmX4w162w@alchemy.tcnet.ithaca.ny.us> judge@alchemy.tcnet.ithaca.ny.us (Rory Toma) writes: >I seem to be having trouble getting the two to be mutually compatable. >My system crashes, so it's hard to detect errors. Any suggestions? > If you compile with a debug level, and run under cpr, it will catch many otherwise GURU-causing problems. CPR has a few little faults, but for the most part, is wonderful. One of its faults is that it only understands certain floating point math modes, so be sure and read the documentation for the 'dump float' to make sure you compile in the right mode. I've had many SAS/C programs that work fine with GCC, work fine with SAS's built-in math modes, crash like crazy with the library floating point options. Yes, Virginia, I know how to use the right compiler switches and how to link with the right math library. It sure would be nice if CPR could help me find the problem... These are established programs that have been running on other platforms/compilers with no problem. >rory -- ben@epmooch.UUCP ben%servalan.UUCP@uokmax.ecn.uoknor.edu {chinet,uokmax}!servalan!epmooch!ben (Ben Mesander) War in gulf: newpath 288 396 216 0 360 arc 288 612 moveto 288 180 lineto 288 396 moveto 136 244 lineto 288 396 moveto 440 244 lineto 36 setlinewidth stroke showpage
baker@wbc.enet.dec.com (02/20/91)
-Message-Text-Follows- >I seem to be having trouble getting the two to be mutually compatable. >My system crashes, so it's hard to detect errors. Any suggestions? >rory I've found that one has to take the code in Numerical Recipes in C with a grain of salt (pardon the pun). There are a lot of quirky little things that they do. It's best to read their description of the algorithm, get a good grasp on what they're trying to do, then check the details of their implementation. You don't get no free lunch with "Numerical Recipes" ... Regards, Art Baker
pswanson@umvlsi.ecs.umass.edu (Paul Swanson) (02/21/91)
In article <1991Feb20.145015.21284@decuac.dec.com> baker@wbc.enet.dec.com writes: > > I've found that one has to take the code in Numerical Recipes > in C with a grain of salt (pardon the pun). There are a lot > of quirky little things that they do. It's best to read their > description of the algorithm, get a good grasp on what they're > trying to do, then check the details of their implementation. > > Regards, > Art Baker I have noticed that the C version of the code in Nerical Recipes is directly transcribed from the Fortran version. This includes things like using array indicies starting with 1 instead of 0 and completely ignoring the existence of pointers. I tend to do my own translation from Fortan to C because it comes out better. Paul.