|
From: Stavros M. (Σ. Μ. <mac...@al...> - 2018-07-02 15:08:13
|
By the way, the horrible cf([...]*[...]) hack has also been very buggy for the past 6 years. See https://sourceforge.net/p/maxima/bugs/3448/ The bug was introduced by "Apply continued fraction patch attached to bug report # 3431927." in 2012. But I can't find that bug report on sourceforge -- where are older bugs archived? -s On Fri, Jun 29, 2018 at 1:10 PM Stavros Macrakis (Σταῦρος Μακράκης) < mac...@al...> wrote: > The cf group of functions is a *horribly designed hack*. > > The hack of supporting [...]*[...] within the cf function is an > abomination which wrecks referential transparency: > > qq: [2,3]*[4,5] => [8,15] (with listarith: true, the default) > cf(qq) => [8,15] > cf([2,3]*[4,5]) => [9,1,4] > > > It is also an abomination because it only supports * and not / and integer > ^. > > It is also an abomination because it gives incorrect results when there's > more than one repeating cf: > > cf(sqrt(2)*sqrt(5)) => [3,2,1,2] > cf(sqrt(10)) => [3,6] > > For that matter, it is an abomination that cf(sqrt(...)) doesn't indicate > in any way that the result repeats, or what the repeating group is. > > As for performing cf manipulations symbolically, what do you have in mind? > > In particular, what is cf([a]/[0,b]) == cf(a/b)? After all, cf(5/5) = [1], > cf(5/7) = [0,1,2,2], cf(5/11) = [0,2,5], cf(5/13) = [0,2,1,1,2], cf(5/15) = > [0,3], etc. Not even the length is constant. > > > > > > On Fri, Jun 29, 2018 at 8:09 AM Hugo Coolens <hug...@gm...> > wrote: > >> Is it possible to perform symbolic math with continued fractions? >> If I try something like this: >> cf([a,b,c]); >> maxima answers with >> Maxima encountered a Lisp error: Condition in MACSYMA-TOP-LEVEL [or a >> callee]: INTERNAL-SIMPLE-TYPE-ERROR: $C is not of type NUMBER: >> >> can I tell maxima a,b and are of type NUMBER? >> >> kind regards, >> Hugo >> >> ------------------------------------------------------------------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Maxima-discuss mailing list >> Max...@li... >> https://lists.sourceforge.net/lists/listinfo/maxima-discuss >> > |