#562 rectform fails with float/numer flags

closed
Dan Gildea
5
2009-02-24
2004-04-23
Stavros Macrakis
No

rectform(log(-%i)) => -%i*%pi/2 OK
float(rectform(log(-%i))) => -1.57 * %i OK

rectform(log(-%i)),numer => 4.71 * %i NO!

rectform(log(-%i)),float => fatal error

The problem is the function 2pistrip.

Discussion

  • Robert Dodier
    Robert Dodier
    2006-07-29

    • labels: --> Lisp Core - Complex
     
  • Robert Dodier
    Robert Dodier
    2006-07-29

    Logged In: YES
    user_id=501686

    In 5.9.3cvs:

    rectform(log(-%i)),numer;
    => - 1.570796326794897 %i (OK)

    rectform(log(-%i)),float;
    => 1.5 %i %pi (OOPS)

     
  • Dan Gildea
    Dan Gildea
    2009-02-24

    Fixed in rpart.lisp rev 1.16

    (%i4) rectform(log(-%i));
    (%o4) -%i*%pi/2

    (%i5) float(rectform(log(-%i)));
    (%o5) -1.570796326794897*%i

    (%i6) rectform(log(-%i)),numer;
    (%o6) -1.570796326794897*%i

    (%i7) rectform(log(-%i)),float;
    (%o7) -0.5*%i*%pi

     
  • Dan Gildea
    Dan Gildea
    2009-02-24

    • status: open --> closed
    • assigned_to: nobody --> dgildea