www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/18/11:30:04.1

From: "Patrick Mitran" <pmitran AT tsp DOT ece DOT mcgill DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: M_PI and -ansi
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <TMoX6.1671$Ug2.550858@carnaval.risq.qc.ca>
Date: Mon, 18 Jun 2001 15:05:23 GMT
NNTP-Posting-Host: 132.206.69.38
X-Complaints-To: abuse AT mcgill DOT ca
X-Trace: carnaval.risq.qc.ca 992876723 132.206.69.38 (Mon, 18 Jun 2001 11:05:23 EDT)
NNTP-Posting-Date: Mon, 18 Jun 2001 11:05:23 EDT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi,

when I compile with the -ansi switch, it seems that I don't have a
predefined
constant for PI in math.h. This can easily be fixed by defining my own
constant as

const real pi = 3.14159265358979323846;

However, I believe this is bad style. What would be a good way of  getting
a numerically accurate value of PI that is ANSI compliant?

Thanks,
Patrick


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019