🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.usg
Article #43

bug in hypot(3M)

#43
From: Doug Gwyn <gwyn>
Date: Fri, 06 Jul 1984 18:48
14 lines
874 bytes
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
Technical Details
Message-ID: <3101@brl-tgr.ARPA>
Path: arc1-ca.pugleaf.net!utzoo!linus!decvax!harpo!seismo!brl-tgr!gwyn

Show Full Headers
Complete Article Headers
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: arc1-ca.pugleaf.net!utzoo!linus!decvax!harpo!seismo!brl-tgr!gwyn
From: gwyn@brl-tgr.ARPA (Doug Gwyn <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