Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
34212: tests and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
guojing0 committed Jul 25, 2022
1 parent 460d5f5 commit 41849f8
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/sage/rings/number_field/number_field_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import sage.rings.rational_field
import sage.rings.rational
import sage.rings.integer_ring
import sage.rings.integer
from sage.rings.real_mpfr import RealField

from sage.arith.power cimport generic_power
from sage.rings.real_mpfi cimport RealIntervalFieldElement
Expand Down Expand Up @@ -4123,7 +4124,26 @@ cdef class NumberFieldElement(FieldElement):
The logarithmic embedding is a tuple of real embeddings and conjugate
pairs of compelx embeddings.
It is defined under Definition 4.9.6 in [Cohen1993]_.
INPUT:
- ``x`` -- a rational number.
- ``prec`` -- desired floating point precision.
OUTPUT:
- a tuple of real numbers.
EXAMPLES::
sage: K.<a> = NumberField(x^3 + 5)
sage: f = a^2 - 3
sage: f.log_embedding(10)
(2.30258509299405)
sage: f.log_embedding(0)
(-1)
"""
K = self.base_ring()
K_embeddings = K.places(prec)
Expand Down

0 comments on commit 41849f8

Please sign in to comment.