Usualy interpreter tries to choose most specific type and
this is good thing. However, when dealing with inverses
freqently we want bigger domian, in which iverses exist.
Some time ago Ralf reported problem with 'recip' failing
for power series: it turend out that intepreter
decided to retract series to 'UnivarieteTaylorSeries' and
while inverse was a Laurent series, 'recip' spr Taylor
series failed. Recently I corrected 'recip' for square
matrices so that in matrix has inverse over integers,
that 'recip' delivers this inverse. In the process
I noted that we have 3 functions which are essentially
duplicates: 'recip', 'inverse' and 'inverseIfCan'.
'inverse' accepts only matrices over fields while
'inversIfCan' works over integral domains. It would
be nice to have only single function. However,
if 'inverse' is generalized to accept matrices over
integral domains, then we get several test failures:
in various examples matrices have inverses over
rational numbers, but no inverse over integers.
For reasonable usablity we need a way to bias choice
of types to compute inverses over fields. Currently
it is done by having two signatures, with 'inverse'
working only over fields. I wander if there is other
systematic way to have similar effect. Maybe some
way of marking functions to choose field by default
and integral domain only if explicitely requested?
--
Waldek Hebisch
[email protected]
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.