Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#266 asksign/signum of ind and infinity/FIX

closed
nobody
5
2012-12-04
2003-03-21
Stavros Macrakis
No

signum(ind) and signum(infinity) return noun forms.

Since signum works correctly on inf (1), minf (-1), and
und (error), it might as well give errors for ind and infinity,
too.

The fix is in sign1 (compar.lisp).

OLD>>>>>>>>>
(if (eq x '$UND) (if limitp '$PNZ (merror "SIGN called on
UND.")))
NEW>>>>>>>>>
(if (memq x '($UND $IND $INFINITY))
(if limitp '$PNZ (merror "The sign of ~:M is undefined"
x)))

Discussion

  • Logged In: YES
    user_id=588346

    Actually, if you're computing with IND etc., perhaps signum
    (ind) should be ind rather than an error.

    Signum(infinity) should probably be an error because the sign
    of complex infinities isn't defined.

     
  • Robert Dodier
    Robert Dodier
    2006-07-04

    • labels: --> 460522
     
  • Robert Dodier
    Robert Dodier
    2006-07-07

    • labels: 460522 --> Lisp Core - Assume
     
  • Robert Dodier
    Robert Dodier
    2006-09-09

    • milestone: --> Includes_proposed_fix
     
  • Barton Willis
    Barton Willis
    2007-01-26

    • status: open --> closed
     
  • Barton Willis
    Barton Willis
    2007-01-26

    Logged In: YES
    user_id=895922
    Originator: NO

    Applied suggested patch. If you want signum(ind) --> ind,
    we'll need to change the code.