-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
classes for the fields of complex and real numbers #24456
Comments
comment:2
+1 |
comment:3
:-) pushing in a minute... |
Author: Vincent Delecroix |
This comment has been minimized.
This comment has been minimized.
Commit: |
New commits:
|
Branch: u/vdelecroix/24456 |
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
comment:10
For me this looks fine (I can now create the object and use it in formal expressions) and patchbot is green. If you think this is not enough for a review then please set back to "needs review". |
comment:12
Thanks. I also had a question turning up while working on #24457. The code here does not support |
comment:13
Replying to @rwst:
It is intended: the field of real number is the field of real number (see e.g. wikipedia). The code provided in the branch
No. The |
comment:14
Some comments:
|
comment:15
I don't quite understand the purpose of this new Why is this thing a |
This comment has been minimized.
This comment has been minimized.
comment:39
Replying to @jdemeyer:
Agreed.
I want to be able distinguish between exact subrings and non-exact approximations. This is for coercion reasons: each exact subring coerces into all non-exact approximations. This is also why I claimed that Let me add
|
comment:40
If you want to ask about exact reals, you should have a 2', where you have a subclass of generic all reals class for the exact reals. |
comment:41
Concerning approximations (like floating point numbers), there are often the three special values On the other hand, Python |
comment:42
Replying to @videlec:
I still don't get this. Please elaborate... |
This comment has been minimized.
This comment has been minimized.
comment:44
Replying to @videlec:
What is the it in this last sentence? |
comment:45
Replying to @jdemeyer:
For me |
comment:46
Replying to @jdemeyer:
I meant the genuine real field that we are trying to design. |
comment:47
Replying to @videlec:
OK, so what would it mean for a Python object (representing the real field) to "contain a class factory"? Do you want something like
or maybe
|
This comment has been minimized.
This comment has been minimized.
comment:48
Replying to @videlec:
That point of view is technically mathematically true but also completely useless. Clearly, the real floating-point field is meant to model the real numbers. For technical reasons, the operations are not exact. But that is an implementation detail and not a mathematical property. For practical purposes, it behaves as a field. I do agree that it makes sense to differentiate between exact real fields and approximate real fields, but both are real fields. |
comment:49
Replying to @jdemeyer:
Indeed!
It is not associative! Equality dramatically fails! This is not a detail.
I also agree and IMHO, for consistency with |
This comment has been minimized.
This comment has been minimized.
Changed branch from u/vdelecroix/24456 to u/rws/24456 |
comment:52
Rebased on the dependency. New commits:
|
Work Issues: merge conflict |
comment:53
Does not apply anymore. |
comment:54
I think, this is a splendid idea. What can be done to stress this forward? Can I help? |
comment:56
Replying to @mjungmath:
Indeed, it was a terrible design from the start. The main obstruction to change it is backward compatibility... You can work on any of #24483, #24489 and #24457 that are prerequisite for this ticket. |
We create (mostly abstract) classes to model the set of complex and real numbers as
sage.rings.complex_field.ComplexField
andsage.rings.real_field.RealField
.See also task ticket #17713.
Use cases for this new "real field" object:
As some placeholder object to denote the field of real numbers, for example as output of
QQ.completion(oo)
, for domain/codomain of symbolic functions, in manifolds, etc. This implies that it should be a unique object.As a Sage analogy to PEP 3141: it should provide a way to ask "is
x
a real number" or "isX
a substructure of the reals" or maybe "does parentX
represent the real numbers". Also, we should be able to ask "isx
an exact or approximate real number". Note that Sage already has partial support for PEP 3141 but only for elements (not parents).As a class factory for all concrete real fields (e.g. the
create_RealField
function that is currently used for non-exact approximations).Depends on #24464
Depends on #24465
Depends on #24483
Depends on #24457
CC: @rwst @tscrim @egourgoulhon @mjungmath
Component: basic arithmetic
Work Issues: merge conflict
Author: Vincent Delecroix
Branch/Commit: u/rws/24456 @
febfe35
Issue created by migration from https://trac.sagemath.org/ticket/24456
The text was updated successfully, but these errors were encountered: