Subject: Re: Bytecomp Arithmetic test failed

From: Juri Linkov <[email-masked]>
Date: Sun, 04 Apr 2010 01:54:50 +0300

> I originally thought this was a regression, because my copy of Emacs
> 23.1 did not appear to have this problem.  On further investigation, it
> is not a regression.  Emacs 23.1 and before also have the problem.
>
> The key is that if I compile Emacs with CFLAGS="-g", then
>
> (funcall
>  (byte-compile
>   (list 'lambda nil
> 	(quote (let ((a (expt 2 -1074)) (b 0.125)) (* a 8 b))))))
>
> returns 0.0.  If I compile Emacs with CFLAGS="-g -O2", then it returns
> 5e-324.

Does (let ((a (expt 2 -1074)) (b 0.125)) (* a b 8))
return 5e-324 when you compile with CFLAGS="-g -O2"?

Note the constant 8 at the end, this form is what actually
executed after byte-compilation with optimization.

I guess if

(funcall
 (byte-compile
  (list 'lambda nil
	(quote (let ((a (expt 2 -1074)) (b 0.125)) (* a 8 b))))))

returns 5e-324 with CFLAGS="-g -O2",
then

(let ((a (expt 2 -1074)) (b 0.125)) (* a b 8))

returns 5e-324 as well?

-- 
Juri Linkov
http://www.jurta.org/emacs/