Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site brl-tgr.ARPA Path: utzoo!linus!decvax!harpo!seismo!brl-tgr!gwyn From: gwyn@brl-tgr.ARPA (Doug Gwyn ) Newsgroups: net.bugs.usg Subject: bug in hypot(3M) Message-ID: <3101@brl-tgr.ARPA> Date: Fri, 6-Jul-84 14:48:56 EDT Article-I.D.: brl-tgr.3101 Posted: Fri Jul 6 14:48:56 1984 Date-Received: Sun, 8-Jul-84 00:20:18 EDT Organization: Ballistics Research Lab Lines: 14 There is a bug in the hypot(3M) routine in UNIX System V Release 1.0, in that arguments of (0.0, 0.0) cause a divide-by-zero error. I do not know whether this has been fixed in later releases. The following editing transcript shows how to fix the bug: ed - hypot.c 1 /* @(#)hypot.c 1.6 */ /\/=/i if ( b == 0.0 ) /* DAG -- bug fix */ return 0.0; /* DAG */ . w q