Re: Database madness

Gunter K�nigsmann via Maxima-discuss <[email protected]> Mon, 27 Jul 2026 13:16:31 +0200
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
--===============4696294838994174233==
Content-Type: multipart/alternative;
 boundary=----I3IIUVKR95AIH8K3NUSETU8F4DWV6M
Content-Transfer-Encoding: 7bit

------I3IIUVKR95AIH8K3NUSETU8F4DWV6M
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

I still wonder if there is a way to add only answers to nontrivial question=
s to the assume database=2E=20

Next question: if you redefine f[a](x): Will that result in hard-to-unders=
tand decisions of if, currently?

Kind regards,=20

   Gunter=2E=20

On 27 July 2026 12:26:11 CEST, David Scherfgen <d=2Escherfgen@googlemail=
=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, *two* =
new
>entries are created: one for e=2Eg=2E 100 and one for the float 100=2E0=
=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 existing
>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 by
>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=2Esour=
ceforge=2Enet>
>schrieb am Mo=2E, 27=2E Juli 2026, 09:07:
>
>> Actually I encounter that slowness frequently when trying to make Maxim=
a
>> deal with real-life oscillograms=2E
>>
>> Kind regards,
>>
>>   Gunter=2E
>>
>>
>> On 27 July 2026 06:45:09 CEST, Robert Dodier <robert=2Edodier@gmail=2Ec=
om>
>> wrote:
>>
>>> On Sun, Jul 26, 2026 at 3:36=E2=80=AFPM David Scherfgen via Maxima-dis=
cuss
>>> <maxima-discuss@lists=2Esourceforge=2Enet> wrote:
>>>
>>>>
>>>> In this extreme case, maybe it's pathological=2E But comparisons happ=
en all the time in the general simplifier, via sign, csign, mgrp, etc=2E, a=
nd in integration, limits, equation solving, =2E=2E=2E
>>>>
>>>
>>> Right, it is not pathological, it is not hard to encounter it=2E I hav=
e
>>> 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
>>

------I3IIUVKR95AIH8K3NUSETU8F4DWV6M
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div dir=3D"auto">I still wonder if there is a way=
 to add only answers to nontrivial questions to the assume database=2E <br>=
<br>Next question: if you redefine f[a](x): Will that result in hard-to-und=
erstand decisions of if, currently?<br><br>Kind regards, <br><br>=C2=A0=C2=
=A0 Gunter=2E </div><br><br><div class=3D"gmail_quote"><div dir=3D"auto">On=
 27 July 2026 12:26:11 CEST, David Scherfgen &lt;d=2Escherfgen@googlemail=
=2Ecom&gt; wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin: 0=
pt 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 gmail_quote_contai=
ner"><div dir=3D"ltr" class=3D"gmail_attr">Gunter K=EF=BF=BDnigsmann via Ma=
xima-discuss &lt;<a href=3D"mailto:maxima-discuss@lists=2Esourceforge=2Enet=
">maxima-discuss@lists=2Esourceforge=2Enet</a>&gt; schrieb am Mo=2E, 27=2E =
Juli 2026, 09:07:<br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0=2E8ex;border-left:1px solid rgb(204,204,204);padding-left:1=
ex"><div><div dir=3D"auto">Actually I encounter that slowness frequently wh=
en trying to make Maxima deal with real-life oscillograms=2E<br><br>Kind re=
gards, <br><br>&nbsp; Gunter=2E </div><br><br><div class=3D"gmail_quote"><d=
iv dir=3D"auto">On 27 July 2026 06:45:09 CEST, Robert Dodier &lt;<a href=3D=
"mailto:robert=2Edodier@gmail=2Ecom" target=3D"_blank" rel=3D"noreferrer">r=
obert=2Edodier@gmail=2Ecom</a>&gt; wrote:</div><blockquote class=3D"gmail_q=
uote" 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>&lt;<a href=3D"mailto:maxima-discuss@lists=2Esou=
rceforge=2Enet" target=3D"_blank" rel=3D"noreferrer">maxima-discuss@lists=
=2Esourceforge=2Enet</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quo=
te" style=3D"margin-bottom:1ex"><div dir=3D"auto"><br>In this extreme case,=
 maybe it's pathological=2E But comparisons happen all the time in the gene=
ral simplifier, via sign, csign, mgrp, etc=2E, and in integration, limits, =
equation solving, =2E=2E=2E<br></div></blockquote><div dir=3D"auto"><br>Rig=
ht, it is not pathological, it is not hard to encounter it=2E I have<br>bum=
ped into it via an implementation of a piecewise interpolating<br>function =
which produces functions which look like<br><br>  if x &lt; 0=2E5 then =2E=
=2E=2E elseif x &lt; 1=2E2 then =2E=2E=2E elseif x &lt; 5=2E3 then =2E=2E=
=2E<br><br>which ends up creating database items for 0=2E5, 1=2E2, 5=2E3, e=
tc=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=2Esourceforge=2Enet=
" target=3D"_blank" rel=3D"noreferrer">Maxima-discuss@lists=2Esourceforge=
=2Enet</a><br><a href=3D"https://lists=2Esourceforge=2Enet/lists/listinfo/m=
axima-discuss" target=3D"_blank" rel=3D"noreferrer">https://lists=2Esourcef=
orge=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" target=3D"_bla=
nk" rel=3D"noreferrer">Maxima-discuss@lists=2Esourceforge=2Enet</a><br>
<a href=3D"https://lists=2Esourceforge=2Enet/lists/listinfo/maxima-discuss=
" rel=3D"noreferrer noreferrer" target=3D"_blank">https://lists=2Esourcefor=
ge=2Enet/lists/listinfo/maxima-discuss</a><br>
</blockquote></div>
</blockquote></div></body></html>
------I3IIUVKR95AIH8K3NUSETU8F4DWV6M--


--===============4696294838994174233==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============4696294838994174233==
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

--===============4696294838994174233==--