Displaying 1 result from an estimated 1 matches for "arithglub".
2006 Sep 15
1
setMethod() woes
...7
Next S4 problem.
I have "brob" objects that are large real numbers, and now I want "glub"
numbers that are to be a pair of glubs that represent complex numbers.
I want to define binary operator "+" so that if either the left or right
argument are glubs, it uses .ArithGlub.
If either argument is a brob (but neither is a glub), use .ArithGlub
If neither is a brob or a glub, use standard "+"
(just like real/complex "+").
My attempt (self contained, minimal) is included below.
But, with this, the following session shows that something is wrong:...