From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <199802251504.IAA22929@ellpspace.math.ualberta.ca> Date: Wed, 25 Feb 1998 08:04:59 -0700 (MST) From: Michal Jaegermann Subject: Re: Anyone using drand48()? In-Reply-To: Jonathan DuBois writes: > > and printf("%.8f %.8f\n",x,y); should be > printf("%.8lf %.8lf\n",x,y); Just for the record. There is no 'l' modifier on printf 'f' format specifier (there is one for (f)scanf and maybe this what mixed you up). 'f' in the context means "double". The above "should" is a BUG and gcc will warn you about it. The Standard says "If an h, l or L appears with any other conversion specifier , the behaviour is udefined". In case of 'l' "any" means everything but d, i, o, u, x and X. Most compilers/libraries are acommodating enough and will simply interpret "%.8lf" as "%.8f", silently or complaining, but they are free to do **anything** and still remain Standard conforming. OTOH "Lf" conversion does exist but this is another story. Michal -- To unsubscribe: send e-mail to axp-list-request@redhat.com with 'unsubscribe' as the subject. Do not send it to axp-list@redhat.com