|
From: Andreas E. <aek...@gm...> - 2017-06-26 21:02:17
|
On Mo 26 Jun 2017 at 20:29, Raymond Toy <toy...@gm...> wrote: > On Sun, Jun 25, 2017 at 2:25 AM, Andreas Eder via Maxima-commits > < > max...@li...> wrote: > >> commit e6a7a8af637ee29f549b1dd47633fb08172e17ae >> Author: Andreas Eder (are_muc) <and...@gm...> >> Date: Sun Jun 25 11:06:41 2017 +0200 >> >> replaced uses of the half macro with the variable 1//2. >> had to adapt relative error bounds for the erf-inverse_erf >> tests >> sligthly. >> >> > This makes no sense to me. Why should the results be different? > > This needs some investigation. Is it because the defvar version > wasn't > simplified? No, it is simplified. The defvar is: (defvar 1//2 '((rat simp) 1 2)) That is, as far as I can tell, simplified. What I suspect is a different order of evaluation. The macro version is expande into a literal at macroexpansion time, whereas the defvar generates a reference to the variable at compile time. The might lead to different orders of evaluation. But I'm no expert in these matters. The difference is very small and I always expect such things when dealing with floating point. 'Andreas -- ceterum censeo redmondinem esse delendam |