From owner-freebsd-chat Fri Jul 30 2:26:47 1999 Delivered-To: freebsd-chat@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id C1BDD14D69 for ; Fri, 30 Jul 1999 02:26:42 -0700 (PDT) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.1) id LAA50005; Fri, 30 Jul 1999 11:26:36 +0200 (CEST) (envelope-from des) To: Garrett Wollman Cc: Greg Lehey , chat@FreeBSD.ORG Subject: Re: cvs commit: src/sys/netinet ip_fw.c References: <199907291156.NAA06494@labinfo.iet.unipi.it> <19990730093259.A93194@freebie.lemis.com> <199907300302.XAA15392@khavrinen.lcs.mit.edu> From: Dag-Erling Smorgrav Date: 30 Jul 1999 11:26:36 +0200 In-Reply-To: Garrett Wollman's message of "Thu, 29 Jul 1999 23:02:07 -0400 (EDT)" Message-ID: Lines: 22 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Garrett Wollman writes: > From my ever-excrescent .plan file: > > There is no _inherent_ virtue in symbolic names. Pi over two is > GROSSLY unlikely to change in circumstances where Pi remains constant. So imagine you write a large program which uses Pi a lot. Imagine further that this program is being developed by several different people. They use literal constants instead of symoblic constants. So the program has different literal constants for Pi scattered all over: 3.14, 3.1415, 3.14159265, 3.14159265358 (truncated) and 3.14159265359 (rounded) - and that's assuming none of them ever makes a typo. Even if you manage to get them all to agree on one specific value (say, 3.14159265359), what are you going to do if you decide to port your application to a different system which has higher floating-point precision and want to use a more precise value of pi? Search-replace throughout the entire source tree? DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message