Re: Initializing constants
- From: "newsposter0123" <newsposter0123@xxxxxxxxx>
- Date: 31 Aug 2006 10:21:41 -0700
Ben Pfaff wrote:
When compiling on i386 systems for i386 targets and using the
coprocessor, LDBL_PI evaluates to the 80bit value of fldpi instruction,
and when compiling on non i386 systems for i386 targets, an emulation
value is calculated from available resources.
What's the value in getting pi from an i386 instruction? I would
suggest just writing out enough digits of pi to cover the desired
level of significance.
Hardware generally provides constants other than pi.
For one, when converting numbers. Ideally you would like to get the
original number back. Especially when adjusting bases. But that debate
rages elsewhere.
Provided the precision of the measurements device was known in advance,
then the number of significant digits could be predetermined. If a
device with greater precision were used, then the constant would be
require adjustment (and no longer be a constant).
In general, constants imply unrestricted usage, not limited to a
specific application, or limiting the number of significant digits in a
calculation. Otherwise, why spend $$$ on precision equipment?
.
- Follow-Ups:
- Re: Initializing constants
- From: Ben Pfaff
- Re: Initializing constants
- References:
- Initializing constants
- From: newsposter0123
- Re: Initializing constants
- From: Ben Pfaff
- Initializing constants
- Prev by Date: Re: Redirection issue
- Next by Date: Re: General method for dynamically allocating memory for a string
- Previous by thread: Re: Initializing constants
- Next by thread: Re: Initializing constants
- Index(es):
Relevant Pages
|