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