Re: [sage-support] Re: sage 6.6: libgd may have failed to build

2015-05-03 Thread William Stein
On Fri, May 1, 2015 at 3:31 PM, fidelbc wrote: > Issue solved. In case anyone using arch linux runs into the same issue, you > can drop the attached patch into the build/pkgs/libgd/patches/ directory. > > The problem seems to be with the libvpx library (which was recently > updated). For more deta

Re: [sage-support] safe conversion of python object to C long

2015-05-03 Thread Jeroen Demeyer
On 2015-05-03 23:04, Vincent Delecroix wrote: If u is an instance of an extension class that properly defines __index__, does the above call avoids the creation of an intermediate Python int? No, there will be a Python int created and I don't think it is possible to skip this in Python. -- You

Re: [sage-support] safe conversion of python object to C long

2015-05-03 Thread Vincent Delecroix
On 03/05/15 22:52, Jeroen Demeyer wrote: > On 2015-05-03 22:47, Vincent Delecroix wrote: >> Hello, >> >> How do we convert Python object to a C long in Cython? The following >> does not work properly as rationals or float gets converted (to their >> floor) >> > In Cython, you call PyNumber_Index()

Re: [sage-support] safe conversion of python object to C long

2015-05-03 Thread Jeroen Demeyer
On 2015-05-03 22:47, Vincent Delecroix wrote: Hello, How do we convert Python object to a C long in Cython? The following does not work properly as rationals or float gets converted (to their floor) def f(u): cdef long u_long = u Well, Cython gave you what you asked for :-) Cython consi

[sage-support] safe conversion of python object to C long

2015-05-03 Thread Vincent Delecroix
Hello, How do we convert Python object to a C long in Cython? The following does not work properly as rationals or float gets converted (to their floor) def f(u): cdef long u_long = u the following does def long f(u): cdef long u_long = u if u != u_long: raise TypeError but

[sage-support] Re: Sage find_root error

2015-05-03 Thread Dominique Laurain
What can be done ? It depends of what you are looking for. : why you have to solve "x tan x = 0" ? A human will handle factorization and get the answer : x = 0 or tan x = 0...and you can continue yourself wthout computer, no ? -- You received this message because you are subscribed to the Goo

[sage-support] Re: Sage find_root error

2015-05-03 Thread Paul Royik
Thank you for your answer. And what should be done in this case? On Sunday, May 3, 2015 at 10:27:44 AM UTC+3, Dominique Laurain wrote: > > > I bet I know why : we can trick mathematical sofware in various > ways,...,but why should we ? > find_root is "numerical" function to get approximate real r

[sage-support] Re: Sage find_root error

2015-05-03 Thread Dominique Laurain
I bet I know why : we can trick mathematical sofware in various ways,...,but why should we ? find_root is "numerical" function to get approximate real root of function in intervalwhen we know ( "theorically") the root exists !! the function can be implemented in various ways, and for example