I have now a prototype denesting code.  It is somewhat long for
an email, so I put it at:

http://fricas.math.uni.wroc.pl/~hebisch/rsimp2.input

So try it first do

)read rsimp2.input

ATM there is one user oriented function called 'rsimp'.  Argument
to 'rsimp' should be a single root, it tries to produce
denested version of the root, like:

rsimp(sqrt(12 + 2*sqrt(6) + 2*sqrt(14) + sqrt(6)*sqrt(14)))

            +-+      +--+      +-+
          (\|6  + 3)\|14  + 7 \|6
   (275)  ------------------------
                     +--+
                    \|42

or

rsimp(sqrt(x + sqrt(x^2 - 1)))

           +-------+ +------+           +-------+
           |   1     | 2                |   1
   (276)   |------- \|x  - 1  + (x + 1) |-------
          \|2 x + 2                    \|2 x + 2

or

rsimp(sqrt(13^(1/3)+(108)^(1/3)))                          

            3+--+2     3+-+3+--+   3+-+2
          2 \|13   + 2 \|4 \|13  - \|4
   (277)  ------------------------------
                         6


Due to interpreter limitation argument must be of type Expression(Integer).
In principle the code should be able to denest roots of degree up
to 12 when nested roots are all square roots, and roots of degree up
to 4 when nested roots involve cube roots.  But there are shortcuts
in implementation which may lead to loss of some denstings.  ATM
code does not handle dependent roots, nested roots must be
independent.  And computational complexity is quite high, so
complicated examples may take very long time or run out of
memory.  Still, I think that even in its current state this is
quite powerful denester.

-- 
                              Waldek Hebisch

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/fricas-devel/ZNp4BIlQPci/AyV9%40fricas.math.uni.wroc.pl.

Reply via email to