Ticket #1055 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

[with patch] Don't factor discriminant for quadratic number fields

Reported by: robertwb Owned by: robertwb
Priority: major Milestone: sage-2.8.12
Component: number theory Keywords:
Cc: Work issues:
Report Upstream: Reviewers:
Authors: Merged in:
Dependencies: Stopgaps:

Description

The current implementation of quadratic number fields calculates the discriminant on initialization, which can be expensive and is unnecessary.

Elements are represented as a+b sqrt(D) / denom. I don't believe that we require D to be the discriminant, but this needs to be verified before a change is made. For efficiency reasons, it might be worth doing trial division to reduce squares of small prime powers from D, as smaller D yields faster arithmetic.

Attachments

1055-quad-nf.diff Download (10.9 KB) - added by robertwb 6 years ago.

Change History

comment:1 Changed 6 years ago by mabshoff

  • Milestone set to sage-2.9

comment:2 Changed 6 years ago by was

  • Milestone changed from sage-2.9.1 to sage-2.8.12

easy to fix?

comment:3 Changed 6 years ago by robertwb

  • Owner changed from was to robertwb

Changed 6 years ago by robertwb

comment:4 Changed 6 years ago by robertwb

  • Status changed from new to assigned
  • Summary changed from Don't factor discriminant for quadratic number fields to [with patch] Don't factor discriminant for quadratic number fields

comment:5 Changed 6 years ago by mabshoff

  • Status changed from assigned to closed
  • Resolution set to fixed

applied to 2.8.12.rc0

Note: See TracTickets for help on using tickets.