Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-14 Thread mmarco
I would advocate that RLF is a very good approximation of what should be RR. Perhaps one good direction to take is to try to make RLF smarter and contains all constants from pi to cos(42^e). Somehow, it already does (i.e. internally it keeps track of their symbollic nature): {{{

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-14 Thread Vincent Delecroix
2014-03-14 10:45 UTC+01:00, mmarco mma...@unizar.es: I would advocate that RLF is a very good approximation of what should be RR. Perhaps one good direction to take is to try to make RLF smarter and contains all constants from pi to cos(42^e). Somehow, it already does (i.e. internally it

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-14 Thread mmarco
This is half good, I am happy that RLF wraps symbolic constants. But, first of all there can not be any reasonable coercion from SR to RLF as SR is much bigger. Secondly, SR is not consistent with evaluation sage: cos(1.).parent() Real Field with 53 bits of precision sage:

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-14 Thread Vincent Delecroix
2014-03-14 14:24 UTC+01:00, mmarco mma...@unizar.es: This is half good, I am happy that RLF wraps symbolic constants. But, first of all there can not be any reasonable coercion from SR to RLF as SR is much bigger. Secondly, SR is not consistent with evaluation sage: cos(1.).parent() Real

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-14 Thread mmarco
Any number cos(rational x pi) is algebraic and equality of algebraic numbers is decidable. Moreover, it is not because something is undecidable that Sage should return a wrong answer. In that case, it would be good to have a third party in comparison (either returning Unknown or

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-13 Thread Vincent Delecroix
Salut Thierry, I did not see your post before posting mine ! I mostly agreed but I would love to have something better. There are two kinds of approximation that one can have when dealing with computations : - approximate operations +, -, x, / (that allows for example to deal with a finite

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-13 Thread Volker Braun
On Wednesday, March 12, 2014 8:45:57 PM UTC-4, Thierry (sage-googlesucks@xxx) wrote: - create RSF (for real symbolic field) to isolate pi and sqrt(2) from cos(x) in the symbolic ring. Thats essentially what RLF does. - re-create RR as an overlay field over the different

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-13 Thread Vincent Delecroix
2014-03-13 21:32 UTC+01:00, Volker Braun vbraun.n...@gmail.com: On Wednesday, March 12, 2014 8:45:57 PM UTC-4, Thierry (sage-googlesucks@xxx) wrote: - create RSF (for real symbolic field) to isolate pi and sqrt(2) from cos(x) in the symbolic ring. Thats essentially what RLF does. Nope,

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-13 Thread Thierry
On Thu, Mar 13, 2014 at 01:32:10PM -0700, Volker Braun wrote: On Wednesday, March 12, 2014 8:45:57 PM UTC-4, Thierry (sage-googlesucks@xxx) wrote: - create RSF (for real symbolic field) to isolate pi and sqrt(2) from cos(x) in the symbolic ring. Thats essentially what RLF does.

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-13 Thread Thierry
On Thu, Mar 13, 2014 at 10:08:05PM +0100, Vincent Delecroix wrote: [...] I would advocate that RLF is a very good approximation of what should be RR. Perhaps one good direction to take is to try to make RLF smarter and contains all constants from pi to cos(42^e). A generalisation of RLF could

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-13 Thread Volker Braun
On Thursday, March 13, 2014 5:10:53 PM UTC-4, Thierry (sage-googlesucks@xxx) wrote: This is not about floating-point arithmetic nor evaluation, but about a common parent with some semantics in it. Its fine to strive for generality, but I don't think its a good idea to have something

Re: [sage-devel] Re: How to define a new ring class ? [We need a class representing genuine real field]

2014-03-12 Thread Thierry
Hi, On Wed, Mar 12, 2014 at 01:29:47PM -0700, mmarco wrote: RR if you don't care about the lack of exactness QQ or some extension (like AA) if you want exactness but don't mind the lack of transcendentals SR if you want to allow arbitrary expressions, with the problem of speed and maybe