Changes between Version 3 and Version 4 of Ticket #14567
 Timestamp:
 05/12/13 18:10:27 (8 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #14567 – Description
v3 v4 2 2 3 3 1. categories are not properly initialized nor used. 4 2. it only deals with rational numbers 5 3. there is no dedicated method for numerical approximations (which is one of the first aim of continued fractions) 6 4. there is no bridge with quadratic numbers (see also #11345) 7 5. there is no bridge with words (sage.combinat.words) 4 2. all arithmetic operations go back and forth with the underlying rational (there are much more direct solutions for taking the negative, inverse and to compare two continued fractions) 5 3. it only deals with rational numbers 6 4. there is no dedicated method for numerical approximations (which is one of the first aim of continued fractions) 7 5. there is no bridge with quadratic numbers (see also #11345) 8 6. there is no bridge with words (sage.combinat.words) 8 9 9 The patch proposed here develop some general design for dealing with continued fractions and solves the issues 1, 2 and 5 (and I hope 3); see the discussion below.10 The patch proposed here develop some general design for dealing with continued fractions and solves the issues 1, 2, 3 and 5 (and I hope 4); see the discussion below. 10 11 12 With the patch applied we can do 11 13 {{{ 14 sage: (117/253).continued_fraction() 15 [0; 2, 6, 6, 3] 12 16 sage: K.<sqrt2> = QuadraticField(2) 13 17 sage: cff = (sqrt2/3 + 1/4).continued_fraction(); cff