Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modernize sage.rings.real_mpfr #24457

Open
videlec opened this issue Jan 1, 2018 · 64 comments
Open

modernize sage.rings.real_mpfr #24457

videlec opened this issue Jan 1, 2018 · 64 comments

Comments

@videlec
Copy link
Contributor

videlec commented Jan 1, 2018

The current sage.rings.real_mpfr deals with arbitrary precision floating-point numbers (using mpfr). This is the default "real field" in many places in Sage even though it is often wiser to use intervals or balls. We perform some cosmetic changes to sage.rings.real_mpfr to emphasize the fact that the module deals with floating-point approximations of real numbers and not genuine reals. These modifications touch a lot of files and involve deprecation of widely used names.

See also the introduction of a genuine real field class in #24456 for another motivation.

step 1

step 2

  • Deprecate RR and Reals and use RFF (or RFPF?) as the standard name for RealFloatingPointField(53)?
  • more documentation.

for complex numbers, see #24489.

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/24457

@videlec videlec added this to the sage-8.2 milestone Jan 1, 2018
@rwst
Copy link

rwst commented Jan 2, 2018

Dependencies: #24456

@rwst
Copy link

rwst commented Jan 2, 2018

Author: Ralf Stephan

@rwst
Copy link

rwst commented Jan 2, 2018

Changed branch from #24456 to none

@rwst
Copy link

rwst commented Jan 2, 2018

comment:2

In real_mpfr.pyx do you mean to rename cpdef RealField(int prec=53,...) or cdef class RealField_class?

@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@rwst
Copy link

rwst commented Jan 3, 2018

@rwst
Copy link

rwst commented Jan 3, 2018

comment:6

This commit changes 164 files. Preliminary testing passes in rings and src/doc. There might be subtle errors introduced in the documentation. Let's try the patchbots.


New commits:

62d2d2124456: class for the field of real numbers
71f9fd024457: bulk rename RealField --> RealFloatingPointField

@rwst
Copy link

rwst commented Jan 3, 2018

Commit: 71f9fd0

@rwst
Copy link

rwst commented Jan 3, 2018

comment:7

Ah I forgot the string representation part.

@rwst
Copy link

rwst commented Jan 3, 2018

comment:8

Sorry, I was pretty sure I excluded real_field.py.

@rwst
Copy link

rwst commented Jan 3, 2018

Changed branch from u/rws/rename_sage_rings_real_mpfr_realfield to none

@rwst
Copy link

rwst commented Jan 3, 2018

Changed commit from 71f9fd0 to none

@rwst
Copy link

rwst commented Jan 3, 2018

Branch: u/rws/24457-1

@rwst
Copy link

rwst commented Jan 3, 2018

Commit: 8bdf66b

@rwst
Copy link

rwst commented Jan 3, 2018

comment:10

After changing the string representation as well:
223 files changed, 1493 insertions(+), 1493 deletions(-). I don't have hopes this gets through, except maybe in a beta of its own.


New commits:

62d2d2124456: class for the field of real numbers
8bdf66b24457: rename sage.rings.real_mpfr.RealField

@jdemeyer
Copy link

jdemeyer commented Jan 3, 2018

Replying to @videlec:

  • change the name of RealField/RealField_class to RealFloatingPointField/RealFloatingPointField_class

Do we still need the old RealField given that it's no longer used after #24456?

@rwst
Copy link

rwst commented Jan 3, 2018

Changed branch from u/rws/24457-1 to u/rws/24457-2

@rwst
Copy link

rwst commented Jan 3, 2018

New commits:

3c7f16e24457: rename sage.rings.real_mpfr.RealField

@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@videlec
Copy link
Contributor Author

videlec commented Jan 11, 2018

comment:41

Let us do that incrementally (ie each subtask in ticket). It will simplify review and merging. Though I would feel much more confortable if the whole task would be actually closed within the next stable release.

@videlec
Copy link
Contributor Author

videlec commented Jan 11, 2018

comment:42

Replying to @videlec:

Replying to @rwst:

The deprecation of is_RealNumber(x)/is_RealField(x) in favor of isinstance can be done independently of the renaming. Separate ticket to come.

Good idea!

Though it would be better to first change the names:

  • RealField -> RealFloatingPointField_factory
  • RealField_class -> RealFloatingPointField
  • RealNumber -> RealFloatingPoint
    to avoid passing twice on the same lines.

@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@videlec

This comment has been minimized.

@rwst
Copy link

rwst commented Feb 23, 2018

comment:48

Rebased on the remaining dependency.

@rwst
Copy link

rwst commented Feb 23, 2018

comment:49

OOps wrong ticket.

@videlec
Copy link
Contributor Author

videlec commented Jun 3, 2018

Changed dependencies from #24511 to none

@videlec videlec modified the milestones: sage-8.2, sage-8.3 Jun 3, 2018
@videlec
Copy link
Contributor Author

videlec commented Aug 3, 2018

comment:51

update milestone 8.3 -> 8.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants