home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / Doc / libmpz.tex / node1_ct.html < prev    next >
LaTeX Document  |  1997-01-17  |  3.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 42 75 | 69 6c 74 2d 69 6e 20 4d |ts of Bu|ilt-in M|
|000000b0| 6f 64 75 6c 65 20 6d 70 | 7a 3c 2f 54 49 54 4c 45 |odule mp|z</TITLE|
|000000c0| 3e 0a 0a 3c 4d 45 54 41 | 20 48 54 54 50 2d 45 51 |>..<META| HTTP-EQ|
|000000d0| 55 49 56 3d 22 43 6f 6e | 74 65 6e 74 2d 54 79 70 |UIV="Con|tent-Typ|
|000000e0| 65 22 20 43 4f 4e 54 45 | 4e 54 3d 22 74 65 78 74 |e" CONTE|NT="text|
|000000f0| 2f 68 74 6d 6c 3b 20 63 | 68 61 72 73 65 74 3d 75 |/html; c|harset=u|
|00000100| 74 66 2d 38 22 3e 0a 3c | 4d 45 54 41 20 4e 41 4d |tf-8">.<|META NAM|
|00000110| 45 3d 22 76 69 65 77 70 | 6f 72 74 22 20 43 4f 4e |E="viewp|ort" CON|
|00000120| 54 45 4e 54 3d 22 77 69 | 64 74 68 3d 64 65 76 69 |TENT="wi|dth=devi|
|00000130| 63 65 2d 77 69 64 74 68 | 2c 20 69 6e 69 74 69 61 |ce-width|, initia|
|00000140| 6c 2d 73 63 61 6c 65 3d | 31 2e 30 22 3e 0a 3c 4d |l-scale=|1.0">.<M|
|00000150| 45 54 41 20 4e 41 4d 45 | 3d 22 47 65 6e 65 72 61 |ETA NAME|="Genera|
|00000160| 74 6f 72 22 20 43 4f 4e | 54 45 4e 54 3d 22 4c 61 |tor" CON|TENT="La|
|00000170| 54 65 58 32 48 54 4d 4c | 20 76 32 30 32 32 22 3e |TeX2HTML| v2022">|
|00000180| 0a 0a 3c 4c 49 4e 4b 20 | 52 45 4c 3d 22 53 54 59 |..<LINK |REL="STY|
|00000190| 4c 45 53 48 45 45 54 22 | 20 48 52 45 46 3d 22 6c |LESHEET"| HREF="l|
|000001a0| 69 62 6d 70 7a 2e 63 73 | 73 22 3e 0a 0a 3c 4c 49 |ibmpz.cs|s">..<LI|
|000001b0| 4e 4b 20 52 45 4c 3d 22 | 70 72 65 76 69 6f 75 73 |NK REL="|previous|
|000001c0| 22 20 48 52 45 46 3d 22 | 6c 69 62 6d 70 7a 5f 6d |" HREF="|libmpz_m|
|000001d0| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 4c 49 4e 4b 20 52 |n.html">|.<LINK R|
|000001e0| 45 4c 3d 22 75 70 22 20 | 48 52 45 46 3d 22 6c 69 |EL="up" |HREF="li|
|000001f0| 62 6d 70 7a 5f 6d 6e 2e | 68 74 6d 6c 22 3e 0a 3c |bmpz_mn.|html">.<|
|00000200| 2f 48 45 41 44 3e 0a 20 | 0a 3c 42 4f 44 59 20 62 |/HEAD>. |.<BODY b|
|00000210| 67 63 6f 6c 6f 72 3d 22 | 23 66 66 66 66 66 66 22 |gcolor="|#ffffff"|
|00000220| 20 74 65 78 74 3d 22 23 | 30 30 30 30 30 30 22 20 | text="#|000000" |
|00000230| 6c 69 6e 6b 3d 22 23 39 | 39 34 34 45 45 22 20 76 |link="#9|944EE" v|
|00000240| 6c 69 6e 6b 3d 22 23 30 | 30 30 30 66 66 22 20 61 |link="#0|000ff" a|
|00000250| 6c 69 6e 6b 3d 22 23 30 | 30 66 66 30 30 22 3e 0a |link="#0|0ff00">.|
|00000260| 0a 3c 48 31 3e 3c 41 20 | 49 44 3d 22 53 45 43 54 |.<H1><A |ID="SECT|
|00000270| 49 4f 4e 30 30 30 31 30 | 30 30 30 30 30 30 30 30 |ION00010|00000000|
|00000280| 30 30 30 30 30 30 30 22 | 3e 0a 42 75 69 6c 74 2d |0000000"|>.Built-|
|00000290| 69 6e 20 4d 6f 64 75 6c | 65 20 6d 70 7a 3c 2f 41 |in Modul|e mpz</A|
|000002a0| 3e 0a 3c 2f 48 31 3e 0a | 6d 70 7a 0a 0a 3c 50 3e |>.</H1>.|mpz..<P>|
|000002b0| 0a 54 68 69 73 20 69 73 | 20 61 6e 20 6f 70 74 69 |.This is| an opti|
|000002c0| 6f 6e 61 6c 20 6d 6f 64 | 75 6c 65 2e 20 20 49 74 |onal mod|ule. It|
|000002d0| 20 69 73 20 6f 6e 6c 79 | 20 61 76 61 69 6c 61 62 | is only| availab|
|000002e0| 6c 65 20 77 68 65 6e 20 | 50 79 74 68 6f 6e 20 69 |le when |Python i|
|000002f0| 73 0a 63 6f 6e 66 69 67 | 75 72 65 64 20 74 6f 20 |s.config|ured to |
|00000300| 69 6e 63 6c 75 64 65 20 | 69 74 2c 20 77 68 69 63 |include |it, whic|
|00000310| 68 20 72 65 71 75 69 72 | 65 73 20 74 68 61 74 20 |h requir|es that |
|00000320| 74 68 65 20 47 4e 55 20 | 4d 50 20 73 6f 66 74 77 |the GNU |MP softw|
|00000330| 61 72 65 20 69 73 0a 69 | 6e 73 74 61 6c 6c 65 64 |are is.i|nstalled|
|00000340| 2e 0a 0a 3c 50 3e 0a 54 | 68 69 73 20 6d 6f 64 75 |...<P>.T|his modu|
|00000350| 6c 65 20 69 6d 70 6c 65 | 6d 65 6e 74 73 20 74 68 |le imple|ments th|
|00000360| 65 20 69 6e 74 65 72 66 | 61 63 65 20 74 6f 20 70 |e interf|ace to p|
|00000370| 61 72 74 20 6f 66 20 74 | 68 65 20 47 4e 55 20 4d |art of t|he GNU M|
|00000380| 50 20 6c 69 62 72 61 72 | 79 2c 0a 77 68 69 63 68 |P librar|y,.which|
|00000390| 20 64 65 66 69 6e 65 73 | 20 61 72 62 69 74 72 61 | defines| arbitra|
|000003a0| 72 79 20 70 72 65 63 69 | 73 69 6f 6e 20 69 6e 74 |ry preci|sion int|
|000003b0| 65 67 65 72 20 61 6e 64 | 20 72 61 74 69 6f 6e 61 |eger and| rationa|
|000003c0| 6c 20 6e 75 6d 62 65 72 | 0a 61 72 69 74 68 6d 65 |l number|.arithme|
|000003d0| 74 69 63 20 72 6f 75 74 | 69 6e 65 73 2e 20 20 4f |tic rout|ines. O|
|000003e0| 6e 6c 79 20 74 68 65 20 | 69 6e 74 65 72 66 61 63 |nly the |interfac|
|000003f0| 65 73 20 74 6f 20 74 68 | 65 20 3c 49 3e 69 6e 74 |es to th|e <I>int|
|00000400| 65 67 65 72 3c 2f 49 3e | 0a 28 6d 70 7a 5f 2e 2e |eger</I>|.(mpz_..|
|00000410| 2e 29 20 72 6f 75 74 69 | 6e 65 73 20 61 72 65 20 |.) routi|nes are |
|00000420| 70 72 6f 76 69 64 65 64 | 2e 20 49 66 20 6e 6f 74 |provided|. If not|
|00000430| 20 73 74 61 74 65 64 0a | 6f 74 68 65 72 77 69 73 | stated.|otherwis|
|00000440| 65 2c 20 74 68 65 20 64 | 65 73 63 72 69 70 74 69 |e, the d|escripti|
|00000450| 6f 6e 20 69 6e 20 74 68 | 65 20 47 4e 55 20 4d 50 |on in th|e GNU MP|
|00000460| 20 64 6f 63 75 6d 65 6e | 74 61 74 69 6f 6e 20 63 | documen|tation c|
|00000470| 61 6e 20 62 65 20 61 70 | 70 6c 69 65 64 2e 0a 0a |an be ap|plied...|
|00000480| 3c 50 3e 0a 49 6e 20 67 | 65 6e 65 72 61 6c 2c 20 |<P>.In g|eneral, |
|00000490| 6d 70 7a 2d 6e 75 6d 62 | 65 72 73 20 63 61 6e 20 |mpz-numb|ers can |
|000004a0| 62 65 20 75 73 65 64 20 | 6a 75 73 74 20 6c 69 6b |be used |just lik|
|000004b0| 65 20 6f 74 68 65 72 20 | 73 74 61 6e 64 61 72 64 |e other |standard|
|000004c0| 0a 50 79 74 68 6f 6e 20 | 6e 75 6d 62 65 72 73 2c |.Python |numbers,|
|000004d0| 20 65 2e 67 2e 20 79 6f | 75 20 63 61 6e 20 75 73 | e.g. yo|u can us|
|000004e0| 65 20 74 68 65 20 62 75 | 69 6c 74 2d 69 6e 20 6f |e the bu|ilt-in o|
|000004f0| 70 65 72 61 74 6f 72 73 | 20 6c 69 6b 65 20 2b 2c |perators| like +,|
|00000500| 0a 2a 2c 20 65 74 63 2e | 2c 20 61 73 20 77 65 6c |.*, etc.|, as wel|
|00000510| 6c 20 61 73 20 74 68 65 | 20 73 74 61 6e 64 61 72 |l as the| standar|
|00000520| 64 20 62 75 69 6c 74 2d | 69 6e 20 66 75 6e 63 74 |d built-|in funct|
|00000530| 69 6f 6e 73 20 6c 69 6b | 65 0a 61 62 73 2c 20 69 |ions lik|e.abs, i|
|00000540| 6e 74 2c 20 2e 2e 2e 2c | 20 64 69 76 6d 6f 64 2c |nt, ...,| divmod,|
|00000550| 20 70 6f 77 2e 0a 50 6c | 65 61 73 65 20 6e 6f 74 | pow..Pl|ease not|
|00000560| 65 3a 20 74 68 65 20 3c | 49 3e 62 69 74 77 69 73 |e: the <|I>bitwis|
|00000570| 65 2d 78 6f 72 3c 2f 49 | 3e 20 6f 70 65 72 61 74 |e-xor</I|> operat|
|00000580| 69 6f 6e 20 68 61 73 20 | 62 65 65 6e 20 69 6d 70 |ion has |been imp|
|00000590| 6c 65 6d 65 6e 74 65 64 | 20 61 73 0a 61 20 62 75 |lemented| as.a bu|
|000005a0| 6e 63 68 20 6f 66 20 3c | 49 3e 61 6e 64 3c 2f 49 |nch of <|I>and</I|
|000005b0| 3e 73 2c 20 3c 49 3e 69 | 6e 76 65 72 74 3c 2f 49 |>s, <I>i|nvert</I|
|000005c0| 3e 73 20 61 6e 64 20 3c | 49 3e 6f 72 3c 2f 49 3e |>s and <|I>or</I>|
|000005d0| 73 2c 20 62 65 63 61 75 | 73 65 20 74 68 65 20 6c |s, becau|se the l|
|000005e0| 69 62 72 61 72 79 0a 6c | 61 63 6b 73 20 61 6e 20 |ibrary.l|acks an |
|000005f0| 6d 70 7a 5f 78 6f 72 20 | 66 75 6e 63 74 69 6f 6e |mpz_xor |function|
|00000600| 2c 20 61 6e 64 20 49 20 | 64 69 64 6e 27 74 20 6e |, and I |didn't n|
|00000610| 65 65 64 20 6f 6e 65 2e | 0a 0a 3c 50 3e 0a 59 6f |eed one.|..<P>.Yo|
|00000620| 75 20 63 72 65 61 74 65 | 20 61 6e 20 6d 70 7a 2d |u create| an mpz-|
|00000630| 6e 75 6d 62 65 72 20 62 | 79 20 63 61 6c 6c 69 6e |number b|y callin|
|00000640| 67 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 63 |g the fu|nction c|
|00000650| 61 6c 6c 65 64 20 6d 70 | 7a 20 28 73 65 65 0a 62 |alled mp|z (see.b|
|00000660| 65 6c 6f 77 20 66 6f 72 | 20 61 6e 20 65 78 61 63 |elow for| an exac|
|00000670| 74 20 64 65 73 63 72 69 | 70 74 69 6f 6e 29 2e 20 |t descri|ption). |
|00000680| 41 6e 20 6d 70 7a 2d 6e | 75 6d 62 65 72 20 69 73 |An mpz-n|umber is|
|00000690| 20 70 72 69 6e 74 65 64 | 20 6c 69 6b 65 20 74 68 | printed| like th|
|000006a0| 69 73 3a 0a 6d 70 7a 28 | 76 61 6c 75 65 29 2e 0a |is:.mpz(|value)..|
|000006b0| 0a 3c 50 3e 0a 0a 3c 42 | 52 3e 0a 3c 49 4d 47 0a |.<P>..<B|R>.<IMG.|
|000006c0| 20 20 53 54 59 4c 45 3d | 22 68 65 69 67 68 74 3a | STYLE=|"height:|
|000006d0| 20 31 39 36 2e 32 35 65 | 78 3b 20 76 65 72 74 69 | 196.25e|x; verti|
|000006e0| 63 61 6c 2d 61 6c 69 67 | 6e 3a 20 2d 30 2e 35 37 |cal-alig|n: -0.57|
|000006f0| 65 78 3b 20 22 20 53 52 | 43 3d 22 69 6d 67 31 2e |ex; " SR|C="img1.|
|00000700| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00000710| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 6d 70 7a 7d |n{funcde|sc}{mpz}|
|00000720| 7b 76 61 6c 75 65 7d 0a | 43 72 65 61 74 65 20 61 |{value}.|Create a|
|00000730| 20 6e 65 77 20 6d 70 7a | 2d 6e 75 6d 62 65 72 2e | new mpz|-number.|
|00000740| 20 5c 76 61 72 7b 76 61 | 6c 75 65 7d 20 63 61 6e | \var{va|lue} can|
|00000750| 20 62 65 20 61 6e 20 69 | 6e 74 2e 2e 2e 0a 2e 2e | be an i|nt......|
|00000760| 2e 74 69 76 65 20 6e 75 | 6d 62 65 72 2e 20 53 65 |.tive nu|mber. Se|
|00000770| 65 20 61 6c 73 6f 20 74 | 68 65 20 5c 63 6f 64 65 |e also t|he \code|
|00000780| 7b 62 69 6e 61 72 79 7d | 0a 6d 65 74 68 6f 64 2c |{binary}|.method,|
|00000790| 20 64 65 73 63 72 69 62 | 65 64 20 62 65 6c 6f 77 | describ|ed below|
|000007a0| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|000007b0| 22 3e 0a 3c 42 52 3e 0a | 0a 3c 50 3e 0a 41 20 6e |">.<BR>.|.<P>.A n|
|000007c0| 75 6d 62 65 72 20 6f 66 | 20 3c 45 4d 3e 65 78 74 |umber of| <EM>ext|
|000007d0| 72 61 3c 2f 45 4d 3e 20 | 66 75 6e 63 74 69 6f 6e |ra</EM> |function|
|000007e0| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 69 6e |s are de|fined in|
|000007f0| 20 74 68 69 73 20 6d 6f | 64 75 6c 65 2e 20 4e 6f | this mo|dule. No|
|00000800| 6e 0a 6d 70 7a 2d 61 72 | 67 75 6d 65 6e 74 73 20 |n.mpz-ar|guments |
|00000810| 61 72 65 20 63 6f 6e 76 | 65 72 74 65 64 20 74 6f |are conv|erted to|
|00000820| 20 6d 70 7a 2d 76 61 6c | 75 65 73 20 66 69 72 73 | mpz-val|ues firs|
|00000830| 74 2c 20 61 6e 64 20 74 | 68 65 20 66 75 6e 63 74 |t, and t|he funct|
|00000840| 69 6f 6e 73 0a 72 65 74 | 75 72 6e 20 6d 70 7a 2d |ions.ret|urn mpz-|
|00000850| 6e 75 6d 62 65 72 73 2e | 0a 0a 3c 50 3e 0a 3c 42 |numbers.|..<P>.<B|
|00000860| 52 3e 0a 3c 49 4d 47 0a | 20 20 53 54 59 4c 45 3d |R>.<IMG.| STYLE=|
|00000870| 22 68 65 69 67 68 74 3a | 20 32 2e 31 37 65 78 3b |"height:| 2.17ex;|
|00000880| 20 76 65 72 74 69 63 61 | 6c 2d 61 6c 69 67 6e 3a | vertica|l-align:|
|00000890| 20 31 37 36 2e 35 35 65 | 78 3b 20 22 20 53 52 43 | 176.55e|x; " SRC|
|000008a0| 3d 22 69 6d 67 32 2e 70 | 6e 67 22 0a 20 41 4c 54 |="img2.p|ng". ALT|
|000008b0| 3d 22 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |="\begin|{funcdes|
|000008c0| 63 7d 7b 70 6f 77 6d 7d | 7b 62 61 73 65 5c 2c 20 |c}{powm}|{base\, |
|000008d0| 65 78 70 6f 6e 65 6e 74 | 5c 2c 20 6d 6f 64 75 6c |exponent|\, modul|
|000008e0| 75 73 7d 0a 52 65 74 75 | 72 6e 20 5c 63 6f 64 65 |us}.Retu|rn \code|
|000008f0| 7b 70 6f 77 28 5c 76 61 | 72 7b 62 61 73 65 7d 2c |{pow(\va|r{base},|
|00000900| 20 2e 2e 2e 0a 2e 2e 2e | 20 5c 43 2d 6c 69 62 72 | .......| \C-libr|
|00000910| 61 72 79 20 66 75 6e 63 | 74 69 6f 6e 2c 20 74 68 |ary func|tion, th|
|00000920| 69 73 20 76 65 72 73 69 | 6f 6e 20 63 61 6e 20 68 |is versi|on can h|
|00000930| 61 6e 64 6c 65 20 6e 65 | 67 61 74 69 76 65 20 65 |andle ne|gative e|
|00000940| 78 70 6f 6e 65 6e 74 73 | 2e 0a 5c 65 6e 64 7b 66 |xponents|..\end{f|
|00000950| 75 6e 63 64 65 73 63 7d | 22 3e 0a 3c 42 52 3e 0a |uncdesc}|">.<BR>.|
|00000960| 0a 3c 50 3e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |.<P>.<BR|>.<IMG. |
|00000970| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00000980| 32 2e 33 38 65 78 3b 20 | 76 65 72 74 69 63 61 6c |2.38ex; |vertical|
|00000990| 2d 61 6c 69 67 6e 3a 20 | 31 37 36 2e 34 30 65 78 |-align: |176.40ex|
|000009a0| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 33 2e 70 6e |; " SRC=|"img3.pn|
|000009b0| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|000009c0| 66 75 6e 63 64 65 73 63 | 7d 7b 67 63 64 7d 7b 6f |funcdesc|}{gcd}{o|
|000009d0| 70 31 5c 2c 20 6f 70 32 | 7d 0a 52 65 74 75 72 6e |p1\, op2|}.Return|
|000009e0| 20 74 68 65 20 67 72 65 | 61 74 65 73 74 20 63 6f | the gre|atest co|
|000009f0| 6d 6d 6f 6e 20 64 69 76 | 69 73 6f 72 20 6f 66 20 |mmon div|isor of |
|00000a00| 5c 76 61 72 7b 6f 70 31 | 7d 20 61 6e 64 20 5c 76 |\var{op1|} and \v|
|00000a10| 61 72 7b 6f 70 32 7d 2e | 0a 5c 65 6e 64 7b 66 75 |ar{op2}.|.\end{fu|
|00000a20| 6e 63 64 65 73 63 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |ncdesc}"|>.<BR>..|
|00000a30| 3c 50 3e 0a 3c 42 52 3e | 0a 3c 49 4d 47 0a 20 20 |<P>.<BR>|.<IMG. |
|00000a40| 53 54 59 4c 45 3d 22 68 | 65 69 67 68 74 3a 20 32 |STYLE="h|eight: 2|
|00000a50| 2e 31 37 65 78 3b 20 76 | 65 72 74 69 63 61 6c 2d |.17ex; v|ertical-|
|00000a60| 61 6c 69 67 6e 3a 20 31 | 37 36 2e 35 35 65 78 3b |align: 1|76.55ex;|
|00000a70| 20 22 20 53 52 43 3d 22 | 69 6d 67 34 2e 70 6e 67 | " SRC="|img4.png|
|00000a80| 22 0a 20 41 4c 54 3d 22 | 5c 62 65 67 69 6e 7b 66 |". ALT="|\begin{f|
|00000a90| 75 6e 63 64 65 73 63 7d | 7b 67 63 64 65 78 74 7d |uncdesc}|{gcdext}|
|00000aa0| 7b 61 5c 2c 20 62 7d 0a | 52 65 74 75 72 6e 20 61 |{a\, b}.|Return a|
|00000ab0| 20 74 75 70 6c 65 20 5c | 63 6f 64 65 7b 28 5c 76 | tuple \|code{(\v|
|00000ac0| 61 72 7b 67 7d 2c 20 5c | 76 61 72 7b 73 7d 2c 20 |ar{g}, \|var{s}, |
|00000ad0| 5c 76 61 72 7b 74 7d 2e | 2e 2e 0a 2e 2e 2e 7d 2a |\var{t}.|......}*|
|00000ae0| 5c 76 61 72 7b 73 7d 20 | 2b 20 5c 76 61 72 7b 62 |\var{s} |+ \var{b|
|00000af0| 7d 2a 5c 76 61 72 7b 74 | 7d 20 3d 3d 20 5c 76 61 |}*\var{t|} == \va|
|00000b00| 72 7b 67 7d 20 3d 3d 20 | 67 63 64 28 5c 76 61 72 |r{g} == |gcd(\var|
|00000b10| 7b 61 7d 2c 20 5c 76 61 | 72 7b 62 7d 29 7d 2e 0a |{a}, \va|r{b})}..|
|00000b20| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 22 3e |\end{fun|cdesc}">|
|00000b30| 0a 3c 42 52 3e 0a 0a 3c | 50 3e 0a 3c 42 52 3e 0a |.<BR>..<|P>.<BR>.|
|00000b40| 3c 49 4d 47 0a 20 20 53 | 54 59 4c 45 3d 22 68 65 |<IMG. S|TYLE="he|
|00000b50| 69 67 68 74 3a 20 32 2e | 33 38 65 78 3b 20 76 65 |ight: 2.|38ex; ve|
|00000b60| 72 74 69 63 61 6c 2d 61 | 6c 69 67 6e 3a 20 31 37 |rtical-a|lign: 17|
|00000b70| 36 2e 34 30 65 78 3b 20 | 22 20 53 52 43 3d 22 69 |6.40ex; |" SRC="i|
|00000b80| 6d 67 35 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |mg5.png"|. ALT="\|
|00000b90| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|00000ba0| 73 71 72 74 7d 7b 6f 70 | 7d 0a 52 65 74 75 72 6e |sqrt}{op|}.Return|
|00000bb0| 20 74 68 65 20 73 71 75 | 61 72 65 20 72 6f 6f 74 | the squ|are root|
|00000bc0| 20 6f 66 20 5c 76 61 72 | 7b 6f 70 7d 2e 20 54 68 | of \var|{op}. Th|
|00000bd0| 65 20 72 65 73 75 6c 74 | 20 69 73 20 72 6f 75 6e |e result| is roun|
|00000be0| 64 65 64 20 74 6f 77 61 | 72 64 73 20 7a 65 72 6f |ded towa|rds zero|
|00000bf0| 2e 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |..\end{f|uncdesc}|
|00000c00| 22 3e 0a 3c 42 52 3e 0a | 0a 3c 50 3e 0a 3c 42 52 |">.<BR>.|.<P>.<BR|
|00000c10| 3e 0a 3c 49 4d 47 0a 20 | 20 53 54 59 4c 45 3d 22 |>.<IMG. | STYLE="|
|00000c20| 68 65 69 67 68 74 3a 20 | 32 2e 31 37 65 78 3b 20 |height: |2.17ex; |
|00000c30| 76 65 72 74 69 63 61 6c | 2d 61 6c 69 67 6e 3a 20 |vertical|-align: |
|00000c40| 31 37 36 2e 35 35 65 78 | 3b 20 22 20 53 52 43 3d |176.55ex|; " SRC=|
|00000c50| 22 69 6d 67 36 2e 70 6e | 67 22 0a 20 41 4c 54 3d |"img6.pn|g". ALT=|
|00000c60| 22 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |"\begin{|funcdesc|
|00000c70| 7d 7b 73 71 72 74 72 65 | 6d 7d 7b 6f 70 7d 0a 52 |}{sqrtre|m}{op}.R|
|00000c80| 65 74 75 72 6e 20 61 20 | 74 75 70 6c 65 20 5c 63 |eturn a |tuple \c|
|00000c90| 6f 64 65 7b 28 5c 76 61 | 72 7b 72 6f 6f 74 7d 2c |ode{(\va|r{root},|
|00000ca0| 20 5c 76 61 72 7b 72 65 | 6d 61 69 6e 64 65 72 7d | \var{re|mainder}|
|00000cb0| 2e 2e 2e 0a 2e 2e 2e 74 | 68 61 74 0a 5c 63 6f 64 |.......t|hat.\cod|
|00000cc0| 65 7b 5c 76 61 72 7b 72 | 6f 6f 74 7d 2a 5c 76 61 |e{\var{r|oot}*\va|
|00000cd0| 72 7b 72 6f 6f 74 7d 20 | 2b 20 5c 76 61 72 7b 72 |r{root} |+ \var{r|
|00000ce0| 65 6d 61 69 6e 64 65 72 | 7d 20 3d 3d 20 5c 76 61 |emainder|} == \va|
|00000cf0| 72 7b 6f 70 7d 7d 2e 0a | 5c 65 6e 64 7b 66 75 6e |r{op}}..|\end{fun|
|00000d00| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00000d10| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 20 53 |P>.<BR>.|<IMG. S|
|00000d20| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00000d30| 33 38 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |38ex; ve|rtical-a|
|00000d40| 6c 69 67 6e 3a 20 31 37 | 36 2e 34 30 65 78 3b 20 |lign: 17|6.40ex; |
|00000d50| 22 20 53 52 43 3d 22 69 | 6d 67 37 2e 70 6e 67 22 |" SRC="i|mg7.png"|
|00000d60| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 66 75 |. ALT="\|begin{fu|
|00000d70| 6e 63 64 65 73 63 7d 7b | 64 69 76 6d 7d 7b 6e 75 |ncdesc}{|divm}{nu|
|00000d80| 6d 65 72 61 74 6f 72 5c | 2c 20 64 65 6e 6f 6d 69 |merator\|, denomi|
|00000d90| 6e 61 74 6f 72 5c 2c 20 | 6d 6f 64 75 6c 75 73 7d |nator\, |modulus}|
|00000da0| 0a 52 65 74 75 72 6e 73 | 20 61 20 6e 75 6d 62 65 |.Returns| a numbe|
|00000db0| 72 20 5c 76 61 72 2e 2e | 2e 0a 2e 2e 2e 6f 75 6c |r \var..|.....oul|
|00000dc0| 64 20 61 6c 73 6f 20 69 | 6d 70 6c 65 6d 65 6e 74 |d also i|mplement|
|00000dd0| 20 74 68 69 73 20 66 75 | 6e 63 74 69 6f 6e 20 69 | this fu|nction i|
|00000de0| 6e 20 50 79 74 68 6f 6e | 2c 20 75 73 69 6e 67 20 |n Python|, using |
|00000df0| 5c 63 6f 64 65 7b 67 63 | 64 65 78 74 7d 2e 0a 5c |\code{gc|dext}..\|
|00000e00| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 22 3e 0a |end{func|desc}">.|
|00000e10| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 41 6e 20 6d 70 7a |<BR>..<P|>.An mpz|
|00000e20| 2d 6e 75 6d 62 65 72 20 | 68 61 73 20 6f 6e 65 20 |-number |has one |
|00000e30| 6d 65 74 68 6f 64 3a 0a | 0a 3c 50 3e 0a 0a 3c 42 |method:.|.<P>..<B|
|00000e40| 52 3e 0a 3c 49 4d 47 0a | 20 20 53 54 59 4c 45 3d |R>.<IMG.| STYLE=|
|00000e50| 22 68 65 69 67 68 74 3a | 20 32 2e 32 34 65 78 3b |"height:| 2.24ex;|
|00000e60| 20 76 65 72 74 69 63 61 | 6c 2d 61 6c 69 67 6e 3a | vertica|l-align:|
|00000e70| 20 31 37 36 2e 35 34 65 | 78 3b 20 22 20 53 52 43 | 176.54e|x; " SRC|
|00000e80| 3d 22 69 6d 67 38 2e 70 | 6e 67 22 0a 20 41 4c 54 |="img8.p|ng". ALT|
|00000e90| 3d 22 5c 62 65 67 69 6e | 7b 66 75 6e 63 64 65 73 |="\begin|{funcdes|
|00000ea0| 63 7d 7b 62 69 6e 61 72 | 79 7d 7b 7d 0a 43 6f 6e |c}{binar|y}{}.Con|
|00000eb0| 76 65 72 74 20 74 68 69 | 73 20 6d 70 7a 2d 6e 75 |vert thi|s mpz-nu|
|00000ec0| 6d 62 65 72 20 74 6f 20 | 61 20 62 69 6e 61 72 79 |mber to |a binary|
|00000ed0| 20 73 74 72 69 6e 67 2c | 20 77 68 65 72 65 20 74 | string,| where t|
|00000ee0| 68 2e 2e 2e 0a 2e 2e 2e | 74 6f 20 7a 65 72 6f 2c |h.......|to zero,|
|00000ef0| 0a 6f 74 68 65 72 77 69 | 73 65 20 61 20 5c 63 6f |.otherwi|se a \co|
|00000f00| 64 65 7b 56 61 6c 75 65 | 45 72 72 6f 72 7d 2d 65 |de{Value|Error}-e|
|00000f10| 78 63 65 70 74 69 6f 6e | 20 77 69 6c 6c 20 62 65 |xception| will be|
|00000f20| 20 72 61 69 73 65 64 2e | 0a 5c 65 6e 64 7b 66 75 | raised.|.\end{fu|
|00000f30| 6e 63 64 65 73 63 7d 22 | 3e 0a 3c 42 52 3e 0a 3c |ncdesc}"|>.<BR>.<|
|00000f40| 48 52 3e 0a 0a 3c 2f 42 | 4f 44 59 3e 0a 3c 2f 48 |HR>..</B|ODY>.</H|
|00000f50| 54 4d 4c 3e 0a | |TML>. | |
+--------+-------------------------+-------------------------+--------+--------+