gcc compilation on amd opteron and precision
Nathan Sidwell
nathan@codesourcery.com
Sat May 7 13:49:00 GMT 2005
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
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc-help
mailing list