Article View: alt.comp.lang.learn.c-c++
Article #620Re: How to do floating point division?
From: Martin Ambuhl
Date: Tue, 23 Feb 1999 00:00
Date: Tue, 23 Feb 1999 00:00
20 lines
1723 bytes
1723 bytes
Robert Scurr wrote: > It has been a couple of years so could be wrong, but isn't Pi difined in > math.h??????? If so wouldn't using that be a lot simpler? A ANSI/ISO conforming or POSIX conforming C or C++ compiler will not contain a definition for pi. However, many compilers will contain definitions for use in the "default" non-standard mode. A common form of this definition is #define M_PI 3.14159265358979323846 /* pi */ Which is certainly better than the various rational approximations or calls to trig functions that have been suggested. You can always put this in your own code, after all. -- Martin Ambuhl (mambuhl@earthlink.net) Note: mambuhl@tiac.net will soon be inactive
Technical Details
Message-ID:
<36D2657B.F5F50C85@earthlink.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7Riz2.11845$cQ5.6291@nnrp2.clara.net> <QIlA2.244$Dy4.75@nnrp2.clara.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 143fed,e29ff327add874ff X-Google-Attributes: gid143fed,public X-Google-Thread: 109fba,e29ff327add874ff X-Google-Attributes: gid109fba,public X-Google-Thread: fb1d5,e29ff327add874ff X-Google-Attributes: gidfb1d5,public X-Google-Thread: 114592,e29ff327add874ff X-Google-Attributes: gid114592,public From: Martin Ambuhl <mambuhl@earthlink.net> Subject: Re: How to do floating point division? Date: 1999/02/23 Message-ID: <36D2657B.F5F50C85@earthlink.net> X-Deja-AN: 447412537 Content-Transfer-Encoding: 7bit References: <7Riz2.11845$cQ5.6291@nnrp2.clara.net> <QIlA2.244$Dy4.75@nnrp2.clara.net> X-Accept-Language: en X-Posted-Path-Was: not-for-mail Content-Type: text/plain; charset=us-ascii X-ELN-Date: 23 Feb 1999 08:23:09 GMT X-ELN-Insert-Date: Tue Feb 23 00:25:06 1999 Organization: Nocturnal Aviation Mime-Version: 1.0 Newsgroups: alt.comp.lang.learn.c-c++,claranet.local.help,claranet.local.tech,comp.lang.c++