On 11 lis, 11:16, zeliboba <[email protected]> wrote:
> let's say I have
> var('Re')
> f = 0.25 / (log(5.74 / Re^0.9, 10))^2 / 4
> I'd like to expand/evaluate all numerical constants and see dependency
> on Re like
> f = c1 / log(Re^c2)

There is no chance to get answer like this from your input if c1 and
c2 are constants

do  not know how to get answer in Sage, try maxima:
sage: maxima(str(f)+",numer").sage()
0.331368631905/log(5.74/Re^0.9)^2

You may want to turn expansion of logarithms to "super":

sage: f = 0.25 / (log(5.74 / Re^0.9, 10))^2 / 4
sage: maxima("(logexpand:super,temp:"+str(f)
+",logexpand:true,temp)").sage()
0.0625*log(10)^2/(-0.9*log(Re) + 1.74745921033)^2

Or you can do the same as in previsous example and use numer flag:

sage: maxima("(logexpand:super,temp:"+str(f)
+",logexpand:true,temp),numer").sage()
0.331368631905/(-0.9*log(Re) + 1.74745921033)^2
sage:

I am thinking to add suppport for expansion of logarithms and perhaps
evaluation this to Maxima, as well as improve support for rational
expressions (not only fullratsimp but also ratsimp and xthru). As soon
as I find time  - I would like to have this functionality in January,
but I have to and want to do some research now :)

I think that it would be simple to add a function which evaluates the
expression using numer flag in Maxima, but perhaps such a possibility
exists in current Sage - I do not know.

So my question for developers and experienced users os Sage is: Is
there a function which converts input like f = 0.25 / (log(5.74 /
Re^0.9, 10))^2 / 4 into 0.331368631905/log(5.74/Re^0.9)^2 in a similar
way as evaluation with numer flag in Maxima?

Robert


> how to reach this?
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to