"yu jie" writes: > On 9/21/07, Michaël Cadilhac wrote: >> >> >> (let ((x -1)) >> >> (while (condition-case nil >> >> (message "1.Expt is %e" (expt 10.0 x)) >> >> (error nil)) >> >> (message "1.`x' is now %d" (setq x (* 2 x)))) >> >> (message "2.`x' is now %d" (setq x (/ x 2))) >> >> (while (condition-case nil >> >> (message "3.Expt is %e" (expt 10.0 x)) >> >> (error nil)) >> >> (message "3.`x' is now %d" (setq x (1- x)))) >> >> (+ x 2)) >> >> > *Message*: >> > 1.Expt is 1.000000e+000 >> > 1.`x' is now 0 >> > 1.Expt is 1.000000e+000 >> > 1.`x' is now 0 >> > 1.Expt is 1.000000e+000 >> > 1.`x' is now 0 >> > 1.Expt is 1.000000e+000 >> > Loading debug...done >> > Entering debugger... >> >> Thanks a lot. As I read the pow(3) man page, the fact that it triggers >> a ERANGE error is not documented, so it doesn't seem standard. >> >> IMO, we should check by hand if an (under|over)flow is triggered. > Hi, > it works.:) We can then consider installing the following patch which fixes an overflow of expt (namely that (expt 10.0 256) yields 0) on some system that implement pow(3) without an ERANGE error (e.g., Cygwin).