File: contfrac.gd

package info (click to toggle)
gap 4r4p12-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 29,584 kB
  • ctags: 7,113
  • sloc: ansic: 98,786; sh: 3,299; perl: 2,263; makefile: 498; asm: 63; awk: 6
file content (42 lines) | stat: -rw-r--r-- 1,808 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#############################################################################
##
#W  contfrac.gd                                                   Stefan Kohl
##
#Y  Copyright (C) 2004 The GAP Group
##
#H  @(#)$Id: contfrac.gd,v 4.5.2.1 2005/05/03 13:44:09 stefan Exp $
##
##  This file contains declarations of functions for computing (with)
##  continued fraction expansions of real numbers.
##
Revision.contfrac_gd :=
    "@(#)$Id: contfrac.gd,v 4.5.2.1 2005/05/03 13:44:09 stefan Exp $";

#############################################################################
##
#F  ContinuedFractionExpansionOfRoot( <P>, <n> )
##
##  The first <n> terms of the continued fraction expansion of the only
##  positive real root of the polynomial <P> with integer coefficients.
##  The leading coefficient of <P> must be positive and the value of <P> at 0
##  must be negative. If the degree of <P> is 2 and <n> = 0, the function
##  computes one period of the continued fraction expansion of the root in
##  question. Anything may happen if <P> has three or more positive real
##  roots.
##
DeclareGlobalFunction( "ContinuedFractionExpansionOfRoot" );

#############################################################################
##
#F  ContinuedFractionApproximationOfRoot( <P>, <n> )
##
##  The <n>th continued fraction approximation of the only positive real root
##  of the polynomial <P> with integer coefficients. The leading coefficient
##  of <P> must be positive and the value of <P> at 0 must be negative.
##  Anything may happen if <P> has three or more positive real roots.
##
DeclareGlobalFunction( "ContinuedFractionApproximationOfRoot" );

#############################################################################
##
#E  contfrac.gd . . . . . . . . . . . . . . . . . . . . . . . . . . ends here