> On 2008-08-05 09:59+0100 Andrew Ross wrote: > >> Alan, >> >> A first initial look at the postscript shows differences even on the >> first page, suggesting perhaps a slightly different random distribution >> of numbers to start with. I've made a few of the constants in the >> example explicitly of kind plflt, including the max / min values for the >> range. This might make a difference. Can you check? If I can elimiate >> these differences it might make a difference to the subsequent pages. If >> not, at least I have narrowed down the options. > > Hi Andrew: > > Your instincts were absolutely right. As the result of your f95 changes > the > f95 and C results for example 21 now agree exactly! You should also make > the corresponding changes in the f77 example (which currently agrees with > the old f95 version done without your recent change). >
Hi Andrew, Alan, this is a "gotcha" one easily gets into: In Fortran literal numbers are treated in the precision they appear in, not in the precision of the result: double precision :: x = 1.2, y = 1.2d0 write(*,*) x-y will give a number _not_ equal to zero. This is because the literal 1.2 is single precision and the literal 1.2d0 is double precision. So to be sure that the precision is what you want it to be always use _plflt (or d0 in the case of FORTRAN 77). Regards, Arjen ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel