[sage-support] Re: Any way to call a sage function with a time limit?

2010-11-19 Thread Derrick
thanks, I got it. On Nov 19, 1:56 pm, Alex Leone wrote: > I think the @fork decorator might do what you want.  I've never used it > though. > > @fork(timeout=5.0) > def f(...): >     ... > >  - Alex -- To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this

[sage-support] Any way to call a sage function with a time limit?

2010-11-19 Thread Derrick
Suppose I use a sage function and it's taking too long. Is there a way to invoke the function with a specified time so that when it exceeds that given time, it will terminate gracefully without completing the computation? -- To post to this group, send email to sage-support@googlegroups.com To un

[sage-support] Re: bool(arcsin(x) == 2*arctan(x/(1+sqrt(1-x^2)))) returns false !!!

2010-11-16 Thread Derrick
se Do you have any idea why sage "bool" fails for trig functions with fractional angles? Can you suggest any work around? On Nov 12, 9:36 pm, Robert Bradshaw wrote: > On Fri, Nov 12, 2010 at 3:44 PM, Derrick wrote: > > Any clue why bool(arcsin(x) == 2*arctan(x/(1+sqrt(1-x^2)))

[sage-support] bool(arcsin(x) == 2*arctan(x/(1+sqrt(1-x^2)))) returns false !!!

2010-11-12 Thread Derrick
Any clue why bool(arcsin(x) == 2*arctan(x/(1+sqrt(1-x^2 returns false where the expressions are mathematically equivalent. I found that arcsin(x) - 2*arctan(x/(1+sqrt(1-x^2))) is not exactly 0 for all x in [-1,1]. In sage, is there any way to compare expressions with some numerical precision?