Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Isabeau's mom <berman@fndaut.fnal.gov>
Subject: atan2 on an alpha
Date: 1996/09/11	[thread overview]
Message-ID: <3236E6F0.FF6D5DF@fndaut.fnal.gov> (raw)


hi, can anyone tell me why the following program -

#include <stdio.h>
#include <math.h>

int
main(void)
{
   double ans, y = 0, x = 0;
   ans = atan2(y,x);
   (void)printf("atan2(%g,%g) = %g\n",y,x,ans);
   return(0);
}

when built like

cc -fptm su -D_POSIX_SOURCE -lm aa.c

outputs

atan2(0,0) = 0

but when built like this

cc -fptm su -D_POSIX_SOURCE -migrate -lm aa.c

outputs

atan2(0,0) = NaNQ

i do know that x = y = 0 is listed as "invalid argument"
in the atan2 man pages.

thanks
eileen
-- 

                It's a wonderful thing to be an afternoon



                 reply	other threads:[~1996-09-11  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox