#653251 grace: 180.0000 != 180.00000 != 180.000000 in data

Package:
grace
Source:
grace
Description:
XY graphing and plotting tool
Submitter:
"Francesco Poli \(wintermute\)"
Date:
2011-12-25 23:51:08 UTC
Severity:
normal
#653251#5
Date:
2011-12-25 23:50:09 UTC
From:
To:
Hello!

I found out what looks like a very awkward behavior of grace.
It definitely seems to be a weird bug.

It seems that, when grace reads data from text files, it
interprets 180.0000 and 180.000000 differently from 180.00000:
since 180 should be exactly representable as a float and as
a double, I am under the impression that the behavior I experienced
should not happen.

I prepared a little test case in order to reproduce the bug.
The attached gzipped tar archive contains a data file (values.dat),
a grace script file (180.com), a ready-to-use Makefile and the
resulting PDF file (180.pdf) that I obtain on my systems.

As can be seen in 180.pdf , the blue line has only two visible
symbols, rather than three like the other lines.
This should not happen, since the x values for all the sets
are equivalent.
At least, 180, 180.0, 180.0000, 180.00000, and 180.000000 are
equal values in infinite precision. But they should also be
equal values, when represented by floats or doubles (and thus
in finite precision).

Nonetheless, the third symbol of the blue line (the symbol
which corresponds to x = 180.00000) is not visible, when
the X axis stop is at 180 ...


What's wrong?
What did I fail to understand?

Thanks for your time and for any help you may provide.