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
cleaning reall and complex balls #24285
Comments
Commit: |
Branch: u/vdelecroix/24285 |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:3
Quick comments (no time for a full review before several weeks): I like some of the refactoring you did, especially the part related to the interface with number fields and the NTL dependency. However, I feel that using a Cython class for the parent is a big step backward. The only advantage I see is that it should make accessing the precision field much faster, but there are other ways to do that—even storing a copy of the precision in every ball would be a better option IMO—and to date it wasn't much of an issue in my benchmarks anyway. Do you have other reasons for making this change? I have mixed feelings about the change to |
comment:4
Replying to @mezzarobba:
Thanks for having a quick look already. After reading your comments I would propose to:
Indeed. If you try to use Cython in a
Why would you prefer a Python class over an extension class inside a The real point is: "How do you create a ball from nothing in Cython?". This is needed here in the code
The way it is for interval is at least simple
Same comment applies: uniformity with real intervals. (BTW, a docstring is not any serious doctest breaking) |
This comment has been minimized.
This comment has been minimized.
comment:6
Replying to @videlec:
Yes, and there are real benefits. The first is that by using a custom cache, you are making a strong reference to each parent. With
So I also think removing the |
comment:7
Also, the category framework works better when the parents are plain Python classes. More generally, I thought there was a consensus that parents should always be Python classes, except perhaps in a few very special cases. Regarding the convergence between interval fields and ball fields, I am not really convinced that they serve the same purpose and need to be interchangeable, though of course it is better if they are somewhat compatible. And I don't think we made up our own coding conventions when implementing the arb interface. Rather, the implementation of MPFI intervals is quite outdated (and their behavior sometimes plainly incorrect), while the arb interface is more modern and more careful about giving correct results—at the price that some things that rely on questionable behavior elsewhere in sage simply don't work. The first step to improve the situation IMO would be to modernize the implementation of intervals. I have an old branch where I started doing that at |
comment:9
Please move your interesting balls comments on #24289. This ticket stands for moving the quadratic number field conversion. |
This comment has been minimized.
This comment has been minimized.
comment:10
Replying to @mezzarobba:
You really need to explain me what is the difference in usage then.
Indeed. It might be more reasonable starting in this direction. If you make your branch alive again I can review it. |
comment:11
And patchbots are happy! |
comment:12
Since |
comment:13
Right! Good catch. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:15
Replying to @tscrim:
Looks reasonable to me, but I only skimmed through the code. Why remove the ability to construct a complex ball from a machine integer? Since this is something supported by arb, Typos: “that the map go through”, ”cancellationss”. Vincent: Yes, I'll try to see if I can do something with my old branch(es) about intervals, post my comments on the other ticket, etc. ...but not now. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
Replying to @mezzarobba:
It does work through
Note that it used to be in
is that a typo?
right. Fixed in 27ac94b |
comment:18
Replying to @videlec:
Should be "that the map goes through". |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:20
thanks |
comment:21
Replying to @videlec:
I'm not sure it needs to be that slow when called from Cython code, but I admit I didn't measure. I don't really care anyway.
Yes, that's what I meant, sorry. As far as I can say, the general logic how how constructors are organized in the arb interface is that (i) |
This comment has been minimized.
This comment has been minimized.
comment:23
I am going to consider that as a positive review. |
Reviewer: Marc Mezzarobba, Travis Scrimshaw |
comment:24
Thanks Travis and Marc. Indeed, remaining remarks mostly concern the parts of the ticket that have been moved to #24289. |
Changed branch from u/vdelecroix/24285 to |
Changed commit from |
comment:26
Actually this change:
is not correct, because the ball constructor only accepts quadratic NF elements. NF elements of higher degree can be converted to complex balls, but only through CLF or CIF. Fixed at #24621. |
We perform some cleaning
number field -> ball
in the files relative to number fields (creation of methds_arb_
and_acb_
for that purpose)with X bits precision
->with X bits of precision
in string representation(follow up #24318)
(this is part of the task ticket #24289)
CC: @mezzarobba
Component: basic arithmetic
Author: Vincent Delecroix
Branch:
3396c3e
Reviewer: Marc Mezzarobba, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/24285
The text was updated successfully, but these errors were encountered: