#499 featurep believes that most things are complex

closed
nobody
5
2009-11-07
2004-01-28
Anonymous
No

featurep believes that most things are complex;
some examples

(C1) featurep([],complex);
(D1) TRUE
(C2) featurep(a < b, complex);
(D2) TRUE
(C3) build_info();

Maxima version: 5.9.0
Maxima build date: 19:10 2/9/2003
host type: i686-pc-mingw32
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL-2-5.0

What featurep should in these (and many other cases)
isn't clear...

Barton

Discussion

  • Barton Willis
    Barton Willis
    2004-01-28

    Logged In: YES
    user_id=895922

    I forgot to login; so that comments get sent to me, I'll
    attach this comment.

    Barton

     
  • Logged In: YES
    user_id=588346

    Not most things, all things!:

    (defmfun $featurep (e ind)
    (cond ...
    ((eq ind '$complex) t)
    ...))

     
  • Barton Willis
    Barton Willis
    2004-01-29

    Logged In: YES
    user_id=895922

    Yes, make that all! A related problem

    - Function: FEATUREP (a,f)
    attempts to determine whether the object a has the
    feature f on the basis of the facts in the current data base.
    If so, it returns TRUE, else FALSE.

    But consider:

    (C1) featurep(asin(x),real);
    Is (x - 1) (x + 1) positive, negative, or zero?
    neg;

    (D1) TRUE

    This is inconsistent with the documentation -- featurep is
    using facts outside the current database!

    The next case is just plain wrong; my answers imply x == 1.
    And asin(1) is real.

    (C2) featurep(asin(x),real);
    Is (x - 1) (x + 1) positive, negative, or zero?
    zero;
    Is x positive or negative?
    pos;
    (D2) FALSE
    (C3)

    Barton

     
  • Robert Dodier
    Robert Dodier
    2006-07-23

    • labels: --> Lisp Core - Assume
     
  • Robert Dodier
    Robert Dodier
    2006-07-23

    Logged In: YES
    user_id=501686

    All examples -- featurep([],complex); featurep(a < b,
    complex); featurep(asin(x),real); -- same behavior in 5.9.3cvs.

     
  • Dieter Kaiser
    Dieter Kaiser
    2009-11-07

    We had a change to featurep in compar.lisp revision 1.57. The examples of this bug report are now more correct:

    (%i21) featurep([],complex);
    (%o21) false
    (%i22) featurep(a<b,complex);
    (%o22) false
    (%i23) featurep(asin(x),real);
    (%o23) false

    Closing this bug report as fixed.
    Dieter Kaiser

     
  • Dieter Kaiser
    Dieter Kaiser
    2009-11-07

    • status: open --> closed