On Tue, Jun 12, 2012 at 11:59 PM, Sergiu Ivanov <[email protected]> wrote: > On Tue, Jun 12, 2012 at 9:09 PM, Peter Tittmann <[email protected]> wrote: >> >> However solving for 'p' or 'D' both basically cause the python shell to hang >> unitil I force the shell to quit. No error message, and I can hear the CPU >> ramp up > > I'm just throwing out wild guesses, but could you maybe avoid using > floating point numbers? Using floats sometimes causes the problem you > describe because of rounding errors.
solve (now) does this automatically unless you tell it not to do so...try the rational=False flag to get the instantaneous result: >>> solve(eqn,p,rational=False) [0.0281453361619944*(250000.0*D**2.34 + 17.0*H - 250000.0*W + 962500.0)**0.42735 0427350427] [0.00493387372833267*(-17.0*H + 250000.0*W + 4250.0*p**2.34 - 962500.0)**0.42735 0427350427] /c -- You received this message because you are subscribed to the Google Groups "sympy" group. 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/sympy?hl=en.
