|
From: Lars H. <la...@ho...> - 2007-04-15 17:23:31
|
> I am trying to produce plots on very broad ranges of > numbers (as broad as between 1e20 and 1e-10). I have > discovered, that when I try to calculate e.g. > 10**-14 > the result is somewhere at 1e9. These miscalculations > make my plots incorrect. > > Minmal command to reproduce the problem: > print 10**-14 > the result is > 3.61732686836958e-09 > when it should return 1.0e-14 . > > Is there a way to solve this or a workaround? Why is this > so? Hi Stephan, gnuplot knows two different types of numbers, real and integer. See help expressions for more details. Your error occurs, when you use integers instead of real numbers. Try this: print 10**-14 3.61732686836958e-09 print 10**14.0 1e-14 HTH Lars |