Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!ucsdhub!calmasd!wlp From: wlp@calmasd.Prime.COM (Walter L. Peterson, Jr.) Newsgroups: comp.lang.c Subject: Turbo-C Debugger Oddity Keywords: Turbo-C Debugger, Floating Point Errors Message-ID: <210@calmasd.Prime.COM> Date: 6 Feb 89 18:50:14 GMT Organization: Prime-Calma, San Diego R&D, Object and Data Management Group Lines: 36 I have recently encountered an odd situation with the Turbo-C V2.0 Integrated Debugger. I am in the process of making some modifications to some neural net software (Rumelhart & McClelland's PDP book & disks) and I'm compiling it with Turbo-C V2.0. Everything compiles and links OK, but when I run the EXE from the DOS prompt I get the error: Floating Point Error: Domain This occurs soon after the program starts computing the weights in the network, but I'm not certain exactly where ( the software is extensive, and is loaded with floating point computations ). The upshot of all of this is that, in order to find the floating point error, I tried running it in the integrated debugger. Well, Murphy's Law was in effect and so naturally it WORKED! I have tried repeatedly to get the silly thing to fail while in the debugger ( or just running out of the integrated environment at all for that matter ) and it runs perfectly. ( I have checked the results against an unmodified version and the results ARE correct, too ). EVERY time I run the program from the DOS prompt, it fails with the same floating point error at ( apparently ) the same place; EVERY time I run the program from the Turbo-C environment, it works !! While I have seen similar situations with VAX/VMS and occasionally on UNIX ( that is, something that fails when run normally, but works in the debugger ), this is the first time I have seen it in Turbo-C. Has anyone out there ever encountered this type of situation with the Turbo-C environment and if so is there a solution ? -- Walt Peterson. Prime - Calma San Diego R&D (Object and Data Management Group) "The opinions expressed here are my own and do not necessarily reflect those Prime, Calma nor anyone else. ...{ucbvax|decvax}!sdcsvax!calmasd!wlp