As the first step in the decommissioning of sasCommunity.org the site has been converted to read-only mode.


Here are some tips for How to share your SAS knowledge with your professional network.


Talk:Unintentional Loss of Precision

From sasCommunity
Revision as of 21:49, 13 November 2011 by SPR (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Good TIP. Didn't test the code. Charlie Shipp 02:52, 21 January 2010 (UTC)
Is the author w/SAS Institute?


The suggested method is robust and applicable in all cases. However, if you know your data then more practical solution is possible. For example, in this case, adding a proper formatting to fraction1 resolves the problem:


        proc sql noprint;
        create table demo (fraction1 num);
        insert into demo set fraction1 = 1 / 3;
        select fraction1 FORMAT=18.15 
        into : fraction2 
        from demo;
        quit;

SPR 28 October 2011