From -6989871342231528422 X-Google-Thread: f78e5,4ba9dcb1ae436e16 X-Google-Attributes: gidf78e5,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull From: pbristow@hetp.u-net.com ("Paul A Bristow") Newsgroups: comp.std.c++ Subject: Re: Pi, Euler Number, and perhaps other 'natural' constants? Date: Wed, 28 Jul 2004 18:29:43 GMT Organization: (Posted via) VIA Net.Works UK Ltd. Lines: 49 Sender: mail2news@demon.net Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: <58SNc.222$5_.71@newsr2.u-net.net> References: <5cydnSisJNo4yJncRVn-sQ@speakeasy.net> NNTP-Posting-Host: news.news.demon.net X-Trace: news.demon.co.uk 1091039392 9218 158.152.254.254 (28 Jul 2004 18:29:52 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 28 Jul 2004 18:29:52 +0000 (UTC) X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Priority: 3 X-Spam-Checker-Version: SpamAssassin 2.60-mulga_r1 (1.212-2003-09-23-exp) on mulga.cs.mu.OZ.AU X-Spam-Status: No, hits=-4.2 required=5.2 tests=AWL,BAYES_00,PRIORITY_NO_NAME autolearn=no version=2.60-mulga_r1 X-MSMail-Priority: Normal X-Received: (from fjh@localhost) by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i6SIThFg014950; Thu, 29 Jul 2004 04:29:43 +1000 (EST) X-Path: comp-std-cpp-robomod!not-for-mail X-NNTP-Posting-Date: Wed, 28 Jul 2004 19:20:49 BST X-Spam-Level: X-Delivered-To: std-c++@ucar.edu X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-Newsgroups: comp.std.c++ Xref: g2news1.google.com comp.std.c++:1476 There have been several attempts on the Boost group to provide a lot of math constants, but the matter has not received a satisfactory conclusion yet. The difficulty is not the values, but the problem is providing these in a C++ tempalted format that allows extension to user defined types (especially higher than hardware and arbitrary precision arithmetic). Various attempts have floundered as being not portable - typeof seems to be needed. Paul -- Paul A Bristow Prizet Farmhouse, Kendal LA8 8AB UK "Steven T. Hatton" wrote in message news:5cydnSisJNo4yJncRVn-sQ@speakeasy.net... > I was a bit surprised that the Standard does not specify that the constant > Pi be part of an implementation. It seems like an obvious feature to want > in a programming language. The Euler Number would also be nice, but not > nearly as desirable as Pi. Sure there are questions of how to handle the > difference between a float and a double Pi, but I'm (almost) sure that > isn't a big obstacle. > > I've found ways to jump though hoops to get Pi defined by using > transcendental functions provided in the Standard Library, but that seems a > bit convoluted to me. Is there a reason Pi is missing from C++? > -- > STH > http://www.kdevelop.org > http://www.suse.com > http://www.mozilla.org > > --- > [ comp.std.c++ is moderated. To submit articles, try just posting with ] > [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] > [ --- Please see the FAQ before posting. --- ] > [ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ] > --- [ comp.std.c++ is moderated. To submit articles, try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ --- Please see the FAQ before posting. --- ] [ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]