Menu

#3005 Manual is wrong about "sqrt" and "radexpand"

None
closed
nobody
5
2015-08-25
2015-08-25
No

The manual entry for "sqrt" says:

sqrt(16 * x^2) will become 4 * x only if radexpand is true.

This is not true. sqrt(16 * x^2) will become 4 * abs(x).

Discussion

  • Kris Katterjohn

    Kris Katterjohn - 2015-08-25

    I think that you may have misread the documentation. It says "if 'radexpand' is 'all', 'sqrt (16*x^2)' simplifies to '4*x'"

    (%i1) sqrt(16*x^2);
    (%o1) 4*abs(x)
    
    (%i2) sqrt(16*x^2),radexpand:all;
    (%o2) 4*x
    
     
  • David Scherfgen

    David Scherfgen - 2015-08-25

    In my manual it definitely says "true". But I don't have the latest version, so probably it has been fixed already.

     
  • Kris Katterjohn

    Kris Katterjohn - 2015-08-25

    You were correct to start with, I was looking at the docs for radexpand instead of sqrt. Sorry about that! It's too early.

    Perhaps the sqrt entry should just reference radexpand (like it does for rootscontract) instead of incorrectly duplicating part of the entry. I can commit a fix for this later today if nobody else gets to it first.

    Thanks for the report.

     
  • Kris Katterjohn

    Kris Katterjohn - 2015-08-25

    This was fixed in commit [594844]. Thanks again for the report and sorry for the confusion earlier.

     

    Related

    Commit: [594844]

  • Kris Katterjohn

    Kris Katterjohn - 2015-08-25
    • status: open --> closed
     

Log in to post a comment.