Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!unido!tub!net From: net@tub.UUCP (Oliver Laumann) Newsgroups: comp.lang.c Subject: Math library functions and error checking Message-ID: <1323@tub.UUCP> Date: 4 May 90 10:40:27 GMT Reply-To: net@tub.UUCP (Oliver Laumann) Organization: Technical University of Berlin, Germany Lines: 11 What is the correct method to check whether an exception (overflow, invalid arguments, etc.) occurred during the execution of a C math library function (such as sqrt() or sin())? Do I have to test the result against NaN, or do I have to check errno (EDOM)? If the latter is true, is errno cleared automatically on success or do I have to clear it before calling the function? Thanks, -- Oliver Laumann net@TUB.BITNET net@tub.cs.tu-berlin.de net@tub.UUCP