Is there a mode setting -- evaluate versus exact mode, or what have you?
I've only used a few math suites, so I can't be much help specifically..
Tim
-- Seven Transistor Labs Electrical Engineering Consultation Website:
Help!
>
> I'm trying to learn the Sage mathematics package but with no
> documentation, it's proving almost impossible. Here's an example
> problem, find the mu of a ferrite from its physical parameters and an
> inductance test.
>
> L,mu,N,area,pathlength = var('L mu N area pathlength')
>
> L=20.65e-3
> N=50
> area=11.544
> pathlength=27.63
>
> solve(L == 0.4 * pi * mu * N^2 * (area / pathlength)*1e-8, mu)
>
> Sage produces the mathematically correct but useless answer:
>
> [mu == 9509325/1924/pi]
>
> Instead of the correct AND useful answer
> 1573.2
>
> There is the n() operator that is supposed to return the numerical
> result but if I use the expression
>
> n(mu)
>
> Sage returns
>
> "TypeError: cannot evaluate symbolic expression numerically"
>
> If I try
>
> n(L == 0.4 * pi * mu * N^2 * (area / pathlength)*1e-8, mu)
>
> I get
>
> "ValueError: cannot convert mu to int"
>
> I don't know where to go from here. Not knowing Python probably
> doesn't help anything. Any help is greatly appreciated.
>
> John
> John DeArmond
>formatting link
>formatting link
> Tellico Plains, Occupied TN
> See website for email address
>