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

get rid of comparison using _cmp_ #30130

Closed
fchapoton opened this issue Jul 13, 2020 · 14 comments
Closed

get rid of comparison using _cmp_ #30130

fchapoton opened this issue Jul 13, 2020 · 14 comments

Comments

@fchapoton
Copy link
Contributor

and use _richcmp_ instead

So far, this remains used only in complex MPC and Integer classes.

CC: @tscrim

Component: refactoring

Author: Frédéric Chapoton

Branch/Commit: e6963fb

Reviewer: Travis Scrimshaw

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

@fchapoton fchapoton added this to the sage-9.2 milestone Jul 13, 2020
@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/30130

@fchapoton
Copy link
Contributor Author

Commit: 066b9d9

@fchapoton
Copy link
Contributor Author

comment:1

This seems to reveal a bug in the pickling of complex numbers. Namely

sage: C = MPComplexField(prec=200, rnd='RNDUU')
sage: b = C(393.39203845902384098234098230948209384028340)
sage: loads(dumps(b))
393.39203845902384098234098230948209384028340000000000000000 + NaN*I

New commits:

066b9d9get rid of `_cmp_` comparison

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 13, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

44e7434fix the bug in complex_mpc (for string entry without imaginary part)

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 13, 2020

Changed commit from 066b9d9 to 44e7434

@fchapoton
Copy link
Contributor Author

comment:3

Should be good to go now. Let us wait for the patchbot report.

@tscrim
Copy link
Collaborator

tscrim commented Jul 13, 2020

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Jul 13, 2020

comment:4

What a glorious day. Green bot => positive review.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 13, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

e6963fbfix doc and doctests about _cmp_

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jul 13, 2020

Changed commit from 44e7434 to e6963fb

@fchapoton
Copy link
Contributor Author

comment:6

some trivial doctest failures. Patchbot re-launched

@fchapoton
Copy link
Contributor Author

comment:7

One fast patchbot is morally green. Travis, do you agree with my last commit ?

@tscrim
Copy link
Collaborator

tscrim commented Jul 13, 2020

comment:8

Yep. LGTM. Thanks.

@vbraun
Copy link
Member

vbraun commented Jul 25, 2020

Changed branch from u/chapoton/30130 to e6963fb

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

3 participants