What is the purpose of this message?
-- It sounds very suspicious to me, because there is nothing like a natural sign definition for complex, like there is no natural full order relation... Well, there are many possible full order relations, but none respects (a < b & (c < d) ==> ((a+c)<(b+d))) Or maybe there is a signum function extension for complex, but very different from current implementation, see http://en.wikipedia.org/wiki/Sign_function You received this message because you are subscribed to the Google Groups "SciSmalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
On Monday, April 21, 2014 10:45:48 PM UTC+2, Nicolas Cellier wrote:
probably just some kind of completeness? otoh it wouldnt be too difficult to write 'real sign' instead of 'sign' if one needs to. wernerYou received this message because you are subscribed to the Google Groups "SciSmalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Nicolas,
I believe this was added by me because sign was being sent by printing and inspecting methods in DHB Polynomials, so creating a polynomial with complex coefficients caused errors when an inspector was opened or the value was printed. Since the real is printed first, it seemed innocuous to add the 'sign' of the complex as the sign of the real to cue to the print methods to use either a plus or a minus. I agree that this has no valid mathematical meaning. It's never called in arithmetic, but there were places in the DHB code that assumed scalars had a sign method and that this was needed for printOn and similar methods. Dan On 4/22/14, 2:05 AM, werner kassens wrote:
signature.asc (591 bytes) Download Attachment |
On Tuesday, April 22, 2014 5:15:01 PM UTC+2, Daniel Uber wrote:
Thanks, that's what I wanted to know. So DHB requires a polymorphic behaviour of Number and Complex. The sign implementation does not match that of Mathematica, Haskell, Matlab, ... If ever we don't want to keep current sign implementation, we have several solutions: - define a dhbSign extension - arrange to have a DhbComplexPolynomial with different sign handling - or more simply rewrite the part using sign I'll try and have a look when I have time... There is no urge about that, we can keep sign as is in the interim.
You received this message because you are subscribed to the Google Groups "SciSmalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |