1) If I run this under Windows:
A=(0.5=NB); put A=;
SAS will not store the correct number in the first equality. The result is:
2) If I run the same code on a different platform, or if I add or remove zeros, the correct number is stored.
I think this should be recorded as a defect to be fixed.
More details on https://communities.sas.com/t5/Base-SAS-Programming/Expected-numeric-precision-behaviour-or-unexpect...
Numerical precision and how numbers are stored is governed by IEEE standards, as you probably know. I think your main complaint is the difference you see across platforms, and not necessarily the imprecision in one vs the other?
This program shows a little bit more about how the numbers are stored:
A=(0.5=NB1); put A=;
B=(0.5=NB2); put B=;
Output on Windows:
Thanks Chris, The information you mention is already discussed in the thread cited in my first post.
This is not a storage issue. It is a reading issue.
0.5 can be stored with full precision.
SAS under Windows (and no other platform, and WIN32 and W64 behave differently) reads some values erroneously.
Thank you @ChrisHemedinger for bringing Mike into the discussion the the forum thread!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.