[Maxima] Maxima values scheme
willisb at unk.edu
Tue Feb 20 13:57:34 CST 2007
I'll take the [sol, condition number or false] idea:
(%i25) m : matrix([7,8],[1,2])$
(%i26) b : matrix(,)$
Thank you for letting me think out loud.
"Robert Dodier" <robert.dodier at gmail.com> wrote on 02/20/2007 01:40:03 PM:
> On 2/20/07, Barton Willis <willisb at unk.edu> wrote:
> > I could make linsolve_by_lu *always* return a two member list
> > [sol, cnd].
> I think that is the right thing to do.
> > But lu_factor doesn't compute a condition number
> > when it uses exact numbers. In this case, I think it would be
> > ok for cnd to be 0.
> I'll recommend a nonnumeric value here. How about false.
> > I don't like making a new global, say lu_condition, that gets
> > assigned to the latest condition number.
> Agreed -- returning information via globals is a mess.
> > As you suggest if [p] : [1,2] would just assign p and trash the
> > 2 might be ok too.
> Yeah -- the CL multiple-value stuff works like that, doesn't it?
> Not that we are obligated in any way, shape, or form to follow CL.
> With the CL multiple-value stuff, the caller can safely pretend that a
> multiple-value function has returned only one value.
> If in Maxima multiple values were represented as ordinary lists,
> that couldn't work the same. Maybe multiple values need to be
> represented by something other than a list, e.g. values(a, b, c).
> Just a thought.
More information about the Maxima