Post by Andreas BrusinskyYes "dual numbers" are hypercomplex numbers so are there already
some 'hypercomplex' rules in the package's or contrib's?
And how could/would I possibly attach 'dual number'-'definitions' to current "realpart(...)" to give the real part of a 'dual number'?
You can define a function realpart_of_dual() if you wish.
Or you can redefine realpart. I suggest you start by doing this:
:lisp (setf (symbol-function '$orig_realpart) (symbol-function '$realpart))
You now have access to the original realpart program and can redefine the
function attached to the name realpart.
I don't know how you are planning to represent duals.
For example, realpart_of_dual(d):= realpart(coeff(d,eps,0) );
if a dual number looks like a+eps*b.
It would be much preferable computationally for dual numbers to look
like dual(a,b), in which case
dualp(r):= is( not(atom(r)) and equal(inpart(r,0),dual));
and then your program could say..
realpart(K) := if dualp(K) then args(K)[1] else K
or maybe
realpart(K) := if dualp(K) then orig_realpart(args(K)[1]) else
orig_realpart( K)
dualpart(K):= if dualp(K) then args(K)[2] else 0
It is not necessary to alter the built-in realpart() that is used
by other people.
RJF
Post by Andreas BrusinskyAnd also attach possibly something like "dualpart(expression)" besides "imagpart()"?
Thanks for your many responses.
Andreas
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Maxima-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/maxima-discuss