Opened 10 years ago

Last modified 10 years ago

#11725 closed enhancement

Generate random elements of the algebraic field — at Version 1

Reported by: rbeezer Owned by: AlexGhitza
Priority: minor Milestone: sage-4.7.2
Component: algebra Keywords: random, QQbar, sd32
Cc: spice Merged in:
Authors: Rob Beezer Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by rbeezer)

Random elements of QQbar default to the method implemented for the integers. This patch creates algebraic numbers via roots of random polynomials with integer coefficients.

Implementation notes:

  1. Degree 2 is the default so that some complex numbers are generated.
  2. Might create constant polynomials, so a monic term (of random degree) may be added.
  3. Could be some efficiencies to be gained by not creating all the roots and choosing just one, but this should be a good start.
  4. Real goal was random vectors over QQbar. A doctest demonstrates how control of the integer coefficients can be passed from random_vector() to the QQbar.random_element() to ZZ.random_element().

Apply:

  1. trac_11725-random-algebraic-numbers.patch

Change History (3)

Changed 10 years ago by rbeezer

comment:1 Changed 10 years ago by rbeezer

  • Authors set to Rob Beezer
  • Cc spice added
  • Description modified (diff)
  • Status changed from new to needs_review

Changed 10 years ago by spice

Replaces previous patch

Note: See TracTickets for help on using tickets.