Re: Initializing constants



"newsposter0123" <newsposter0123@xxxxxxxxx> writes:

I'm hoping something like this is possible...

// rodata
const long double const_pi= LDBL_PI;

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.
--
"What is appropriate for the master is not appropriate for the novice.
You must understand the Tao before transcending structure."
--The Tao of Programming
.



Relevant Pages