login
Header Space

 
 

hypot bug?

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Subject: hypot bug?
Date: Sunday, May 24, 1992 - 8:48 am

I found the following problem while trying to compile xeyes:

the following program gives a floating point exception:
#include <math.h>
#include <stdio.h>
#define PI 3.1415926535

main () {
double t;
for (t=0;t<10;t++) {
    printf (
"T=%lf, sqrt(t)=%lf, sin (t) = %lf, cos (t) = %lf hypot (t,5)=%lf.\n",
         t,sqrt (t),sin (t*PI/180),cos (t*PI/180),hypot (5.0,t));
    }
}

This comes from the hypot function. xeyes (by default) also uses hypot,
and crashes similarly.

Am I using the wrong libraries or is there really a problem.
( I found hypot.s, which looks ok to me, but then again, I'm not that
familiar with assembly language coprocessor programming.)


                                        Roger
-- 
If the opposite of "pro" is "con", what is the opposite of "progress"? 
(stolen from  kadokev@iitvax.iit.edu, who got it from brydon@asl.sinet.slb.com)
EMail:  wolff@duteca.et.tudelft.nl   ** Tel  +31-15-783644 or +31-15-142371
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
hypot bug?, Rogier Wolff, (Sun May 24, 8:48 am)
speck-geostationary