Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Why the order of execution is changing here? (SAS follows the standard mathematical rules of precedence: SAS performs exponentiation first, then multiplication and division, followed by addition and subtraction)

Reply
Contributor
Posts: 49

Why the order of execution is changing here? (SAS follows the standard mathematical rules of precedence: SAS performs exponentiation first, then multiplication and division, followed by addition and subtraction)

100  data _null_;

101  x=12/15*100;

102  put x=;

103  run;

x=80

NOTE: DATA statement used (Total process time):

      real time           0.00 seconds

      cpu time            0.00 seconds

Frequent Contributor
Posts: 95

Re: Why the order of execution is changing here? (SAS follows the standard mathematical rules of precedence: SAS performs exponentiation first, then multiplication and division, followed by addition and subtraction)

Posted in reply to devarayalu

Order of operations followed here. Multiplication and division have the same precedence in which case operations performed from left to right.

Ask a Question
Discussion stats
  • 1 reply
  • 188 views
  • 0 likes
  • 2 in conversation