Opened 4 years ago

Last modified 4 years ago

#23447 needs_work defect

faster conversions from number field to interval field

Reported by: vdelecroix Owned by:
Priority: major Milestone: sage-8.1
Component: number fields Keywords:
Cc: Merged in:
Authors: Vincent Delecroix Reviewers:
Report Upstream: N/A Work issues:
Branch: u/vdelecroix/23447 (Commits, GitHub, GitLab) Commit: 4a40fbe9206ac7112092bd3af6678afcf3ec8d61
Dependencies: #23402 Stopgaps:

Status badges

Description (last modified by vdelecroix)

The conversion of number field elements to real interval field is slow (that was actually the main reason for the slowness constated in #23388). We implement a function cdef void nf_elem_get_mpfi(mpfi_t x, NumberFieldElement a, mp_prec_t prec) that provides an interval approximation of a number field element. We then refactorize the methods floor() and _richcmp_() and provide a straightforward implementation of _real_mpfi_().

This improves the overall performance of any method of number field element using approximation.

Change History (6)

comment:1 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:2 Changed 4 years ago by vdelecroix

  • Authors set to Vincent Delecroix
  • Branch set to u/vdelecroix/23447
  • Commit set to 4a40fbe9206ac7112092bd3af6678afcf3ec8d61
  • Status changed from new to needs_review

New commits:

0146c8623388: faster floor for nf element
8124ba523402: faster hash for nf elements
4a40fbe23447: faster conversion nf -> rif

comment:3 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:4 Changed 4 years ago by vdelecroix

  • Description modified (diff)

comment:5 follow-up: Changed 4 years ago by vdelecroix

  • Status changed from needs_review to needs_work

doctest failures...

sage -t --long --warn-long 37.3 src/sage/modular/modform_hecketriangle/hecke_triangle_group_element.py  # 3 doctests failed
sage -t --long --warn-long 37.3 src/sage/schemes/projective/projective_morphism.py  # 4 doctests failed
sage -t --long --warn-long 37.3 src/sage/groups/matrix_gps/finitely_generated.py  # 1 doctest failed
sage -t --long --warn-long 37.3 src/sage/schemes/curves/curve.py  # 1 doctest failed

comment:6 in reply to: ↑ 5 Changed 4 years ago by vdelecroix

Replying to vdelecroix:

doctest failures...

Most are because of #23402... so they are fixed there.

Note: See TracTickets for help on using tickets.