Re: Database madness
Gunter K�nigsmann via Maxima-discuss <[email protected]> Sun, 02 Aug 2026 10:59:52 +0200
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <[email protected]> |
--===============6206633579275634598==
Content-Type: multipart/alternative;
boundary=----63237CW9CSYD1TRL8SFOFND86ADECS
Content-Transfer-Encoding: 7bit
------63237CW9CSYD1TRL8SFOFND86ADECS
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
Currently Maxima can automatically add assumption database entries that cac=
he information that answering directly might take less time than looking th=
em up in the assumption database=2E=20
If every lisp provided us with a high resolution stopwatch we could decide=
to cache only is() results that took less than 100 microseconds to answer =
or similar=2E=2E
Kind regards,
Gunter
On 27 July 2026 13:27:58 CEST, David Scherfgen <d=2Escherfgen@googlemail=
=2Ecom> wrote:
>What do you mean by nontrivial questions?
>I don't understand your other question=2E
>
>Gunter K=EF=BF=BDnigsmann <gunter@peterpall=2Ede> schrieb am Mo=2E, 27=2E=
Juli 2026,
>13:16:
>
>> I still wonder if there is a way to add only answers to nontrivial
>> questions to the assume database=2E
>>
>> Next question: if you redefine f[a](x): Will that result in
>> hard-to-understand decisions of if, currently?
>>
>> Kind regards,
>>
>> Gunter=2E
>>
>>
>> On 27 July 2026 12:26:11 CEST, David Scherfgen <d=2Escherfgen@googlemai=
l=2Ecom>
>> wrote:
>>
>>> It's really easy to trigger this with innocent code:
>>>
>>> Define a family of functions:
>>>
>>> f[a](x) :=3D abs(sin(x)-a)$
>>>
>>> Say you want to analyze or plot the function for different values of a=
:
>>>
>>> Do something with f[10](x) =2E=2E=2E
>>> Do something with f[11](x) =2E=2E=2E
>>> =2E=2E=2E
>>>
>>> Each time, new entries in *NOBJECTS* will be created because the abs
>>> simplifier tries to determine the sign of its argument=2E In fact, *tw=
o* new
>>> entries are created: one for e=2Eg=2E 100 and one for the float 100=2E=
0=2E This is
>>> a separate bug=2E There's also another bug where the chain of numbers =
in
>>> *NOBJECTS* becomes a DAG because the database forgets to remove existi=
ng
>>> edges when inserting a new number node that sits between two already
>>> existing ones=2E Also a separate bug=2E
>>>
>>> As I said, there is no way to reverse the permanent slow-down caused b=
y
>>> growing *NOBJECTS*=2E
>>>
>>> It's OK and expected if performance degrades with growing number of
>>> assumptions in the system=2E But pure queries ("What's the sign of
>>> sin(x)-100?") should never affect, let alone permanently degrade,
>>> performance of future queries=2E
>>>
>>> Claude and me are working on a solution=2E
>>>
>>> Gunter K=EF=BF=BDnigsmann via Maxima-discuss <
>>> maxima-discuss@lists=2Esourceforge=2Enet> schrieb am Mo=2E, 27=2E Juli=
2026,
>>> 09:07:
>>>
>>>> Actually I encounter that slowness frequently when trying to make Max=
ima
>>>> deal with real-life oscillograms=2E
>>>>
>>>> Kind regards,
>>>>
>>>> Gunter=2E
>>>>
>>>>
>>>> On 27 July 2026 06:45:09 CEST, Robert Dodier <robert=2Edodier@gmail=
=2Ecom>
>>>> wrote:
>>>>
>>>>> On Sun, Jul 26, 2026 at 3:36=E2=80=AFPM David Scherfgen via Maxima-d=
iscuss
>>>>> <maxima-discuss@lists=2Esourceforge=2Enet> wrote:
>>>>>
>>>>>>
>>>>>> In this extreme case, maybe it's pathological=2E But comparisons ha=
ppen all the time in the general simplifier, via sign, csign, mgrp, etc=2E,=
and in integration, limits, equation solving, =2E=2E=2E
>>>>>>
>>>>>
>>>>> Right, it is not pathological, it is not hard to encounter it=2E I h=
ave
>>>>> bumped into it via an implementation of a piecewise interpolating
>>>>> function which produces functions which look like
>>>>>
>>>>> if x < 0=2E5 then =2E=2E=2E elseif x < 1=2E2 then =2E=2E=2E elseif=
x < 5=2E3 then =2E=2E=2E
>>>>>
>>>>> which ends up creating database items for 0=2E5, 1=2E2, 5=2E3, etc=
=2E
>>>>> Obviously this becomes a problem if the number of pieces in the
>>>>> piecewise function is large=2E
>>>>>
>>>>> FWIW
>>>>>
>>>>> Robert
>>>>> ------------------------------
>>>>> Maxima-discuss mailing list
>>>>> Maxima-discuss@lists=2Esourceforge=2Enet
>>>>> https://lists=2Esourceforge=2Enet/lists/listinfo/maxima-discuss
>>>>>
>>>>> _______________________________________________
>>>> Maxima-discuss mailing list
>>>> Maxima-discuss@lists=2Esourceforge=2Enet
>>>> https://lists=2Esourceforge=2Enet/lists/listinfo/maxima-discuss
>>>>
>>>
------63237CW9CSYD1TRL8SFOFND86ADECS
Content-Type: text/html;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
<html><head></head><body><div dir=3D"auto">Currently Maxima can automatical=
ly add assumption database entries that cache information that answering di=
rectly might take less time than looking them up in the assumption database=
=2E <br><br>If every lisp provided us with a high resolution stopwatch we c=
ould decide to cache only is() results that took less than 100 microseconds=
to answer or similar=2E=2E<br><br>Kind regards,<br><br>=C2=A0 Gunter<br></=
div><br><br><div class=3D"gmail_quote"><div dir=3D"auto">On 27 July 2026 13=
:27:58 CEST, David Scherfgen <d=2Escherfgen@googlemail=2Ecom> wrote:<=
/div><blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0=2E8ex=
; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir=3D"auto"><div>What do you mean by nontrivial questions?</div><div=
dir=3D"auto">I don't understand your other question=2E<br><br><div class=
=3D"gmail_quote gmail_quote_container" dir=3D"auto"><div dir=3D"ltr" class=
=3D"gmail_attr">Gunter K=EF=BF=BDnigsmann <<a href=3D"mailto:gunter@pete=
rpall=2Ede">gunter@peterpall=2Ede</a>> schrieb am Mo=2E, 27=2E Juli 2026=
, 13:16:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px=
0px 0=2E8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>=
<div dir=3D"auto">I still wonder if there is a way to add only answers to n=
ontrivial questions to the assume database=2E <br><br>Next question: if you=
redefine f[a](x): Will that result in hard-to-understand decisions of if, =
currently?<br><br>Kind regards, <br><br> Gunter=2E </div><br><b=
r><div class=3D"gmail_quote"><div dir=3D"auto">On 27 July 2026 12:26:11 CES=
T, David Scherfgen <<a href=3D"mailto:d=2Escherfgen@googlemail=2Ecom" ta=
rget=3D"_blank" rel=3D"noreferrer">d=2Escherfgen@googlemail=2Ecom</a>> w=
rote:</div><blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0=
=2E8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir=3D"auto">It's really easy to trigger this with innocent code:<div=
dir=3D"auto"><br></div><div dir=3D"auto">Define a family of functions:</di=
v><div dir=3D"auto"><br></div><div dir=3D"auto">f[a](x) :=3D abs(sin(x)-a)$=
</div><div dir=3D"auto"><br></div><div dir=3D"auto">Say you want to analyze=
or plot the function for different values of a:</div><div dir=3D"auto"><br=
></div><div dir=3D"auto">Do something with f[10](x) =2E=2E=2E</div><div dir=
=3D"auto">Do something with f[11](x) =2E=2E=2E</div><div dir=3D"auto">=2E=
=2E=2E</div><div dir=3D"auto"><br></div><div dir=3D"auto">Each time, new en=
tries in *NOBJECTS* will be created because the abs simplifier tries to det=
ermine the sign of its argument=2E In fact, *two* new entries are created: =
one for e=2Eg=2E 100 and one for the float 100=2E0=2E This is a separate bu=
g=2E There's also another bug where the chain of numbers in *NOBJECTS* beco=
mes a DAG because the database forgets to remove existing edges when insert=
ing a new number node that sits between two already existing ones=2E Also a=
separate bug=2E</div><div dir=3D"auto"><br></div><div dir=3D"auto">As I sa=
id, there is no way to reverse the permanent slow-down caused by growing *N=
OBJECTS*=2E</div><div dir=3D"auto"><br></div><div dir=3D"auto">It's OK and =
expected if performance degrades with growing number of assumptions in the =
system=2E But pure queries ("What's the sign of sin(x)-100?") should never =
affect, let alone permanently degrade, performance of future queries=2E</di=
v><div dir=3D"auto"><br></div><div dir=3D"auto">Claude and me are working o=
n a solution=2E</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">Gunter K=EF=BF=BDnigsmann via Maxima-discuss <<a hr=
ef=3D"mailto:maxima-discuss@lists=2Esourceforge=2Enet" target=3D"_blank" re=
l=3D"noreferrer">maxima-discuss@lists=2Esourceforge=2Enet</a>> schrieb a=
m Mo=2E, 27=2E Juli 2026, 09:07:<br></div><blockquote class=3D"gmail_quote"=
style=3D"margin:0px 0px 0px 0=2E8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div><div dir=3D"auto">Actually I encounter that slownes=
s frequently when trying to make Maxima deal with real-life oscillograms=2E=
<br><br>Kind regards, <br><br> Gunter=2E </div><br><br><div class=3D"=
gmail_quote"><div dir=3D"auto">On 27 July 2026 06:45:09 CEST, Robert Dodier=
<<a href=3D"mailto:robert=2Edodier@gmail=2Ecom" rel=3D"noreferrer noref=
errer" target=3D"_blank">robert=2Edodier@gmail=2Ecom</a>> wrote:</div><b=
lockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0=2E8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">
<pre><div dir=3D"auto">On Sun, Jul 26, 2026 at 3:36=E2=80=AFPM David Scher=
fgen via Maxima-discuss<br><<a href=3D"mailto:maxima-discuss@lists=2Esou=
rceforge=2Enet" rel=3D"noreferrer noreferrer" target=3D"_blank">maxima-disc=
uss@lists=2Esourceforge=2Enet</a>> wrote:<br></div><blockquote class=3D"=
gmail_quote" style=3D"margin-bottom:1ex"><div dir=3D"auto"><br>In this extr=
eme case, maybe it's pathological=2E But comparisons happen all the time in=
the general simplifier, via sign, csign, mgrp, etc=2E, and in integration,=
limits, equation solving, =2E=2E=2E<br></div></blockquote><div dir=3D"auto=
"><br>Right, it is not pathological, it is not hard to encounter it=2E I ha=
ve<br>bumped into it via an implementation of a piecewise interpolating<br>=
function which produces functions which look like<br><br> if x < 0=2E5 =
then =2E=2E=2E elseif x < 1=2E2 then =2E=2E=2E elseif x < 5=2E3 then =
=2E=2E=2E<br><br>which ends up creating database items for 0=2E5, 1=2E2, 5=
=2E3, etc=2E<br>Obviously this becomes a problem if the number of pieces in=
the<br>piecewise function is large=2E<br><br>FWIW<br><br>Robert<hr>Maxima-=
discuss mailing list<br><a href=3D"mailto:Maxima-discuss@lists=2Esourceforg=
e=2Enet" rel=3D"noreferrer noreferrer" target=3D"_blank">Maxima-discuss@lis=
ts=2Esourceforge=2Enet</a><br><a href=3D"https://lists=2Esourceforge=2Enet/=
lists/listinfo/maxima-discuss" rel=3D"noreferrer noreferrer" target=3D"_bla=
nk">https://lists=2Esourceforge=2Enet/lists/listinfo/maxima-discuss</a><br>=
</div></pre></blockquote></div></div>______________________________________=
_________<br>
Maxima-discuss mailing list<br>
<a href=3D"mailto:Maxima-discuss@lists=2Esourceforge=2Enet" rel=3D"norefer=
rer noreferrer" target=3D"_blank">Maxima-discuss@lists=2Esourceforge=2Enet<=
/a><br>
<a href=3D"https://lists=2Esourceforge=2Enet/lists/listinfo/maxima-discuss=
" rel=3D"noreferrer noreferrer noreferrer" target=3D"_blank">https://lists=
=2Esourceforge=2Enet/lists/listinfo/maxima-discuss</a><br>
</blockquote></div>
</blockquote></div></div></blockquote></div></div></div>
</blockquote></div></body></html>
------63237CW9CSYD1TRL8SFOFND86ADECS--
--===============6206633579275634598==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============6206633579275634598==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
--===============6206633579275634598==--