I think you need to compute exp(k ln(x) ) for x^k Sent from my iPad On Jan 14, 2011, at 6:00 AM, cln-list-request@ginac.de wrote:
Send CLN-list mailing list submissions to cln-list@ginac.de
To subscribe or unsubscribe via the World Wide Web, visit https://www.cebix.net/mailman/listinfo/cln-list or, via email, send a message with subject or body 'help' to cln-list-request@ginac.de
You can reach the person managing the list at cln-list-owner@ginac.de
When replying, please edit your Subject line so it is more specific than "Re: Contents of CLN-list digest..."
Today's Topics:
1. exponants of floating points (or do I need it ?) (Franck Sabati?)
----------------------------------------------------------------------
Message: 1 Date: Fri, 14 Jan 2011 09:40:23 +0100 From: Franck Sabati? <fsabatie@gmail.com> To: cln-list@ginac.de Subject: [CLN-list] exponants of floating points (or do I need it ?) Message-ID: <AANLkTinG7GBxWw0We=8tGv_DNW7CoHK3L-UcFNqaU7iF@mail.gmail.com> Content-Type: text/plain; charset="iso-8859-1"
Hello,
I have a hard time seeing how to best implement the following : I have a complicated equation of 4 variables that I need evaluated with a certain number of digits in precision (30 or so) :
dummy = (15/4)*(1/(pow(xi,5)*(1+i-k)*(2+i-k)*(3+i-k)*(4+i-k)*(5+i-k)))*( ( (3*pow(3+i-k,2)-(1+i-k)*(5+i-k))*pow(xi*xi-xb,2) -2*(2+i-k)*(4+i-k)*(1-xi*xi)*(xb*xb-xi*xi) ) * ( pow((xb+xi)/(1+xi),3+i-k)- pow((xb-xi)/(1-xi),3+i-k) ) + 6*(3+i-k)*xi*(1-xb)*(xi*xi-xb)*(pow((xb+xi)/(1+xi),3+i-k)+ pow((xb-xi)/(1-xi),3+i-k)) );
where the variables are i, k, xb and xi. Although most of the equation is relatively easy to implement in CLN, I have a hard time figuring out how to deal with the "pow". There appears to be no such exponant function for floats ? Also, it is still unclear to me how to enter this equation painlessly into my code. Do I have to put cl_float(1,30) when I use 1 for instance ? (same for other numbers). Should I evaluate this in floating precision or with "real numbers" ? And finally how do I evaluate expressions such as (something)^(something else) with the (something else) NOT being an integer.
Sorry about the very basic questions but most of the demo examples deal with integers and the few that do not, have very little information in them.
Thank you for your time, Franck