Skip to content

Commit

Permalink
sagemathgh-36152: sage.rings: Update # needs
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
- Part of: sagemath#29705
- Cherry-picked from: sagemath#35095
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36152
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee, Matthias Köppe
  • Loading branch information
Release Manager committed Sep 3, 2023
2 parents 3824883 + 89e4c05 commit 0402500
Show file tree
Hide file tree
Showing 89 changed files with 5,496 additions and 4,946 deletions.
92 changes: 46 additions & 46 deletions src/sage/rings/abc.pyx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sage/rings/algebraic_closure_finite_field.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# sage.doctest: optional - sage.rings.finite_rings
# sage.doctest: needs sage.rings.finite_rings
r"""
Algebraic closures of finite fields
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/big_oh.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def O(*x, **kwds):
Traceback (most recent call last):
...
ArithmeticError: O(y) not defined
sage: O(x, y) # needs sage.symbolic
sage: O(x, y)
Traceback (most recent call last):
...
ArithmeticError: O(x, y) not defined
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/cfinite_sequence.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# sage.doctest: needs sage.symbolic
r"""
C-Finite Sequences
Expand Down
151 changes: 77 additions & 74 deletions src/sage/rings/complex_arb.pyx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sage/rings/complex_conversion.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cdef class CCtoCDF(Map):
sage: f = CCtoCDF(CC, CDF) # indirect doctest
sage: f(CC.0)
1.0*I
sage: f(exp(pi*CC.0/4))
sage: f(exp(pi*CC.0/4)) # needs sage.symbolic
0.7071067811865476 + 0.7071067811865475*I
"""
z = <ComplexDoubleElement>ComplexDoubleElement.__new__(ComplexDoubleElement)
Expand Down
140 changes: 73 additions & 67 deletions src/sage/rings/complex_double.pyx

Large diffs are not rendered by default.

22 changes: 12 additions & 10 deletions src/sage/rings/complex_interval.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ cdef class ComplexIntervalFieldElement(FieldElement):
'-2.5000000000000000?*I'
sage: CIF(1.5).str(base=3)
'1.1111111111111111111111111111111112?'
sage: CIF(1, pi).str(style='brackets')
sage: CIF(1, pi).str(style='brackets') # needs sage.symbolic
'[1.0000000000000000 .. 1.0000000000000000] + [3.1415926535897931 .. 3.1415926535897936]*I'
.. SEEALSO::
Expand Down Expand Up @@ -285,16 +285,18 @@ cdef class ComplexIntervalFieldElement(FieldElement):
EXAMPLES::
sage: sum(plot(CIF(RIF(1/k, 1/k), RIF(-k, k))) for k in [1..10])
sage: sum(plot(CIF(RIF(1/k, 1/k), RIF(-k, k))) for k in [1..10]) # needs sage.plot
Graphics object consisting of 20 graphics primitives
Exact and nearly exact points are still visible::
sage: # needs sage.plot
sage: plot(CIF(pi, 1), color='red') + plot(CIF(1, e), color='purple') + plot(CIF(-1, -1))
Graphics object consisting of 6 graphics primitives
A demonstration that `z \mapsto z^2` acts chaotically on `|z|=1`::
sage: # needs sage.plot sage.symbolic
sage: z = CIF(0, 2*pi/1000).exp()
sage: g = Graphics()
sage: for i in range(40):
Expand Down Expand Up @@ -351,11 +353,11 @@ cdef class ComplexIntervalFieldElement(FieldElement):
(2.50000000000000, 3.00000000000000)
(-4.50000000000000, -4.00000000000000)
sage: # needs sage.symbolic
sage: z = CIF(RIF(sqrt(2), sqrt(3)), RIF(e, pi))
sage: a, b, c, d = z.bisection()
sage: a.intersection(b).intersection(c).intersection(d) == CIF(z.center())
True
sage: zz = a.union(b).union(c).union(c)
sage: zz.real().endpoints() == z.real().endpoints()
True
Expand Down Expand Up @@ -399,9 +401,9 @@ cdef class ComplexIntervalFieldElement(FieldElement):
True
sage: CIF(-5, 0).sqrt().is_exact()
False
sage: CIF(0, 2*pi).is_exact()
sage: CIF(0, 2*pi).is_exact() # needs sage.symbolic
False
sage: CIF(e).is_exact()
sage: CIF(e).is_exact() # needs sage.symbolic
False
sage: CIF(1e100).is_exact()
True
Expand Down Expand Up @@ -985,7 +987,7 @@ cdef class ComplexIntervalFieldElement(FieldElement):
Here a conversion to Maxima happens, which results in a ``TypeError``::
sage: a = CIF(2.3)
sage: maxima(a)
sage: maxima(a) # needs sage.symbolic
Traceback (most recent call last):
...
TypeError
Expand All @@ -999,7 +1001,7 @@ cdef class ComplexIntervalFieldElement(FieldElement):
EXAMPLES::
sage: sage_input(CIF(RIF(e, pi), RIF(sqrt(2), sqrt(3))), verify=True)
sage: sage_input(CIF(RIF(e, pi), RIF(sqrt(2), sqrt(3))), verify=True) # needs sage.symbolic
# Verified
CIF(RIF(RR(2.7182818284590451), RR(3.1415926535897936)), RIF(RR(1.4142135623730949), RR(1.7320508075688774)))
sage: sage_input(ComplexIntervalField(64)(2)^I, preparse=False, verify=True)
Expand Down Expand Up @@ -1997,7 +1999,7 @@ cdef class ComplexIntervalFieldElement(FieldElement):
sage: CIF(2, 1).is_NaN()
False
sage: CIF(NaN).is_NaN()
sage: CIF(NaN).is_NaN() # needs sage.symbolic
True
sage: (1 / CIF(0, 0)).is_NaN()
True
Expand All @@ -2019,7 +2021,7 @@ cdef class ComplexIntervalFieldElement(FieldElement):
Check that :trac:`17285` is fixed::
sage: CIF(cos(2/3))
sage: CIF(cos(2/3)) # needs sage.symbolic
0.7858872607769480?
ALGORITHM:
Expand Down Expand Up @@ -2061,7 +2063,7 @@ cdef class ComplexIntervalFieldElement(FieldElement):
Check that :trac:`17825` is fixed::
sage: CIF(sin(2/3))
sage: CIF(sin(2/3)) # needs sage.symbolic
0.618369803069737?
ALGORITHM:
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/complex_interval_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ def _magma_init_(self, magma):
sage: magma(ComplexIntervalField(100)) # optional - magma # indirect doctest
Complex field of precision 30
sage: floor(RR(log(2**100, 10)))
sage: floor(RR(log(2**100, 10))) # needs sage.symbolic
30
"""
return "ComplexField(%s : Bits := true)" % self.prec()
Expand Down Expand Up @@ -445,7 +445,7 @@ def __call__(self, x=None, im=None, **kwds):
TypeError: unable to convert '1+I' to real interval
sage: CIF(2,3)
2 + 3*I
sage: CIF(pi, e)
sage: CIF(pi, e) # needs sage.symbolic
3.141592653589794? + 2.718281828459046?*I
sage: ComplexIntervalField(100)(CIF(RIF(2,3)))
3.?
Expand Down
22 changes: 11 additions & 11 deletions src/sage/rings/complex_mpc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1195,27 +1195,27 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
sage: MPC = MPComplexField()
sage: a = MPC(2,1)
sage: a.__pari__()
sage: a.__pari__() # needs sage.libs.pari
2.00000000000000 + 1.00000000000000*I
sage: pari(a)
sage: pari(a) # needs sage.libs.pari
2.00000000000000 + 1.00000000000000*I
sage: pari(a).type()
sage: pari(a).type() # needs sage.libs.pari
't_COMPLEX'
sage: a = MPC(pi)
sage: pari(a)
sage: a = MPC(pi) # needs sage.libs.pari sage.symbolic
sage: pari(a) # needs sage.libs.pari sage.symbolic
3.14159265358979
sage: pari(a).type()
sage: pari(a).type() # needs sage.libs.pari sage.symbolic
't_REAL'
sage: a = MPC(-2).sqrt()
sage: pari(a)
sage: pari(a) # needs sage.libs.pari
1.41421356237310*I
The precision is preserved, rounded up to the wordsize::
sage: MPC = MPComplexField(250)
sage: MPC(1,2).__pari__().bitprecision()
sage: MPC(1,2).__pari__().bitprecision() # needs sage.libs.pari
256
sage: MPC(pi).__pari__().bitprecision()
sage: MPC(pi).__pari__().bitprecision() # needs sage.libs.pari
256
"""
if mpfr_zero_p(self.value.re):
Expand Down Expand Up @@ -1520,7 +1520,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
2.23606797749979
sage: a.__abs__()
2.23606797749979
sage: float(sqrt(2^2 + 1^1))
sage: float(sqrt(2^2 + 1^1)) # needs sage.symbolic
2.23606797749979
sage: b = MPC(42,0)
Expand Down Expand Up @@ -2192,7 +2192,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
sage: a = MPC(1,0)
sage: a.dilog()
1.64493406684823
sage: float(pi^2/6)
sage: float(pi^2/6) # needs sage.symbolic
1.6449340668482262
::
Expand Down
Loading

0 comments on commit 0402500

Please sign in to comment.