|
From: Raymond T. <toy...@gm...> - 2017-06-27 15:24:42
|
>>>>> "Gunter" == Gunter Königsmann <gu...@pe...> writes:
Gunter> On 27.06.2017 00:08, Raymond Toy wrote:
>>>>>>> "Andreas" == Andreas Eder <aek...@gm...> writes:
>>
Andreas> 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?
>>
Andreas> No, it is simplified.
Andreas> The defvar is: (defvar 1//2 '((rat simp) 1 2))
Andreas> That is, as far as I can tell, simplified.
Andreas> What I suspect is a different order of evaluation. The macro version is
Andreas> expande into a literal at macroexpansion time, whereas the defvar
Andreas> generates a reference to the variable at compile time. The might lead
Andreas> to
Andreas> different orders of evaluation. But I'm no expert in these matters.
Andreas> The difference is very small and I always expect such things when
Andreas> dealing with floating point.
>>
>> That might be true, but in the tests, there shouldn't be any
>> difference. The VALUE being used should be exactly the same in the
>> numeric tests as before.
>>
Gunter> If the cause for the change is indeed the evaluation order my next
Gunter> question would be: Did the change increase the accuracy (after all there
Gunter> is no guarantee that the value originally contained in the testbench was
Gunter> even correct before the change)? And does it do so in the majority of cases?
Well, since the thresholds are upper bounds, if the error decreased,
you'd never know from the test. So changing the threshold meant the
error got worse.
I didn't check to see exactly what was changed, but I assume Andreas
just removed the macro for 1//2 so that the defvar was used. That
shouldn't change the order of evaluation of anything.
This really needs to be investigated. It could be something simple,
or perhaps something really bad---we just don't know.
As I said, I can't personally look for a couple of weeks.
--
Ray
|