This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc compilation on amd opteron and precision
Hi Nathan,
Thanks a lot!
I did your suggestion and now i get reasonable printout!
thank you all for your quick responses.
Best,
Muge
On Sat, 2005-05-07 at 14:48, Nathan Sidwell wrote:
> Muge Unel wrote:
>
> > p= (long double) 1.0 / (long double) 3.0;
> > q = (long double) p * (long double) 3.0 - (long double) 1.0;
> > printf ("1 /3 is: %.30e\n", p);
> > printf ("(1 / 3) x 3 - 1 is: %.30e\n", q);
>
> you probably want %.30Le format if p and q are indeed long doubles,
> as man -S3 printf tells you.
>
> nathan
--
Muge Karagoz Unel
Oxford University +44 (0) 1865 273 410
http://www-pnp.physics.ox.ac.uk/~karagozm/
-- --
"The sum of many small things is a big thing". G.Altarelli