From: Harald Hanche-O. <ha...@ma...> - 2010-04-29 23:59:21
|
It seems to me that the hyperspec is quite specific about (expt 0.0 0): When power-number is an integer 0, then the result is always the value one in the type of base-number, even if the base-number is zero (of any type). That is: (expt x 0) == (coerce 1 (type-of x)) You can't possibly get any clearer than that. And it continues: If power-number is a zero of any other type, then the result is also the value one, in the type of the arguments after the application of the contagion rules in Section 12.1.1.2 (Contagion in Numeric Operations), with one exception: the consequences are undefined if base-number is zero when power-number is zero and not of type integer. In other words, the consequences of (expt ZERO 0.0) are undefined if ZERO is a zero of any type. - Harald |