所用sas版本: 9.1.3
data tmp ;
x = -13 ;
y = x ** (1/3) ;
put x= y= ;
run ;
出现如下提示:
522 data tmp ;
523 x = -13 ;
524 y = x ** (1/3) ;
525 put x= y= ;
526 run ;
NOTE: Invalid argument(s) to the exponential operator "**" at line 524 column 11.
x=-13 y=.
x=-13 y=. _ERROR_=1 _N_=1
NOTE: Mathematical operations could not be performed at the following places. The results of
the operations have been set to missing values.
Each place is given by: (Number of times) at (Line):(Column).
1 at 524:11
乘方符号的使用有问题 . y = x**(1/n) 中, 只要x为负数, 即使n为自然数奇数也报错. y = x**n 中, x为负数却没任何问题 .