Chronology | Current Month | Current Thread | Current Date |
[Year List] [Month List (current year)] | [Date Index] [Thread Index] | [Thread Prev] [Thread Next] | [Date Prev] [Date Next] |
In my little error propagation (monte carlo) routines, I get this
nice little bit:
a=Quantity('1 +- .0001')
b=Quantity('-2.08 +- .01')
c=Quantity('1.08 +- .01')
In [3]:evaluate('b**2-4*a*c')
Out[3]:0.00699313256158 +- 0.0579303054605
which gives rise to complex solutions if I try:
In [4]:evaluate('-b+sqrt(b**2-4*a*c)/(2*a)')
Out[4]:nan +- nan
Not sure what the best way to handle that is!