home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13452 < prev    next >
LaTeX Document  |  1992-09-09  |  40.5 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 Newsgroup Content (archive/news) magic Supported
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news text default
99% file LaTeX document text default
98% file LaTeX document, ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 58 72 65 66 3a 20 73 70 | 61 72 6b 79 20 63 6f 6d |Xref: sp|arky com|
|00000010| 70 2e 6c 61 6e 67 2e 63 | 2b 2b 3a 31 33 34 35 32 |p.lang.c|++:13452|
|00000020| 20 63 6f 6d 70 2e 73 74 | 64 2e 63 2b 2b 3a 31 31 | comp.st|d.c++:11|
|00000030| 34 31 0a 50 61 74 68 3a | 20 73 70 61 72 6b 79 21 |41.Path:| sparky!|
|00000040| 75 75 6e 65 74 21 73 74 | 61 6e 66 6f 72 64 2e 65 |uunet!st|anford.e|
|00000050| 64 75 21 61 67 61 74 65 | 21 70 68 79 73 69 63 73 |du!agate|!physics|
|00000060| 2e 42 65 72 6b 65 6c 65 | 79 2e 45 44 55 21 6d 61 |.Berkele|y.EDU!ma|
|00000070| 74 74 0a 46 72 6f 6d 3a | 20 6d 61 74 74 40 70 68 |tt.From:| matt@ph|
|00000080| 79 73 69 63 73 2e 42 65 | 72 6b 65 6c 65 79 2e 45 |ysics.Be|rkeley.E|
|00000090| 44 55 20 28 4d 61 74 74 | 20 41 75 73 74 65 72 6e |DU (Matt| Austern|
|000000a0| 29 0a 4e 65 77 73 67 72 | 6f 75 70 73 3a 20 63 6f |).Newsgr|oups: co|
|000000b0| 6d 70 2e 6c 61 6e 67 2e | 63 2b 2b 2c 63 6f 6d 70 |mp.lang.|c++,comp|
|000000c0| 2e 73 74 64 2e 63 2b 2b | 0a 53 75 62 6a 65 63 74 |.std.c++|.Subject|
|000000d0| 3a 20 41 20 70 72 6f 70 | 6f 73 61 6c 20 74 6f 20 |: A prop|osal to |
|000000e0| 61 64 64 20 61 6e 20 65 | 78 70 6f 6e 65 6e 74 69 |add an e|xponenti|
|000000f0| 61 74 69 6f 6e 20 6f 70 | 65 72 61 74 6f 72 20 74 |ation op|erator t|
|00000100| 6f 20 74 68 65 20 43 2b | 2b 20 6c 61 6e 67 75 61 |o the C+|+ langua|
|00000110| 67 65 0a 46 6f 6c 6c 6f | 77 75 70 2d 54 6f 3a 20 |ge.Follo|wup-To: |
|00000120| 63 6f 6d 70 2e 73 74 64 | 2e 63 2b 2b 0a 44 61 74 |comp.std|.c++.Dat|
|00000130| 65 3a 20 31 30 20 53 65 | 70 20 31 39 39 32 20 30 |e: 10 Se|p 1992 0|
|00000140| 30 3a 34 30 3a 35 36 20 | 47 4d 54 0a 4f 72 67 61 |0:40:56 |GMT.Orga|
|00000150| 6e 69 7a 61 74 69 6f 6e | 3a 20 55 6e 69 76 65 72 |nization|: Univer|
|00000160| 73 69 74 79 20 6f 66 20 | 43 61 6c 69 66 6f 72 6e |sity of |Californ|
|00000170| 69 61 2c 20 42 65 72 6b | 65 6c 65 79 0a 4c 69 6e |ia, Berk|eley.Lin|
|00000180| 65 73 3a 20 38 33 35 0a | 4d 65 73 73 61 67 65 2d |es: 835.|Message-|
|00000190| 49 44 3a 20 3c 31 38 6d | 35 69 6f 49 4e 4e 34 74 |ID: <18m|5ioINN4t|
|000001a0| 69 40 61 67 61 74 65 2e | 62 65 72 6b 65 6c 65 79 |i@agate.|berkeley|
|000001b0| 2e 65 64 75 3e 0a 4e 4e | 54 50 2d 50 6f 73 74 69 |.edu>.NN|TP-Posti|
|000001c0| 6e 67 2d 48 6f 73 74 3a | 20 70 68 79 73 69 63 73 |ng-Host:| physics|
|000001d0| 2e 62 65 72 6b 65 6c 65 | 79 2e 65 64 75 0a 53 75 |.berkele|y.edu.Su|
|000001e0| 6d 6d 61 72 79 3a 20 44 | 65 74 61 69 6c 65 64 20 |mmary: D|etailed |
|000001f0| 70 72 6f 70 6f 73 61 6c | 20 66 6f 72 20 61 6e 20 |proposal| for an |
|00000200| 65 78 74 65 6e 73 69 6f | 6e 20 74 6f 20 74 68 65 |extensio|n to the|
|00000210| 20 6c 61 6e 67 75 61 67 | 65 0a 0a 4a 75 73 74 20 | languag|e..Just |
|00000220| 61 73 20 74 68 65 20 73 | 75 62 6a 65 63 74 20 6c |as the s|ubject l|
|00000230| 69 6e 65 20 73 74 61 74 | 65 73 2c 20 74 68 69 73 |ine stat|es, this|
|00000240| 20 69 73 20 6d 79 20 70 | 72 6f 70 6f 73 61 6c 20 | is my p|roposal |
|00000250| 74 6f 20 61 64 64 20 61 | 6e 0a 65 78 70 6f 6e 65 |to add a|n.expone|
|00000260| 6e 74 69 61 74 69 6f 6e | 20 6f 70 65 72 61 74 6f |ntiation| operato|
|00000270| 72 20 74 6f 20 74 68 65 | 20 43 2b 2b 20 6c 61 6e |r to the| C++ lan|
|00000280| 67 75 61 67 65 2e 20 20 | 46 6f 72 20 74 68 65 20 |guage. |For the |
|00000290| 6d 6f 73 74 20 70 61 72 | 74 2c 20 49 27 6d 0a 6a |most par|t, I'm.j|
|000002a0| 75 73 74 20 72 65 70 65 | 61 74 69 6e 67 20 74 68 |ust repe|ating th|
|000002b0| 65 20 74 68 69 6e 67 73 | 20 74 68 61 74 20 49 2c |e things| that I,|
|000002c0| 20 61 6e 64 20 6f 74 68 | 65 72 20 70 65 6f 70 6c | and oth|er peopl|
|000002d0| 65 2c 20 73 61 69 64 20 | 69 6e 20 74 68 65 0a 64 |e, said |in the.d|
|000002e0| 69 73 63 75 73 73 69 6f | 6e 20 74 68 61 74 20 74 |iscussio|n that t|
|000002f0| 6f 6f 6b 20 70 6c 61 63 | 65 20 61 20 77 68 69 6c |ook plac|e a whil|
|00000300| 65 20 61 67 6f 20 6f 6e | 20 63 6f 6d 70 2e 6c 61 |e ago on| comp.la|
|00000310| 6e 67 2e 63 2b 2b 20 61 | 6e 64 0a 63 6f 6d 70 2e |ng.c++ a|nd.comp.|
|00000320| 73 74 64 2e 63 2b 2b 2e | 20 20 4e 6f 77 20 69 74 |std.c++.| Now it|
|00000330| 27 73 20 61 6c 6c 20 69 | 6e 20 6f 6e 65 20 70 6c |'s all i|n one pl|
|00000340| 61 63 65 2c 20 74 68 6f | 75 67 68 3b 20 49 20 74 |ace, tho|ugh; I t|
|00000350| 68 69 6e 6b 20 74 68 61 | 74 20 49 0a 68 61 76 65 |hink tha|t I.have|
|00000360| 20 61 64 64 72 65 73 73 | 65 64 20 61 6c 6c 20 6f | address|ed all o|
|00000370| 66 20 74 68 65 20 69 6d | 70 6f 72 74 61 6e 74 20 |f the im|portant |
|00000380| 63 6f 6e 63 65 72 6e 73 | 2e 0a 0a 54 68 69 73 20 |concerns|...This |
|00000390| 69 73 20 61 20 66 61 69 | 72 6c 79 20 6c 6f 6e 67 |is a fai|rly long|
|000003a0| 20 4c 61 54 65 58 20 66 | 69 6c 65 3b 20 69 74 20 | LaTeX f|ile; it |
|000003b0| 77 69 6c 6c 20 62 65 20 | 6d 75 63 68 20 6d 6f 72 |will be |much mor|
|000003c0| 65 20 6c 65 67 69 62 6c | 65 20 69 66 20 79 6f 75 |e legibl|e if you|
|000003d0| 0a 72 75 6e 20 69 74 20 | 74 68 72 6f 75 67 68 20 |.run it |through |
|000003e0| 4c 61 54 65 58 20 61 6e | 64 20 70 72 69 6e 74 20 |LaTeX an|d print |
|000003f0| 69 74 20 6f 75 74 2e 20 | 20 49 74 20 79 6f 75 20 |it out. | It you |
|00000400| 77 61 6e 74 20 74 6f 20 | 72 65 61 64 20 69 74 20 |want to |read it |
|00000410| 62 75 74 0a 64 6f 6e 27 | 74 20 68 61 76 65 20 54 |but.don'|t have T|
|00000420| 65 58 2c 20 73 65 6e 64 | 20 6d 65 20 6d 61 69 6c |eX, send| me mail|
|00000430| 2c 20 61 6e 64 20 6d 61 | 79 62 65 20 77 65 27 6c |, and ma|ybe we'l|
|00000440| 6c 20 62 65 20 61 62 6c | 65 20 74 6f 20 66 69 67 |l be abl|e to fig|
|00000450| 75 72 65 0a 73 6f 6d 65 | 74 68 69 6e 67 20 6f 75 |ure.some|thing ou|
|00000460| 74 2e 0a 0a 25 25 25 25 | 25 25 25 25 25 25 25 25 |t...%%%%|%%%%%%%%|
|00000470| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000480| 25 25 25 25 25 25 25 25 | 25 25 25 25 25 25 25 25 |%%%%%%%%|%%%%%%%%|
|00000490| 25 25 25 25 25 25 0a 5c | 64 6f 63 75 6d 65 6e 74 |%%%%%%.\|document|
|000004a0| 73 74 79 6c 65 5b 31 32 | 70 74 5d 7b 61 72 74 69 |style[12|pt]{arti|
|000004b0| 63 6c 65 7d 0a 20 20 20 | 20 5c 63 61 74 63 6f 64 |cle}. | \catcod|
|000004c0| 65 60 5c 5e 3d 31 31 20 | 0a 20 20 20 20 5c 64 65 |e`\^=11 |. \de|
|000004d0| 66 5c 7e 7b 5c 63 68 61 | 72 31 32 36 7d 0a 20 20 |f\~{\cha|r126}. |
|000004e0| 20 20 5c 64 65 66 5c 40 | 7b 5c 63 68 61 72 36 34 | \def\@|{\char64|
|000004f0| 7d 0a 20 20 20 20 5c 64 | 65 66 5c 6f 70 7b 7b 5c |}. \d|ef\op{{\|
|00000500| 74 74 20 2a 5e 7d 7d 0a | 20 20 20 20 5c 64 65 66 |tt *^}}.| \def|
|00000510| 5c 43 7b 7b 5c 74 74 20 | 43 2b 2b 7d 7d 09 0a 20 |\C{{\tt |C++}}.. |
|00000520| 20 20 20 5c 64 65 66 5c | 6f 6c 64 43 7b 7b 5c 74 | \def\|oldC{{\t|
|00000530| 74 20 43 7d 7d 20 20 20 | 20 0a 5c 62 65 67 69 6e |t C}} | .\begin|
|00000540| 7b 64 6f 63 75 6d 65 6e | 74 7d 0a 5c 74 69 74 6c |{documen|t}.\titl|
|00000550| 65 7b 41 20 70 72 6f 70 | 6f 73 61 6c 20 74 6f 20 |e{A prop|osal to |
|00000560| 61 64 64 20 61 6e 20 65 | 78 70 6f 6e 65 6e 74 69 |add an e|xponenti|
|00000570| 61 74 69 6f 6e 20 6f 70 | 65 72 61 74 6f 72 20 74 |ation op|erator t|
|00000580| 6f 20 74 68 65 20 43 7b | 5c 74 74 2b 2b 7d 20 6c |o the C{|\tt++} l|
|00000590| 61 6e 67 75 61 67 65 7d | 0a 5c 61 75 74 68 6f 72 |anguage}|.\author|
|000005a0| 7b 4d 61 74 74 68 65 77 | 20 48 2e 20 41 75 73 74 |{Matthew| H. Aust|
|000005b0| 65 72 6e 5c 5c 0a 09 7b | 5c 6e 6f 72 6d 61 6c 73 |ern\\..{|\normals|
|000005c0| 69 7a 65 5c 69 74 20 4c | 61 77 72 65 6e 63 65 20 |ize\it L|awrence |
|000005d0| 42 65 72 6b 65 6c 65 79 | 20 4c 61 62 6f 72 61 74 |Berkeley| Laborat|
|000005e0| 6f 72 79 3b 20 42 65 72 | 6b 65 6c 65 79 2c 20 43 |ory; Ber|keley, C|
|000005f0| 41 20 39 34 37 32 30 7d | 5c 5c 0a 09 7b 5c 6e 6f |A 94720}|\\..{\no|
|00000600| 72 6d 61 6c 73 69 7a 65 | 5c 74 74 20 28 6d 61 74 |rmalsize|\tt (mat|
|00000610| 74 40 70 68 79 73 69 63 | 73 2e 62 65 72 6b 65 6c |t@physic|s.berkel|
|00000620| 65 79 2e 65 64 75 29 7d | 7d 0a 5c 64 61 74 65 7b |ey.edu)}|}.\date{|
|00000630| 53 65 70 74 65 6d 62 65 | 72 20 38 2c 20 31 39 39 |Septembe|r 8, 199|
|00000640| 32 7d 0a 5c 6d 61 6b 65 | 74 69 74 6c 65 0a 5c 62 |2}.\make|title.\b|
|00000650| 65 67 69 6e 7b 61 62 73 | 74 72 61 63 74 7d 0a 54 |egin{abs|tract}.T|
|00000660| 68 69 73 20 70 61 70 65 | 72 20 69 73 20 61 20 64 |his pape|r is a d|
|00000670| 65 73 63 72 69 70 74 69 | 6f 6e 20 6f 66 20 61 20 |escripti|on of a |
|00000680| 70 72 6f 70 6f 73 61 6c | 20 74 6f 20 65 78 74 65 |proposal| to exte|
|00000690| 6e 64 20 5c 43 5c 20 62 | 79 20 61 64 64 69 6e 67 |nd \C\ b|y adding|
|000006a0| 20 61 6e 0a 65 78 70 6f | 6e 65 6e 74 69 61 74 69 | an.expo|nentiati|
|000006b0| 6f 6e 20 6f 70 65 72 61 | 74 6f 72 2e 20 20 54 68 |on opera|tor. Th|
|000006c0| 65 20 70 72 6f 70 6f 73 | 61 6c 20 69 74 73 65 6c |e propos|al itsel|
|000006d0| 66 20 69 73 20 67 69 76 | 65 6e 20 69 6e 0a 53 65 |f is giv|en in.Se|
|000006e0| 63 74 69 6f 6e 7e 5c 72 | 65 66 7b 70 72 6f 70 6f |ction~\r|ef{propo|
|000006f0| 73 61 6c 7d 3b 20 74 68 | 65 20 72 65 6d 61 69 6e |sal}; th|e remain|
|00000700| 64 65 72 20 6f 66 20 74 | 68 69 73 20 70 61 70 65 |der of t|his pape|
|00000710| 72 20 69 73 20 61 6e 20 | 61 72 67 75 6d 65 6e 74 |r is an |argument|
|00000720| 20 66 6f 72 0a 74 68 65 | 20 64 65 73 69 72 61 62 | for.the| desirab|
|00000730| 69 6c 69 74 79 20 6f 66 | 20 74 68 69 73 20 65 78 |ility of| this ex|
|00000740| 74 65 6e 73 69 6f 6e 2c | 20 61 6e 64 20 61 6e 20 |tension,| and an |
|00000750| 61 6e 61 6c 79 73 69 73 | 20 6f 66 20 69 74 2e 0a |analysis| of it..|
|00000760| 5c 65 6e 64 7b 61 62 73 | 74 72 61 63 74 7d 0a 0a |\end{abs|tract}..|
|00000770| 0a 0a 5c 73 65 63 74 69 | 6f 6e 7b 49 6e 74 72 6f |..\secti|on{Intro|
|00000780| 64 75 63 74 69 6f 6e 7d | 0a 4f 6e 20 73 65 76 65 |duction}|.On seve|
|00000790| 72 61 6c 20 6f 63 63 61 | 73 69 6f 6e 73 2c 20 49 |ral occa|sions, I|
|000007a0| 20 68 61 76 65 20 68 61 | 70 70 65 6e 65 64 20 74 | have ha|ppened t|
|000007b0| 6f 20 72 65 6d 61 72 6b | 20 74 6f 20 61 20 66 72 |o remark| to a fr|
|000007c0| 69 65 6e 64 20 77 68 6f | 20 64 6f 65 73 0a 6e 6f |iend who| does.no|
|000007d0| 74 20 6b 6e 6f 77 20 65 | 69 74 68 65 72 20 5c 6f |t know e|ither \o|
|000007e0| 6c 64 43 5c 20 6f 72 20 | 5c 43 5c 20 74 68 61 74 |ldC\ or |\C\ that|
|000007f0| 20 49 20 61 6d 20 77 6f | 72 6b 69 6e 67 20 6f 6e | I am wo|rking on|
|00000800| 20 61 20 70 72 6f 70 6f | 73 61 6c 20 74 6f 20 61 | a propo|sal to a|
|00000810| 64 64 0a 61 6e 20 65 78 | 70 6f 6e 65 6e 74 69 61 |dd.an ex|ponentia|
|00000820| 74 69 6f 6e 20 6f 70 65 | 72 61 74 6f 72 20 74 6f |tion ope|rator to|
|00000830| 20 5c 43 2e 20 20 4f 6e | 20 61 6c 6c 20 73 75 63 | \C. On| all suc|
|00000840| 68 20 6f 63 63 61 73 69 | 6f 6e 73 2c 20 74 68 65 |h occasi|ons, the|
|00000850| 20 72 65 73 70 6f 6e 73 | 65 0a 68 61 73 20 62 65 | respons|e.has be|
|00000860| 65 6e 20 69 6e 63 72 65 | 64 75 6c 69 74 79 3a 20 |en incre|dulity: |
|00000870| 74 68 65 79 20 61 72 65 | 20 75 6e 77 69 6c 6c 69 |they are| unwilli|
|00000880| 6e 67 20 74 6f 20 62 65 | 6c 69 65 76 65 20 74 68 |ng to be|lieve th|
|00000890| 61 74 20 74 68 65 20 6c | 61 6e 67 75 61 67 65 0a |at the l|anguage.|
|000008a0| 64 6f 65 73 20 6e 6f 74 | 20 61 6c 72 65 61 64 79 |does not| already|
|000008b0| 20 68 61 76 65 20 73 75 | 63 68 20 61 6e 20 6f 70 | have su|ch an op|
|000008c0| 65 72 61 74 6f 72 2e 20 | 20 57 65 2c 20 77 68 6f |erator. | We, who|
|000008d0| 20 68 61 76 65 20 75 73 | 65 64 20 5c 6f 6c 64 43 | have us|ed \oldC|
|000008e0| 5c 20 61 6e 64 0a 5c 43 | 5c 20 66 6f 72 20 6d 61 |\ and.\C|\ for ma|
|000008f0| 6e 79 20 79 65 61 72 73 | 2c 20 68 61 76 65 20 68 |ny years|, have h|
|00000900| 61 64 20 74 69 6d 65 20 | 74 6f 20 67 65 74 20 75 |ad time |to get u|
|00000910| 73 65 64 20 74 6f 20 74 | 68 65 20 65 78 70 6f 6e |sed to t|he expon|
|00000920| 65 6e 74 69 61 74 69 6f | 6e 0a 6f 70 65 72 61 74 |entiatio|n.operat|
|00000930| 6f 72 27 73 20 61 62 73 | 65 6e 63 65 2c 20 62 75 |or's abs|ence, bu|
|00000940| 74 20 6e 6f 76 69 63 65 | 20 75 73 65 72 73 20 73 |t novice| users s|
|00000950| 74 69 6c 6c 20 66 69 6e | 64 20 69 74 73 20 61 62 |till fin|d its ab|
|00000960| 73 65 6e 63 65 0a 73 75 | 72 70 72 69 73 69 6e 67 |sence.su|rprising|
|00000970| 2e 0a 0a 49 20 73 75 67 | 67 65 73 74 20 74 68 61 |...I sug|gest tha|
|00000980| 74 20 74 68 65 69 72 20 | 6e 61 7b 5c 22 5c 69 7d |t their |na{\"\i}|
|00000990| 76 65 20 65 78 70 65 63 | 74 61 74 69 6f 6e 20 69 |ve expec|tation i|
|000009a0| 73 20 63 6f 72 72 65 63 | 74 3a 20 5c 43 5c 20 73 |s correc|t: \C\ s|
|000009b0| 68 6f 75 6c 64 0a 68 61 | 76 65 20 73 75 63 68 20 |hould.ha|ve such |
|000009c0| 61 6e 20 6f 70 65 72 61 | 74 6f 72 2c 20 70 61 72 |an opera|tor, par|
|000009d0| 74 69 63 75 6c 61 72 6c | 79 20 61 73 20 69 74 20 |ticularl|y as it |
|000009e0| 69 73 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 61 |is possi|ble to a|
|000009f0| 64 64 20 6f 6e 65 20 74 | 6f 0a 74 68 65 20 6c 61 |dd one t|o.the la|
|00000a00| 6e 67 75 61 67 65 20 77 | 69 74 68 20 6d 69 6e 69 |nguage w|ith mini|
|00000a10| 6d 61 6c 20 65 66 66 6f | 72 74 20 61 6e 64 20 77 |mal effo|rt and w|
|00000a20| 69 74 68 20 6e 6f 20 65 | 66 66 65 63 74 20 6f 6e |ith no e|ffect on|
|00000a30| 20 65 78 69 73 74 69 6e | 67 20 63 6f 64 65 2e 0a | existin|g code..|
|00000a40| 54 68 69 73 20 70 61 70 | 65 72 20 69 73 20 61 20 |This pap|er is a |
|00000a50| 70 72 6f 70 6f 73 61 6c | 20 74 6f 20 65 78 74 65 |proposal| to exte|
|00000a60| 6e 64 20 74 68 65 20 5c | 43 5c 20 6c 61 6e 67 75 |nd the \|C\ langu|
|00000a70| 61 67 65 20 62 79 20 61 | 64 64 69 6e 67 20 74 68 |age by a|dding th|
|00000a80| 69 73 0a 6f 70 65 72 61 | 74 6f 72 2e 0a 0a 49 6e |is.opera|tor...In|
|00000a90| 20 53 65 63 74 69 6f 6e | 7e 5c 72 65 66 7b 6a 75 | Section|~\ref{ju|
|00000aa0| 73 74 69 66 69 63 61 74 | 69 6f 6e 7d 2c 20 49 20 |stificat|ion}, I |
|00000ab0| 65 78 70 6c 61 69 6e 20 | 74 68 65 20 72 65 61 73 |explain |the reas|
|00000ac0| 6f 6e 73 20 77 68 79 20 | 61 6e 0a 65 78 70 6f 6e |ons why |an.expon|
|00000ad0| 65 6e 74 69 61 74 69 6f | 6e 20 6f 70 65 72 61 74 |entiatio|n operat|
|00000ae0| 6f 72 20 69 73 20 64 65 | 73 69 72 61 62 6c 65 3b |or is de|sirable;|
|00000af0| 20 74 68 69 73 20 73 65 | 63 74 69 6f 6e 20 69 6e | this se|ction in|
|00000b00| 63 6c 75 64 65 73 20 61 | 0a 64 69 73 63 75 73 73 |cludes a|.discuss|
|00000b10| 69 6f 6e 20 6f 66 20 70 | 6f 73 73 69 62 6c 65 20 |ion of p|ossible |
|00000b20| 61 6c 74 65 72 6e 61 74 | 69 76 65 73 20 74 6f 20 |alternat|ives to |
|00000b30| 74 68 69 73 20 6f 70 65 | 72 61 74 6f 72 2c 20 61 |this ope|rator, a|
|00000b40| 6e 64 20 74 68 65 20 72 | 65 61 73 6f 6e 73 0a 77 |nd the r|easons.w|
|00000b50| 68 79 20 74 68 65 79 20 | 61 72 65 20 69 6e 61 64 |hy they |are inad|
|00000b60| 65 71 75 61 74 65 2e 20 | 20 49 6e 20 53 65 63 74 |equate. | In Sect|
|00000b70| 69 6f 6e 7e 5c 72 65 66 | 7b 70 72 6f 70 6f 73 61 |ion~\ref|{proposa|
|00000b80| 6c 2d 73 65 63 74 69 6f | 6e 7d 2c 20 49 0a 64 65 |l-sectio|n}, I.de|
|00000b90| 73 63 72 69 62 65 20 74 | 68 65 20 70 72 6f 70 6f |scribe t|he propo|
|00000ba0| 73 61 6c 20 69 6e 20 64 | 65 74 61 69 6c 2c 20 61 |sal in d|etail, a|
|00000bb0| 6e 64 2c 20 69 6e 20 53 | 65 63 74 69 6f 6e 7e 5c |nd, in S|ection~\|
|00000bc0| 72 65 66 7b 72 61 74 69 | 6f 6e 61 6c 65 7d 2c 20 |ref{rati|onale}, |
|00000bd0| 49 0a 64 65 73 63 72 69 | 62 65 20 74 68 65 20 72 |I.descri|be the r|
|00000be0| 61 74 69 6f 6e 61 6c 65 | 20 62 65 68 69 6e 64 20 |ationale| behind |
|00000bf0| 74 68 65 20 64 65 73 69 | 67 6e 20 63 68 6f 69 63 |the desi|gn choic|
|00000c00| 65 73 20 70 72 65 73 65 | 6e 74 65 64 20 74 68 65 |es prese|nted the|
|00000c10| 72 65 2e 0a 46 69 6e 61 | 6c 6c 79 2c 20 69 6e 20 |re..Fina|lly, in |
|00000c20| 53 65 63 74 69 6f 6e 7e | 5c 72 65 66 7b 71 75 65 |Section~|\ref{que|
|00000c30| 73 74 69 6f 6e 73 7d 2c | 20 49 20 61 64 64 72 65 |stions},| I addre|
|00000c40| 73 73 20 76 61 72 69 6f | 75 73 20 71 75 65 73 74 |ss vario|us quest|
|00000c50| 69 6f 6e 73 20 61 62 6f | 75 74 0a 74 68 69 73 20 |ions abo|ut.this |
|00000c60| 65 78 74 65 6e 73 69 6f | 6e 2c 20 61 6e 64 2c 20 |extensio|n, and, |
|00000c70| 69 6e 20 53 65 63 74 69 | 6f 6e 7e 5c 72 65 66 7b |in Secti|on~\ref{|
|00000c80| 6f 62 6a 65 63 74 69 6f | 6e 73 7d 2c 20 49 20 61 |objectio|ns}, I a|
|00000c90| 64 64 72 65 73 73 20 70 | 6f 73 73 69 62 6c 65 0a |ddress p|ossible.|
|00000ca0| 6f 62 6a 65 63 74 69 6f | 6e 73 20 74 6f 20 69 74 |objectio|ns to it|
|00000cb0| 2e 20 20 49 20 63 6f 6e | 63 6c 75 64 65 20 69 6e |. I con|clude in|
|00000cc0| 20 53 65 63 74 69 6f 6e | 7e 5c 72 65 66 7b 63 6f | Section|~\ref{co|
|00000cd0| 6e 63 6c 75 73 69 6f 6e | 7d 2e 0a 0a 4e 6f 74 65 |nclusion|}...Note|
|00000ce0| 20 74 68 61 74 20 6d 75 | 63 68 20 6f 66 20 74 68 | that mu|ch of th|
|00000cf0| 65 20 6d 61 74 65 72 69 | 61 6c 20 69 6e 20 74 68 |e materi|al in th|
|00000d00| 69 73 20 64 6f 63 75 6d | 65 6e 74 20 69 73 20 6e |is docum|ent is n|
|00000d10| 6f 74 20 6f 72 69 67 69 | 6e 61 6c 20 77 69 74 68 |ot origi|nal with|
|00000d20| 0a 6d 65 3b 20 74 6f 20 | 61 20 6c 61 72 67 65 20 |.me; to |a large |
|00000d30| 65 78 74 65 6e 74 2c 20 | 49 20 61 6d 20 73 69 6d |extent, |I am sim|
|00000d40| 70 6c 79 20 74 72 61 6e | 73 63 72 69 62 69 6e 67 |ply tran|scribing|
|00000d50| 20 74 68 65 20 63 6f 6e | 73 65 6e 73 75 73 20 61 | the con|sensus a|
|00000d60| 62 6f 75 74 0a 74 68 69 | 73 20 69 73 73 75 65 20 |bout.thi|s issue |
|00000d70| 77 68 69 63 68 20 68 61 | 73 20 66 6f 72 6d 65 64 |which ha|s formed|
|00000d80| 20 6f 6e 20 74 68 65 20 | 55 73 65 6e 65 74 20 6e | on the |Usenet n|
|00000d90| 65 77 73 67 72 6f 75 70 | 20 7b 5c 74 74 0a 63 6f |ewsgroup| {\tt.co|
|00000da0| 6d 70 2e 6c 61 6e 67 2e | 63 2b 2b 7d 2e 20 20 49 |mp.lang.|c++}. I|
|00000db0| 6e 20 70 61 72 74 69 63 | 75 6c 61 72 2c 20 49 20 |n partic|ular, I |
|00000dc0| 61 63 6b 6e 6f 77 6c 65 | 64 67 65 20 74 68 65 20 |acknowle|dge the |
|00000dd0| 77 6f 72 6b 20 6f 66 20 | 4a 6f 65 20 42 75 63 6b |work of |Joe Buck|
|00000de0| 2e 0a 54 68 69 73 20 70 | 72 6f 70 6f 73 61 6c 20 |..This p|roposal |
|00000df0| 64 69 66 66 65 72 73 20 | 66 72 6f 6d 20 68 69 73 |differs |from his|
|00000e00| 20 6f 6e 6c 79 20 69 6e | 20 73 6d 61 6c 6c 20 64 | only in| small d|
|00000e10| 65 74 61 69 6c 73 2c 20 | 61 6e 64 20 69 6e 20 74 |etails, |and in t|
|00000e20| 68 65 0a 65 78 74 65 6e | 74 20 6f 66 20 74 68 65 |he.exten|t of the|
|00000e30| 20 64 69 73 63 75 73 73 | 69 6f 6e 2e 20 20 49 20 | discuss|ion. I |
|00000e40| 61 6c 73 6f 20 77 69 73 | 68 20 74 6f 20 74 68 61 |also wis|h to tha|
|00000e50| 6e 6b 20 4a 6f 68 6e 20 | 53 6b 61 6c 6c 65 72 20 |nk John |Skaller |
|00000e60| 66 6f 72 20 68 65 6c 70 | 0a 77 69 74 68 20 77 72 |for help|.with wr|
|00000e70| 69 74 69 6e 67 20 74 68 | 69 73 20 64 6f 63 75 6d |iting th|is docum|
|00000e80| 65 6e 74 2e 0a 0a 5c 73 | 65 63 74 69 6f 6e 7b 57 |ent...\s|ection{W|
|00000e90| 68 79 20 69 73 20 74 68 | 69 73 20 70 72 6f 70 6f |hy is th|is propo|
|00000ea0| 73 61 6c 20 69 6d 70 6f | 72 74 61 6e 74 3f 7d 5c |sal impo|rtant?}\|
|00000eb0| 6c 61 62 65 6c 7b 6a 75 | 73 74 69 66 69 63 61 74 |label{ju|stificat|
|00000ec0| 69 6f 6e 7d 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |ion}.\su|bsection|
|00000ed0| 7b 54 68 65 20 69 6d 70 | 6f 72 74 61 6e 63 65 20 |{The imp|ortance |
|00000ee0| 6f 66 20 65 78 70 6f 6e | 65 6e 74 69 61 74 69 6f |of expon|entiatio|
|00000ef0| 6e 7d 5c 6c 61 62 65 6c | 7b 69 6d 70 6f 72 74 61 |n}\label|{importa|
|00000f00| 6e 63 65 7d 0a 0a 45 78 | 61 6d 69 6e 69 6e 67 20 |nce}..Ex|amining |
|00000f10| 61 20 6d 6f 64 65 72 61 | 74 65 2d 73 69 7a 65 64 |a modera|te-sized|
|00000f20| 20 28 33 30 2c 30 30 30 | 20 6c 69 6e 65 29 20 7b | (30,000| line) {|
|00000f30| 5c 73 63 20 66 6f 72 74 | 72 61 6e 7d 0a 70 72 6f |\sc fort|ran}.pro|
|00000f40| 67 72 61 6d 5c 66 6f 6f | 74 6e 6f 74 65 7b 7b 5c |gram\foo|tnote{{\|
|00000f50| 73 63 20 70 61 70 61 67 | 65 6e 6f 7d 2c 20 77 72 |sc papag|eno}, wr|
|00000f60| 69 74 74 65 6e 20 62 79 | 20 49 2e 7e 48 69 6e 63 |itten by| I.~Hinc|
|00000f70| 68 6c 69 66 66 65 2e 7d | 2c 20 49 20 66 6f 75 6e |hliffe.}|, I foun|
|00000f80| 64 0a 74 68 61 74 20 74 | 68 65 20 65 78 70 6f 6e |d.that t|he expon|
|00000f90| 65 6e 74 69 61 74 69 6f | 6e 20 6f 70 65 72 61 74 |entiatio|n operat|
|00000fa0| 6f 72 20 77 61 73 20 75 | 73 65 64 20 71 75 69 74 |or was u|sed quit|
|00000fb0| 65 20 63 6f 6d 6d 6f 6e | 6c 79 3a 20 61 62 6f 75 |e common|ly: abou|
|00000fc0| 74 20 68 61 6c 66 0a 61 | 73 20 6f 66 74 65 6e 20 |t half.a|s often |
|00000fd0| 61 73 20 74 68 65 20 64 | 69 76 69 73 69 6f 6e 20 |as the d|ivision |
|00000fe0| 6f 70 65 72 61 74 6f 72 | 2e 20 20 4f 72 2c 20 74 |operator|. Or, t|
|00000ff0| 6f 20 70 75 74 20 69 74 | 20 64 69 66 66 65 72 65 |o put it| differe|
|00001000| 6e 74 6c 79 3a 20 74 68 | 65 72 65 0a 77 61 73 20 |ntly: th|ere.was |
|00001010| 61 6e 20 61 76 65 72 61 | 67 65 20 6f 66 20 61 62 |an avera|ge of ab|
|00001020| 6f 75 74 20 6f 6e 65 20 | 75 73 65 20 65 76 65 72 |out one |use ever|
|00001030| 79 20 73 69 78 20 6c 69 | 6e 65 73 2e 20 20 49 6e |y six li|nes. In|
|00001040| 20 6d 79 20 66 69 65 6c | 64 2c 20 61 74 0a 6c 65 | my fiel|d, at.le|
|00001050| 61 73 74 20 28 68 69 67 | 68 2d 65 6e 65 72 67 79 |ast (hig|h-energy|
|00001060| 20 70 68 79 73 69 63 73 | 29 2c 20 74 68 69 73 20 | physics|), this |
|00001070| 70 72 6f 67 72 61 6d 20 | 69 73 20 72 61 74 68 65 |program |is rathe|
|00001080| 72 20 74 79 70 69 63 61 | 6c 3a 0a 65 78 70 6f 6e |r typica|l:.expon|
|00001090| 65 6e 74 69 61 74 69 6f | 6e 20 69 73 20 61 20 63 |entiatio|n is a c|
|000010a0| 6f 6d 6d 6f 6e 20 6f 70 | 65 72 61 74 69 6f 6e 20 |ommon op|eration |
|000010b0| 69 6e 20 6d 61 74 68 65 | 6d 61 74 69 63 61 6c 20 |in mathe|matical |
|000010c0| 65 78 70 72 65 73 73 69 | 6f 6e 73 2e 20 20 49 74 |expressi|ons. It|
|000010d0| 0a 69 73 20 63 65 72 74 | 61 69 6e 6c 79 20 6d 75 |.is cert|ainly mu|
|000010e0| 63 68 20 6d 6f 72 65 20 | 63 6f 6d 6d 6f 6e 2c 20 |ch more |common, |
|000010f0| 69 6e 20 74 68 65 20 6b | 69 6e 64 73 20 6f 66 20 |in the k|inds of |
|00001100| 70 72 6f 67 72 61 6d 73 | 20 74 68 61 74 20 49 20 |programs| that I |
|00001110| 77 72 69 74 65 0a 61 6e | 64 20 77 6f 72 6b 20 77 |write.an|d work w|
|00001120| 69 74 68 2c 20 74 68 61 | 6e 20 61 72 65 20 61 6e |ith, tha|n are an|
|00001130| 79 20 6f 66 20 74 68 65 | 20 62 69 74 77 69 73 65 |y of the| bitwise|
|00001140| 20 6f 70 65 72 61 74 6f | 72 73 21 0a 0a 54 68 65 | operato|rs!..The|
|00001150| 20 70 72 69 6d 61 72 79 | 20 6a 75 73 74 69 66 69 | primary| justifi|
|00001160| 63 61 74 69 6f 6e 20 66 | 6f 72 20 61 6e 20 65 78 |cation f|or an ex|
|00001170| 70 6f 6e 65 6e 74 69 61 | 74 69 6f 6e 20 6f 70 65 |ponentia|tion ope|
|00001180| 72 61 74 6f 72 2c 20 74 | 68 65 6e 2c 20 69 73 0a |rator, t|hen, is.|
|00001190| 73 69 6d 70 6c 65 3a 20 | 69 74 20 69 73 20 6f 6e |simple: |it is on|
|000011a0| 65 20 6f 66 20 74 68 65 | 20 62 61 73 69 63 20 62 |e of the| basic b|
|000011b0| 69 6e 61 72 79 20 6f 70 | 65 72 61 74 6f 72 73 20 |inary op|erators |
|000011c0| 6f 66 20 6d 61 74 68 65 | 6d 61 74 69 63 73 2e 20 |of mathe|matics. |
|000011d0| 20 4a 75 73 74 0a 61 73 | 20 69 74 20 77 6f 75 6c | Just.as| it woul|
|000011e0| 64 20 62 65 20 65 78 63 | 65 73 73 69 76 65 6c 79 |d be exc|essively|
|000011f0| 20 63 6c 75 6d 73 79 20 | 74 6f 20 75 73 65 20 74 | clumsy |to use t|
|00001200| 68 65 20 73 79 6e 74 61 | 78 20 7b 5c 74 74 20 61 |he synta|x {\tt a|
|00001210| 64 64 28 78 2c 79 29 7d | 20 66 6f 72 0a 61 64 64 |dd(x,y)}| for.add|
|00001220| 69 74 69 6f 6e 2c 20 6f | 72 20 7b 5c 74 74 20 64 |ition, o|r {\tt d|
|00001230| 69 76 28 78 2c 79 29 7d | 20 66 6f 72 20 64 69 76 |iv(x,y)}| for div|
|00001240| 69 73 69 6f 6e 2c 20 73 | 6f 20 69 74 20 69 73 20 |ision, s|o it is |
|00001250| 65 78 63 65 73 73 69 76 | 65 6c 79 20 63 6c 75 6d |excessiv|ely clum|
|00001260| 73 79 0a 74 6f 20 75 73 | 65 20 74 68 65 20 73 79 |sy.to us|e the sy|
|00001270| 6e 74 61 78 20 7b 5c 74 | 74 20 70 6f 77 28 78 2c |ntax {\t|t pow(x,|
|00001280| 79 29 7d 20 66 6f 72 20 | 65 78 70 6f 6e 65 6e 74 |y)} for |exponent|
|00001290| 69 61 74 69 6f 6e 2e 20 | 20 41 20 66 75 6e 63 74 |iation. | A funct|
|000012a0| 69 6f 6e 20 63 61 6c 6c | 0a 6c 6f 6f 6b 73 20 76 |ion call|.looks v|
|000012b0| 65 72 79 20 64 69 66 66 | 65 72 65 6e 74 20 66 72 |ery diff|erent fr|
|000012c0| 6f 6d 20 74 68 65 20 77 | 61 79 20 74 68 61 74 20 |om the w|ay that |
|000012d0| 65 78 70 6f 6e 65 6e 74 | 69 61 74 69 6f 6e 20 69 |exponent|iation i|
|000012e0| 73 20 64 65 6e 6f 74 65 | 64 20 69 6e 0a 6f 72 64 |s denote|d in.ord|
|000012f0| 69 6e 61 72 79 20 6d 61 | 74 68 65 6d 61 74 69 63 |inary ma|thematic|
|00001300| 61 6c 20 65 78 70 72 65 | 73 73 69 6f 6e 73 20 77 |al expre|ssions w|
|00001310| 72 69 74 74 65 6e 20 64 | 6f 77 6e 20 6f 6e 20 70 |ritten d|own on p|
|00001320| 61 70 65 72 2c 20 61 6e | 64 20 69 6e 0a 63 6f 6d |aper, an|d in.com|
|00001330| 70 6c 69 63 61 74 65 64 | 20 6d 61 74 68 65 6d 61 |plicated| mathema|
|00001340| 74 69 63 61 6c 20 65 78 | 70 72 65 73 73 69 6f 6e |tical ex|pression|
|00001350| 73 20 74 68 69 73 20 73 | 79 6e 74 61 63 74 69 63 |s this s|yntactic|
|00001360| 20 63 6c 75 6d 73 69 6e | 65 73 73 20 63 61 6e 0a | clumsin|ess can.|
|00001370| 68 61 76 65 20 61 20 76 | 65 72 79 20 73 65 72 69 |have a v|ery seri|
|00001380| 6f 75 73 20 64 65 6c 65 | 74 65 72 69 6f 75 73 20 |ous dele|terious |
|00001390| 65 66 66 65 63 74 20 6f | 6e 20 63 6c 61 72 69 74 |effect o|n clarit|
|000013a0| 79 2e 0a 0a 28 49 74 20 | 69 73 20 75 6e 6e 65 63 |y...(It |is unnec|
|000013b0| 65 73 73 61 72 79 20 74 | 6f 20 65 78 70 6c 61 69 |essary t|o explai|
|000013c0| 6e 20 74 68 65 20 69 6d | 70 6f 72 74 61 6e 63 65 |n the im|portance|
|000013d0| 20 6f 66 20 63 6c 61 72 | 69 74 79 3b 20 74 68 65 | of clar|ity; the|
|000013e0| 72 65 20 69 73 2c 0a 68 | 6f 77 65 76 65 72 2c 20 |re is,.h|owever, |
|000013f0| 61 20 73 70 65 63 69 66 | 69 63 20 72 65 61 73 6f |a specif|ic reaso|
|00001400| 6e 2c 20 69 6e 20 61 64 | 64 69 74 69 6f 6e 20 74 |n, in ad|dition t|
|00001410| 6f 20 74 68 65 20 75 73 | 75 61 6c 20 6f 6e 65 73 |o the us|ual ones|
|00001420| 2c 20 77 68 79 20 69 74 | 20 69 73 0a 69 6d 70 6f |, why it| is.impo|
|00001430| 72 74 61 6e 74 20 66 6f | 72 20 6d 61 74 68 65 6d |rtant fo|r mathem|
|00001440| 61 74 69 63 61 6c 20 65 | 78 70 72 65 73 73 69 6f |atical e|xpressio|
|00001450| 6e 73 20 69 6e 20 70 61 | 72 74 69 63 75 6c 61 72 |ns in pa|rticular|
|00001460| 2e 20 20 49 74 20 69 73 | 20 6f 66 74 65 6e 0a 6e |. It is| often.n|
|00001470| 65 63 65 73 73 61 72 79 | 20 74 6f 20 76 65 72 69 |ecessary| to veri|
|00001480| 66 79 20 74 68 61 74 20 | 61 20 66 6f 72 6d 75 6c |fy that |a formul|
|00001490| 61 20 69 6e 20 74 68 65 | 20 63 6f 64 65 20 69 73 |a in the| code is|
|000014a0| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 61 0a 66 | the sam|e as a.f|
|000014b0| 6f 72 6d 75 6c 61 20 6f | 6e 20 70 61 70 65 72 2c |ormula o|n paper,|
|000014c0| 20 6f 72 20 69 6e 20 61 | 6e 6f 74 68 65 72 20 70 | or in a|nother p|
|000014d0| 72 6f 67 72 61 6d 2e 20 | 20 54 68 65 20 63 6c 65 |rogram. | The cle|
|000014e0| 61 72 65 72 20 74 68 65 | 20 6e 6f 74 61 74 69 6f |arer the| notatio|
|000014f0| 6e 2c 0a 74 68 65 20 6d | 6f 72 65 20 6c 69 6b 65 |n,.the m|ore like|
|00001500| 6c 79 20 69 74 20 69 73 | 20 74 68 61 74 20 74 68 |ly it is| that th|
|00001510| 69 73 20 63 61 6e 20 62 | 65 20 64 6f 6e 65 20 77 |is can b|e done w|
|00001520| 69 74 68 6f 75 74 20 65 | 72 72 6f 72 2e 29 0a 0a |ithout e|rror.)..|
|00001530| 49 74 20 73 68 6f 75 6c | 64 20 62 65 20 6e 6f 74 |It shoul|d be not|
|00001540| 65 64 20 74 68 61 74 20 | 74 68 65 20 6d 6f 73 74 |ed that |the most|
|00001550| 20 63 6f 6d 6d 6f 6e 20 | 75 73 65 20 6f 66 20 65 | common |use of e|
|00001560| 78 70 6f 6e 65 6e 74 69 | 61 74 69 6f 6e 2c 20 62 |xponenti|ation, b|
|00001570| 79 20 66 61 72 2c 0a 69 | 73 20 72 61 69 73 69 6e |y far,.i|s raisin|
|00001580| 67 20 61 20 66 6c 6f 61 | 74 69 6e 67 2d 70 6f 69 |g a floa|ting-poi|
|00001590| 6e 74 20 6e 75 6d 62 65 | 72 20 74 6f 20 61 20 73 |nt numbe|r to a s|
|000015a0| 6d 61 6c 6c 20 69 6e 74 | 65 67 72 61 6c 20 70 6f |mall int|egral po|
|000015b0| 77 65 72 20 77 68 69 63 | 68 20 69 73 0a 6b 6e 6f |wer whic|h is.kno|
|000015c0| 77 6e 20 61 74 20 63 6f | 6d 70 69 6c 65 20 74 69 |wn at co|mpile ti|
|000015d0| 6d 65 3b 20 74 68 61 74 | 20 69 73 2c 20 69 6e 20 |me; that| is, in |
|000015e0| 7b 5c 73 63 20 66 6f 72 | 74 72 61 6e 7d 20 70 72 |{\sc for|tran} pr|
|000015f0| 6f 67 72 61 6d 73 2c 20 | 61 6e 0a 65 78 70 72 65 |ograms, |an.expre|
|00001600| 73 73 69 6f 6e 20 6c 69 | 6b 65 20 7b 5c 74 74 20 |ssion li|ke {\tt |
|00001610| 78 20 2a 2a 20 34 7d 20 | 69 73 20 6d 75 63 68 20 |x ** 4} |is much |
|00001620| 6d 6f 72 65 20 63 6f 6d | 6d 6f 6e 20 74 68 61 6e |more com|mon than|
|00001630| 20 6f 6e 65 20 6c 69 6b | 65 20 7b 5c 74 74 20 78 | one lik|e {\tt x|
|00001640| 0a 2a 2a 20 30 2e 30 30 | 37 32 39 37 7d 2c 20 6f |.** 0.00|7297}, o|
|00001650| 72 20 6f 6e 65 20 6c 69 | 6b 65 20 7b 5c 74 74 20 |r one li|ke {\tt |
|00001660| 78 20 2a 2a 20 79 7d 2e | 20 20 54 68 65 20 70 72 |x ** y}.| The pr|
|00001670| 6f 62 6c 65 6d 2c 20 74 | 68 65 6e 2c 20 69 73 0a |oblem, t|hen, is.|
|00001680| 70 61 72 74 69 63 75 6c | 61 72 6c 79 20 61 63 75 |particul|arly acu|
|00001690| 74 65 3a 20 6e 6f 74 20 | 6f 6e 6c 79 20 64 6f 65 |te: not |only doe|
|000016a0| 73 20 5c 43 5c 20 6e 6f | 74 20 70 72 6f 76 69 64 |s \C\ no|t provid|
|000016b0| 65 20 61 6e 20 6f 70 65 | 72 61 74 6f 72 20 66 6f |e an ope|rator fo|
|000016c0| 72 0a 65 78 70 6f 6e 65 | 6e 74 69 61 74 69 6f 6e |r.expone|ntiation|
|000016d0| 2c 20 62 75 74 20 69 74 | 20 70 72 6f 76 69 64 65 |, but it| provide|
|000016e0| 73 20 6e 6f 20 6d 65 61 | 6e 73 20 77 68 61 74 73 |s no mea|ns whats|
|000016f0| 6f 65 76 65 72 20 66 6f | 72 20 72 61 69 73 69 6e |oever fo|r raisin|
|00001700| 67 20 61 0a 6e 75 6d 62 | 65 72 20 74 6f 20 61 6e |g a.numb|er to an|
|00001710| 20 69 6e 74 65 67 72 61 | 6c 20 70 6f 77 65 72 2e | integra|l power.|
|00001720| 20 20 54 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 63 | The fu|nction c|
|00001730| 61 6c 6c 20 7b 5c 74 74 | 20 70 6f 77 28 78 2c 33 |all {\tt| pow(x,3|
|00001740| 29 7d 2c 20 66 6f 72 0a | 65 78 61 6d 70 6c 65 2c |)}, for.|example,|
|00001750| 20 69 73 20 65 71 75 69 | 76 61 6c 65 6e 74 20 74 | is equi|valent t|
|00001760| 6f 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 20 63 |o the fu|nction c|
|00001770| 61 6c 6c 20 7b 5c 74 74 | 20 70 6f 77 28 78 2c 33 |all {\tt| pow(x,3|
|00001780| 2e 30 29 7d 2e 20 20 4f | 6e 20 6d 6f 73 74 0a 73 |.0)}. O|n most.s|
|00001790| 79 73 74 65 6d 73 2c 20 | 74 68 69 73 20 69 73 20 |ystems, |this is |
|000017a0| 61 20 73 65 72 69 6f 75 | 73 20 6c 6f 73 73 20 6f |a seriou|s loss o|
|000017b0| 66 20 65 66 66 69 63 69 | 65 6e 63 79 2c 20 61 6e |f effici|ency, an|
|000017c0| 64 20 70 6f 73 73 69 62 | 6c 79 20 70 72 65 63 69 |d possib|ly preci|
|000017d0| 73 69 6f 6e 0a 61 73 20 | 77 65 6c 6c 2c 20 73 69 |sion.as |well, si|
|000017e0| 6e 63 65 20 63 75 62 69 | 6e 67 20 61 20 6e 75 6d |nce cubi|ng a num|
|000017f0| 62 65 72 20 69 73 20 6d | 75 63 68 20 73 69 6d 70 |ber is m|uch simp|
|00001800| 6c 65 72 20 74 68 61 6e | 20 72 61 69 73 69 6e 67 |ler than| raising|
|00001810| 20 74 68 61 74 0a 6e 75 | 6d 62 65 72 20 74 6f 20 | that.nu|mber to |
|00001820| 73 6f 6d 65 20 61 72 62 | 69 74 72 61 72 79 20 6e |some arb|itrary n|
|00001830| 6f 6e 2d 69 6e 74 65 67 | 72 61 6c 20 70 6f 77 65 |on-integ|ral powe|
|00001840| 72 2c 20 61 20 74 61 73 | 6b 20 77 68 69 63 68 20 |r, a tas|k which |
|00001850| 72 65 71 75 69 72 65 73 | 0a 63 6f 6d 70 75 74 69 |requires|.computi|
|00001860| 6e 67 20 74 72 61 6e 73 | 63 65 6e 64 65 6e 74 61 |ng trans|cendenta|
|00001870| 6c 20 66 75 6e 63 74 69 | 6f 6e 73 2e 0a 0a 49 20 |l functi|ons...I |
|00001880| 62 65 6c 69 65 76 65 20 | 74 68 61 74 20 61 6e 20 |believe |that an |
|00001890| 65 78 70 6f 6e 65 6e 74 | 69 61 74 69 6f 6e 20 6f |exponent|iation o|
|000018a0| 70 65 72 61 74 6f 72 20 | 69 73 20 69 6d 70 6f 72 |perator |is impor|
|000018b0| 74 61 6e 74 20 70 72 69 | 6d 61 72 69 6c 79 20 66 |tant pri|marily f|
|000018c0| 6f 72 0a 73 63 69 65 6e | 74 69 66 69 63 20 70 72 |or.scien|tific pr|
|000018d0| 6f 67 72 61 6d 6d 65 72 | 73 2c 20 61 6e 64 20 66 |ogrammer|s, and f|
|000018e0| 6f 72 20 6f 74 68 65 72 | 73 20 77 68 6f 20 77 72 |or other|s who wr|
|000018f0| 69 74 65 20 6e 75 6d 65 | 72 69 63 61 6c 20 63 6f |ite nume|rical co|
|00001900| 64 65 2e 0a 41 6c 6d 6f | 73 74 20 61 6c 6c 20 73 |de..Almo|st all s|
|00001910| 63 69 65 6e 74 69 66 69 | 63 20 70 72 6f 67 72 61 |cientifi|c progra|
|00001920| 6d 6d 65 72 73 20 66 69 | 6e 64 20 5c 43 27 73 20 |mmers fi|nd \C's |
|00001930| 6c 61 63 6b 20 6f 66 20 | 61 6e 20 65 78 70 6f 6e |lack of |an expon|
|00001940| 65 6e 74 69 61 74 69 6f | 6e 0a 6f 70 65 72 61 74 |entiatio|n.operat|
|00001950| 6f 72 20 74 6f 20 62 65 | 20 61 74 20 6c 65 61 73 |or to be| at leas|
|00001960| 74 20 61 6e 20 69 6e 63 | 6f 6e 76 65 6e 69 65 6e |t an inc|onvenien|
|00001970| 63 65 2c 20 61 6e 64 20 | 73 6f 6d 65 20 66 69 6e |ce, and |some fin|
|00001980| 64 20 69 74 20 61 6c 6d | 6f 73 74 0a 69 6e 74 6f |d it alm|ost.into|
|00001990| 6c 65 72 61 62 6c 65 2e | 20 20 28 43 6f 6e 73 69 |lerable.| (Consi|
|000019a0| 64 65 72 2c 20 66 6f 72 | 20 65 78 61 6d 70 6c 65 |der, for| example|
|000019b0| 2c 20 74 68 65 20 76 65 | 72 79 20 73 74 72 6f 6e |, the ve|ry stron|
|000019c0| 67 20 6c 61 6e 67 75 61 | 67 65 20 75 73 65 64 20 |g langua|ge used |
|000019d0| 69 6e 0a 43 68 61 70 74 | 65 72 7e 31 20 6f 66 20 |in.Chapt|er~1 of |
|000019e0| 7b 5c 73 6c 20 4e 75 6d | 65 72 69 63 61 6c 20 52 |{\sl Num|erical R|
|000019f0| 65 63 69 70 65 73 20 69 | 6e 20 43 5c 2f 7d 2e 5c |ecipes i|n C\/}.\|
|00001a00| 66 6f 6f 74 6e 6f 74 65 | 7b 20 57 2e 7e 48 2e 7e |footnote|{ W.~H.~|
|00001a10| 50 72 65 73 73 2c 0a 42 | 2e 7e 50 2e 7e 46 6c 61 |Press,.B|.~P.~Fla|
|00001a20| 6e 6e 65 72 79 2c 20 53 | 2e 7e 41 2e 7e 54 65 75 |nnery, S|.~A.~Teu|
|00001a30| 6b 6f 6c 73 6b 79 2c 20 | 61 6e 64 20 57 2e 7e 54 |kolsky, |and W.~T|
|00001a40| 2e 7e 56 65 74 74 65 72 | 6c 69 6e 67 2c 20 7b 5c |.~Vetter|ling, {\|
|00001a50| 73 6c 20 4e 75 6d 65 72 | 69 63 61 6c 0a 52 65 63 |sl Numer|ical.Rec|
|00001a60| 69 70 65 73 20 69 6e 20 | 43 5c 2f 7d 20 28 43 61 |ipes in |C\/} (Ca|
|00001a70| 6d 62 72 69 64 67 65 3a | 20 43 61 6d 62 72 69 64 |mbridge:| Cambrid|
|00001a80| 67 65 20 55 6e 69 76 65 | 72 73 69 74 79 20 50 72 |ge Unive|rsity Pr|
|00001a90| 65 73 73 29 2c 20 31 39 | 38 38 2e 7d 29 20 53 6f |ess), 19|88.}) So|
|00001aa0| 6d 65 0a 73 63 69 65 6e | 74 69 66 69 63 20 70 72 |me.scien|tific pr|
|00001ab0| 6f 67 72 61 6d 6d 65 72 | 73 20 68 61 76 65 20 63 |ogrammer|s have c|
|00001ac0| 68 6f 73 65 6e 20 6e 6f | 74 20 74 6f 20 75 73 65 |hosen no|t to use|
|00001ad0| 20 5c 6f 6c 64 43 5c 20 | 6f 72 20 5c 43 5c 20 70 | \oldC\ |or \C\ p|
|00001ae0| 61 72 74 6c 79 20 66 6f | 72 0a 74 68 69 73 20 72 |artly fo|r.this r|
|00001af0| 65 61 73 6f 6e 2e 0a 0a | 50 65 6f 70 6c 65 20 77 |eason...|People w|
|00001b00| 68 6f 20 64 6f 20 6e 6f | 74 20 77 72 69 74 65 20 |ho do no|t write |
|00001b10| 6e 75 6d 65 72 69 63 61 | 6c 20 70 72 6f 67 72 61 |numerica|l progra|
|00001b20| 6d 73 20 77 69 6c 6c 20 | 70 72 6f 62 61 62 6c 79 |ms will |probably|
|00001b30| 20 66 69 6e 64 20 61 20 | 5c 43 5c 0a 65 78 70 6f | find a |\C\.expo|
|00001b40| 6e 65 6e 74 69 61 74 69 | 6f 6e 20 6f 70 65 72 61 |nentiati|on opera|
|00001b50| 74 6f 72 20 6e 65 69 74 | 68 65 72 20 62 65 6e 65 |tor neit|her bene|
|00001b60| 66 69 63 69 61 6c 20 6e | 6f 72 20 64 65 74 72 69 |ficial n|or detri|
|00001b70| 6d 65 6e 74 61 6c 2e 0a | 0a 5c 73 75 62 73 65 63 |mental..|.\subsec|
|00001b80| 74 69 6f 6e 7b 50 6f 73 | 73 69 62 6c 65 20 61 6c |tion{Pos|sible al|
|00001b90| 74 65 72 6e 61 74 69 76 | 65 73 7d 0a 0a 5c 73 75 |ternativ|es}..\su|
|00001ba0| 62 73 75 62 73 65 63 74 | 69 6f 6e 7b 50 72 6f 67 |bsubsect|ion{Prog|
|00001bb0| 72 61 6d 6d 69 6e 67 20 | 74 65 63 68 6e 69 71 75 |ramming |techniqu|
|00001bc0| 65 73 7d 0a 49 6e 20 74 | 68 65 20 5c 43 5c 20 6c |es}.In t|he \C\ l|
|00001bd0| 61 6e 67 75 61 67 65 20 | 61 73 20 69 74 20 63 75 |anguage |as it cu|
|00001be0| 72 72 65 6e 74 6c 79 20 | 73 74 61 6e 64 73 2c 20 |rrently |stands, |
|00001bf0| 74 68 65 72 65 20 61 72 | 65 20 6e 6f 20 73 61 74 |there ar|e no sat|
|00001c00| 69 73 66 61 63 74 6f 72 | 79 0a 6d 65 74 68 6f 64 |isfactor|y.method|
|00001c10| 73 20 66 6f 72 20 70 65 | 72 66 6f 72 6d 69 6e 67 |s for pe|rforming|
|00001c20| 20 65 78 70 6f 6e 65 6e | 74 69 61 74 69 6f 6e 2e | exponen|tiation.|
|00001c30| 20 20 41 73 20 64 65 73 | 63 72 69 62 65 64 20 61 | As des|cribed a|
|00001c40| 62 6f 76 65 2c 20 74 68 | 65 72 65 20 61 72 65 0a |bove, th|ere are.|
|00001c50| 74 77 6f 20 64 69 73 74 | 69 6e 63 74 20 70 72 6f |two dist|inct pro|
|00001c60| 62 6c 65 6d 73 3a 20 0a | 5c 62 65 67 69 6e 7b 65 |blems: .|\begin{e|
|00001c70| 6e 75 6d 65 72 61 74 65 | 7d 0a 5c 69 74 65 6d 20 |numerate|}.\item |
|00001c80| 55 73 69 6e 67 20 66 75 | 6e 63 74 69 6f 6e 20 63 |Using fu|nction c|
|00001c90| 61 6c 6c 73 20 69 73 20 | 73 79 6e 74 61 63 74 69 |alls is |syntacti|
|00001ca0| 63 61 6c 6c 79 20 63 6c | 75 6d 73 79 2e 0a 5c 69 |cally cl|umsy..\i|
|00001cb0| 74 65 6d 20 54 68 65 20 | 6c 61 6e 67 75 61 67 65 |tem The |language|
|00001cc0| 20 70 72 6f 76 69 64 65 | 73 20 6e 6f 20 77 61 79 | provide|s no way|
|00001cd0| 20 74 6f 20 72 61 69 73 | 65 20 61 20 6e 75 6d 62 | to rais|e a numb|
|00001ce0| 65 72 20 74 6f 20 61 6e | 20 69 6e 74 65 67 72 61 |er to an| integra|
|00001cf0| 6c 0a 20 20 20 20 20 20 | 70 6f 77 65 72 2e 20 0a |l. |power. .|
|00001d00| 5c 65 6e 64 7b 65 6e 75 | 6d 65 72 61 74 65 7d 0a |\end{enu|merate}.|
|00001d10| 0a 54 68 65 72 65 20 69 | 73 20 6e 6f 20 77 61 79 |.There i|s no way|
|00001d20| 20 74 6f 20 72 65 73 6f | 6c 76 65 20 74 68 65 20 | to reso|lve the |
|00001d30| 66 69 72 73 74 20 64 69 | 66 66 69 63 75 6c 74 79 |first di|fficulty|
|00001d40| 20 77 69 74 68 6f 75 74 | 20 63 68 61 6e 67 69 6e | without| changin|
|00001d50| 67 20 74 68 65 0a 6c 61 | 6e 67 75 61 67 65 3b 20 |g the.la|nguage; |
|00001d60| 69 74 20 63 61 6e 6e 6f | 74 20 62 65 20 73 6f 6c |it canno|t be sol|
|00001d70| 76 65 64 20 62 79 20 6f | 70 65 72 61 74 6f 72 20 |ved by o|perator |
|00001d80| 6f 76 65 72 6c 6f 61 64 | 69 6e 67 2e 20 20 54 68 |overload|ing. Th|
|00001d90| 65 72 65 20 61 72 65 20 | 74 77 6f 0a 72 65 61 73 |ere are |two.reas|
|00001da0| 6f 6e 73 20 66 6f 72 20 | 74 68 69 73 2c 20 65 69 |ons for |this, ei|
|00001db0| 74 68 65 72 20 6f 66 20 | 77 68 69 63 68 2c 20 6f |ther of |which, o|
|00001dc0| 6e 20 69 74 73 20 6f 77 | 6e 2c 20 69 73 20 73 75 |n its ow|n, is su|
|00001dd0| 66 66 69 63 69 65 6e 74 | 20 74 6f 0a 70 72 65 63 |fficient| to.prec|
|00001de0| 6c 75 64 65 20 73 75 63 | 68 20 61 20 73 6f 6c 75 |lude suc|h a solu|
|00001df0| 74 69 6f 6e 2e 20 20 46 | 69 72 73 74 2c 20 6f 70 |tion. F|irst, op|
|00001e00| 65 72 61 74 6f 72 20 6f | 76 65 72 6c 6f 61 64 69 |erator o|verloadi|
|00001e10| 6e 67 20 61 70 70 6c 69 | 65 73 20 6f 6e 6c 79 20 |ng appli|es only |
|00001e20| 74 6f 0a 75 73 65 72 2d | 64 65 66 69 6e 65 64 20 |to.user-|defined |
|00001e30| 74 79 70 65 73 3b 20 61 | 20 75 73 65 66 75 6c 20 |types; a| useful |
|00001e40| 65 78 70 6f 6e 65 6e 74 | 69 61 74 69 6f 6e 20 6f |exponent|iation o|
|00001e50| 70 65 72 61 74 6f 72 2c | 20 68 6f 77 65 76 65 72 |perator,| however|
|00001e60| 2c 20 6d 75 73 74 20 62 | 65 0a 64 65 66 69 6e 65 |, must b|e.define|
|00001e70| 64 20 66 6f 72 20 61 72 | 67 75 6d 65 6e 74 73 20 |d for ar|guments |
|00001e80| 6f 66 20 74 79 70 65 20 | 7b 5c 74 74 20 64 6f 75 |of type |{\tt dou|
|00001e90| 62 6c 65 7d 2c 20 7b 5c | 74 74 20 66 6c 6f 61 74 |ble}, {\|tt float|
|00001ea0| 7d 2c 20 61 6e 64 20 7b | 5c 74 74 0a 69 6e 74 7d |}, and {|\tt.int}|
|00001eb0| 2e 20 20 53 65 63 6f 6e | 64 2c 20 74 68 65 72 65 |. Secon|d, there|
|00001ec0| 20 69 73 20 6e 6f 20 6f | 70 65 72 61 74 6f 72 20 | is no o|perator |
|00001ed0| 77 69 74 68 20 61 20 70 | 72 65 63 65 64 65 6e 63 |with a p|recedenc|
|00001ee0| 65 20 73 75 69 74 61 62 | 6c 65 20 66 6f 72 0a 74 |e suitab|le for.t|
|00001ef0| 68 69 73 20 6f 76 65 72 | 6c 6f 61 64 69 6e 67 2e |his over|loading.|
|00001f00| 20 20 41 6c 6c 20 6f 66 | 20 74 68 65 20 62 69 6e | All of| the bin|
|00001f10| 61 72 79 20 6f 70 65 72 | 61 74 6f 72 73 20 77 68 |ary oper|ators wh|
|00001f20| 69 63 68 20 6d 69 67 68 | 74 20 62 65 20 63 68 6f |ich migh|t be cho|
|00001f30| 73 65 6e 0a 28 73 75 63 | 68 20 61 73 20 7b 5c 74 |sen.(suc|h as {\t|
|00001f40| 74 20 5e 7d 29 20 68 61 | 76 65 20 61 20 6c 6f 77 |t ^}) ha|ve a low|
|00001f50| 65 72 20 70 72 65 63 65 | 64 65 6e 63 65 20 74 68 |er prece|dence th|
|00001f60| 61 6e 20 6d 75 6c 74 69 | 70 6c 69 63 61 74 69 6f |an multi|plicatio|
|00001f70| 6e 20 61 6e 64 0a 61 64 | 64 69 74 69 6f 6e 2e 20 |n and.ad|dition. |
|00001f80| 20 49 6e 20 6f 72 64 69 | 6e 61 72 79 20 6d 61 74 | In ordi|nary mat|
|00001f90| 68 65 6d 61 74 69 63 61 | 6c 20 6e 6f 74 61 74 69 |hematica|l notati|
|00001fa0| 6f 6e 2c 20 61 6e 64 20 | 69 6e 20 61 6c 6c 20 6f |on, and |in all o|
|00001fb0| 74 68 65 72 0a 63 6f 6d | 70 75 74 65 72 20 6c 61 |ther.com|puter la|
|00001fc0| 6e 67 75 61 67 65 73 20 | 74 68 61 74 20 68 61 76 |nguages |that hav|
|00001fd0| 65 20 65 78 70 6f 6e 65 | 6e 74 69 61 74 69 6f 6e |e expone|ntiation|
|00001fe0| 20 6f 70 65 72 61 74 6f | 72 73 2c 20 65 78 70 6f | operato|rs, expo|
|00001ff0| 6e 65 6e 74 69 61 74 69 | 6f 6e 0a 62 69 6e 64 73 |nentiati|on.binds|
|00002000| 20 6d 6f 72 65 20 74 69 | 67 68 74 6c 79 20 74 68 | more ti|ghtly th|
|00002010| 61 6e 20 6d 75 6c 74 69 | 70 6c 69 63 61 74 69 6f |an multi|plicatio|
|00002020| 6e 3b 20 61 6e 20 65 78 | 70 6f 6e 65 6e 74 69 61 |n; an ex|ponentia|
|00002030| 74 69 6f 6e 20 6f 70 65 | 72 61 74 6f 72 0a 77 68 |tion ope|rator.wh|
|00002040| 69 63 68 20 62 6f 75 6e | 64 20 6c 65 73 73 20 74 |ich boun|d less t|
|00002050| 69 67 68 74 6c 79 20 74 | 68 61 6e 20 61 64 64 69 |ightly t|han addi|
|00002060| 74 69 6f 6e 20 77 6f 75 | 6c 64 20 62 65 20 63 6f |tion wou|ld be co|
|00002070| 6e 66 75 73 69 6e 67 2c | 20 61 6e 64 20 77 6f 75 |nfusing,| and wou|
|00002080| 6c 64 0a 62 65 20 61 6e | 20 69 6e 76 69 74 61 74 |ld.be an| invitat|
|00002090| 69 6f 6e 20 74 6f 20 65 | 72 72 6f 72 73 2e 20 20 |ion to e|rrors. |
|000020a0| 43 6f 6d 62 69 6e 65 64 | 2c 20 74 68 65 73 65 20 |Combined|, these |
|000020b0| 74 77 6f 20 6f 62 6a 65 | 63 74 69 6f 6e 73 20 61 |two obje|ctions a|
|000020c0| 72 65 20 73 6f 0a 66 6f | 72 6d 69 64 61 62 6c 65 |re so.fo|rmidable|
|000020d0| 20 61 20 62 61 72 72 69 | 65 72 20 74 68 61 74 20 | a barri|er that |
|000020e0| 49 20 68 61 76 65 20 6e | 65 76 65 72 20 73 65 65 |I have n|ever see|
|000020f0| 6e 20 65 76 65 6e 20 61 | 6e 20 61 74 74 65 6d 70 |n even a|n attemp|
|00002100| 74 20 74 6f 0a 69 6d 70 | 6c 65 6d 65 6e 74 20 65 |t to.imp|lement e|
|00002110| 78 70 6f 6e 65 6e 74 69 | 61 74 69 6f 6e 20 62 79 |xponenti|ation by|
|00002120| 20 6f 76 65 72 6c 6f 61 | 64 69 6e 67 20 73 6f 6d | overloa|ding som|
|00002130| 65 20 65 78 69 73 74 69 | 6e 67 20 6f 70 65 72 61 |e existi|ng opera|
|00002140| 74 6f 72 2e 0a 0a 54 68 | 65 20 73 65 63 6f 6e 64 |tor...Th|e second|
|00002150| 20 64 69 66 66 69 63 75 | 6c 74 79 2d 2d 2d 74 68 | difficu|lty---th|
|00002160| 65 20 69 6e 61 62 69 6c | 69 74 79 20 74 6f 20 73 |e inabil|ity to s|
|00002170| 70 65 63 69 66 79 20 74 | 68 61 74 20 74 68 65 20 |pecify t|hat the |
|00002180| 65 78 70 6f 6e 65 6e 74 | 20 69 73 0a 73 6f 6d 65 |exponent| is.some|
|00002190| 20 73 6d 61 6c 6c 20 69 | 6e 74 65 67 72 61 6c 20 | small i|ntegral |
|000021a0| 70 6f 77 65 72 2d 2d 2d | 63 61 6e 20 62 65 20 63 |power---|can be c|
|000021b0| 69 72 63 75 6d 76 65 6e | 74 65 64 20 62 79 20 74 |ircumven|ted by t|
|000021c0| 68 65 20 70 72 6f 67 72 | 61 6d 6d 65 72 2c 20 62 |he progr|ammer, b|
|000021d0| 75 74 0a 6f 6e 6c 79 20 | 61 74 20 74 68 65 20 63 |ut.only |at the c|
|000021e0| 6f 73 74 20 6f 66 20 73 | 6f 6d 65 20 69 6e 63 6f |ost of s|ome inco|
|000021f0| 6e 76 65 6e 69 65 6e 63 | 65 2e 20 20 4f 6e 65 20 |nvenienc|e. One |
|00002200| 70 6f 73 73 69 62 69 6c | 69 74 79 20 69 73 20 74 |possibil|ity is t|
|00002210| 6f 20 77 72 69 74 65 20 | 61 0a 75 73 65 72 2d 64 |o write |a.user-d|
|00002220| 65 66 69 6e 65 64 20 66 | 75 6e 63 74 69 6f 6e 2c |efined f|unction,|
|00002230| 20 7b 5c 74 74 20 70 6f | 77 28 64 6f 75 62 6c 65 | {\tt po|w(double|
|00002240| 2c 69 6e 74 29 7d 2e 20 | 20 46 6f 72 20 6d 6f 73 |,int)}. | For mos|
|00002250| 74 20 63 6f 6d 70 69 6c | 65 72 73 0a 74 6f 64 61 |t compil|ers.toda|
|00002260| 79 2c 20 75 6e 66 6f 72 | 74 75 6e 61 74 65 6c 79 |y, unfor|tunately|
|00002270| 2c 20 69 74 20 69 73 20 | 75 6e 6c 69 6b 65 6c 79 |, it is |unlikely|
|00002280| 2c 20 6e 6f 20 6d 61 74 | 74 65 72 20 68 6f 77 20 |, no mat|ter how |
|00002290| 74 68 69 73 20 66 75 6e | 63 74 69 6f 6e 20 69 73 |this fun|ction is|
|000022a0| 0a 64 65 66 69 6e 65 64 | 2c 20 61 6e 64 20 6e 6f |.defined|, and no|
|000022b0| 20 6d 61 74 74 65 72 20 | 77 68 61 74 20 69 73 20 | matter |what is |
|000022c0| 64 65 63 6c 61 72 65 64 | 20 7b 5c 74 74 20 69 6e |declared| {\tt in|
|000022d0| 6c 69 6e 65 7d 2c 20 74 | 68 61 74 20 7b 5c 74 74 |line}, t|hat {\tt|
|000022e0| 0a 70 6f 77 28 78 2c 32 | 29 7d 20 77 6f 75 6c 64 |.pow(x,2|)} would|
|000022f0| 20 65 78 70 61 6e 64 20 | 74 6f 20 73 6f 6d 65 74 | expand |to somet|
|00002300| 68 69 6e 67 20 61 73 20 | 65 66 66 69 63 69 65 6e |hing as |efficien|
|00002310| 74 20 61 73 20 7b 5c 74 | 74 20 78 2a 78 7d 2e 0a |t as {\t|t x*x}..|
|00002320| 46 75 72 74 68 65 72 6d | 6f 72 65 2c 20 61 20 70 |Furtherm|ore, a p|
|00002330| 72 6f 70 65 72 20 69 6d | 70 6c 65 6d 65 6e 74 61 |roper im|plementa|
|00002340| 74 69 6f 6e 20 6f 66 20 | 74 68 69 73 20 66 75 6e |tion of |this fun|
|00002350| 63 74 69 6f 6e 20 69 73 | 20 6c 69 6b 65 6c 79 20 |ction is| likely |
|00002360| 74 6f 0a 64 65 70 65 6e | 64 20 6f 6e 20 74 68 65 |to.depen|d on the|
|00002370| 20 61 72 63 68 69 74 65 | 63 74 75 72 65 20 6f 66 | archite|cture of|
|00002380| 20 74 68 65 20 74 61 72 | 67 65 74 20 6d 61 63 68 | the tar|get mach|
|00002390| 69 6e 65 3b 20 73 75 63 | 68 20 66 75 6e 63 74 69 |ine; suc|h functi|
|000023a0| 6f 6e 73 0a 70 72 6f 70 | 65 72 6c 79 20 62 65 6c |ons.prop|erly bel|
|000023b0| 6f 6e 67 20 74 6f 20 74 | 68 65 20 72 65 61 6c 6d |ong to t|he realm|
|000023c0| 20 6f 66 20 74 68 65 20 | 6c 69 62 72 61 72 79 20 | of the |library |
|000023d0| 61 75 74 68 6f 72 20 6f | 72 20 74 68 65 20 63 6f |author o|r the co|
|000023e0| 6d 70 69 6c 65 72 0a 77 | 72 69 74 65 72 2c 20 6e |mpiler.w|riter, n|
|000023f0| 6f 74 20 74 68 65 20 69 | 6e 64 69 76 69 64 75 61 |ot the i|ndividua|
|00002400| 6c 20 70 72 6f 67 72 61 | 6d 6d 65 72 2e 20 20 53 |l progra|mmer. S|
|00002410| 74 69 6c 6c 2c 20 77 69 | 74 68 20 61 20 6d 6f 64 |till, wi|th a mod|
|00002420| 65 72 61 74 65 20 61 6d | 6f 75 6e 74 0a 6f 66 20 |erate am|ount.of |
|00002430| 65 66 66 6f 72 74 2c 20 | 69 74 20 69 73 20 70 6f |effort, |it is po|
|00002440| 73 73 69 62 6c 65 20 74 | 6f 20 77 72 69 74 65 20 |ssible t|o write |
|00002450| 61 20 76 65 72 73 69 6f | 6e 20 6f 66 20 7b 5c 74 |a versio|n of {\t|
|00002460| 74 20 70 6f 77 28 64 6f | 75 62 6c 65 2c 69 6e 74 |t pow(do|uble,int|
|00002470| 29 7d 0a 77 68 69 63 68 | 20 69 73 20 70 72 65 66 |)}.which| is pref|
|00002480| 65 72 61 62 6c 65 20 74 | 6f 20 74 68 65 20 7b 5c |erable t|o the {\|
|00002490| 74 74 20 70 6f 77 28 64 | 6f 75 62 6c 65 2c 64 6f |tt pow(d|ouble,do|
|000024a0| 75 62 6c 65 29 7d 20 69 | 6e 20 74 68 65 20 73 74 |uble)} i|n the st|
|000024b0| 61 6e 64 61 72 64 0a 6c | 69 62 72 61 72 79 2e 0a |andard.l|ibrary..|
|000024c0| 0a 54 68 69 73 20 65 66 | 66 6f 72 74 20 69 73 20 |.This ef|fort is |
|000024d0| 73 75 66 66 69 63 69 65 | 6e 74 6c 79 20 67 72 65 |sufficie|ntly gre|
|000024e0| 61 74 2c 20 68 6f 77 65 | 76 65 72 2c 20 74 68 61 |at, howe|ver, tha|
|000024f0| 74 20 61 20 6d 6f 72 65 | 20 63 6f 6d 6d 6f 6e 6c |t a more| commonl|
|00002500| 79 20 75 73 65 64 0a 74 | 65 63 68 6e 69 71 75 65 |y used.t|echnique|
|00002510| 20 69 73 20 74 6f 20 64 | 65 66 69 6e 65 20 61 20 | is to d|efine a |
|00002520| 73 65 72 69 65 73 20 6f | 66 20 73 6d 61 6c 6c 20 |series o|f small |
|00002530| 69 6e 6c 69 6e 65 20 66 | 75 6e 63 74 69 6f 6e 73 |inline f|unctions|
|00002540| 3a 20 7b 5c 74 74 0a 73 | 71 75 61 72 65 28 64 6f |: {\tt.s|quare(do|
|00002550| 75 5c 2d 62 6c 65 29 7d | 2c 20 7b 5c 74 74 20 63 |u\-ble)}|, {\tt c|
|00002560| 75 62 65 28 64 6f 75 5c | 2d 62 6c 65 29 7d 2c 20 |ube(dou\|-ble)}, |
|00002570| 7b 5c 74 74 20 66 6f 75 | 72 74 68 28 64 6f 75 62 |{\tt fou|rth(doub|
|00002580| 6c 65 29 7d 2c 20 7b 5c | 74 74 0a 66 69 66 74 68 |le)}, {\|tt.fifth|
|00002590| 28 64 6f 75 62 6c 65 29 | 7d 2c 20 61 6e 64 20 73 |(double)|}, and s|
|000025a0| 6f 20 6f 6e 2c 20 61 6e | 64 20 74 68 65 6e 20 74 |o on, an|d then t|
|000025b0| 6f 20 75 73 65 20 74 68 | 65 20 73 74 61 6e 64 61 |o use th|e standa|
|000025c0| 72 64 20 6c 69 62 72 61 | 72 79 0a 66 75 6e 63 74 |rd libra|ry.funct|
|000025d0| 69 6f 6e 20 7b 5c 74 74 | 20 70 6f 77 28 64 6f 75 |ion {\tt| pow(dou|
|000025e0| 62 6c 65 2c 64 6f 75 62 | 6c 65 29 7d 2c 20 6f 72 |ble,doub|le)}, or|
|000025f0| 20 61 20 75 73 65 72 2d | 64 65 66 69 6e 65 64 20 | a user-|defined |
|00002600| 66 75 6e 63 74 69 6f 6e | 20 7b 5c 74 74 0a 70 6f |function| {\tt.po|
|00002610| 77 28 64 6f 75 5c 2d 62 | 6c 65 2c 69 6e 74 29 7d |w(dou\-b|le,int)}|
|00002620| 2c 20 66 6f 72 20 74 68 | 6f 73 65 20 63 61 73 65 |, for th|ose case|
|00002630| 73 20 77 68 65 72 65 20 | 74 68 65 20 65 78 70 6f |s where |the expo|
|00002640| 6e 65 6e 74 20 69 73 20 | 6e 6f 74 20 73 6d 61 6c |nent is |not smal|
|00002650| 6c 20 6f 72 0a 69 73 20 | 6e 6f 74 20 6b 6e 6f 77 |l or.is |not know|
|00002660| 6e 20 61 74 20 63 6f 6d | 70 69 6c 65 20 74 69 6d |n at com|pile tim|
|00002670| 65 2e 20 20 54 68 69 73 | 20 73 6f 6c 75 74 69 6f |e. This| solutio|
|00002680| 6e 20 69 73 20 75 67 6c | 79 2c 20 61 6e 64 20 72 |n is ugl|y, and r|
|00002690| 65 71 75 69 72 65 73 20 | 61 0a 66 61 69 72 20 61 |equires |a.fair a|
|000026a0| 6d 6f 75 6e 74 20 6f 66 | 20 70 72 6f 67 72 61 6d |mount of| program|
|000026b0| 6d 65 72 20 65 66 66 6f | 72 74 2c 20 62 75 74 20 |mer effo|rt, but |
|000026c0| 69 74 20 64 6f 65 73 20 | 61 74 20 6c 65 61 73 74 |it does |at least|
|000026d0| 20 61 6c 6c 6f 77 20 74 | 68 65 0a 70 72 6f 67 72 | allow t|he.progr|
|000026e0| 61 6d 6d 65 72 20 74 6f | 20 72 61 69 73 65 20 61 |ammer to| raise a|
|000026f0| 20 6e 75 6d 62 65 72 20 | 74 6f 20 61 20 73 6d 61 | number |to a sma|
|00002700| 6c 6c 20 69 6e 74 65 67 | 72 61 6c 20 70 6f 77 65 |ll integ|ral powe|
|00002710| 72 2e 0a 0a 53 6f 6d 65 | 20 70 72 6f 67 72 61 6d |r...Some| program|
|00002720| 6d 65 72 73 20 75 73 65 | 20 65 76 65 6e 20 6d 6f |mers use| even mo|
|00002730| 72 65 20 63 75 6d 62 65 | 72 73 6f 6d 65 20 77 6f |re cumbe|rsome wo|
|00002740| 72 6b 61 72 6f 75 6e 64 | 73 2d 2d 2d 61 20 6c 6f |rkaround|s---a lo|
|00002750| 6f 6b 75 70 20 74 61 62 | 6c 65 0a 6f 66 20 70 6f |okup tab|le.of po|
|00002760| 77 65 72 73 2c 20 66 6f | 72 20 65 78 61 6d 70 6c |wers, fo|r exampl|
|00002770| 65 2e 0a 0a 5c 73 75 62 | 73 75 62 73 65 63 74 69 |e...\sub|subsecti|
|00002780| 6f 6e 7b 43 68 61 6e 67 | 65 73 20 74 6f 20 74 68 |on{Chang|es to th|
|00002790| 65 20 73 74 61 6e 64 61 | 72 64 20 6c 69 62 72 61 |e standa|rd libra|
|000027a0| 72 79 7d 0a 49 66 20 74 | 68 65 20 66 75 6e 63 74 |ry}.If t|he funct|
|000027b0| 69 6f 6e 73 20 7b 5c 74 | 74 20 70 6f 77 28 64 6f |ions {\t|t pow(do|
|000027c0| 75 62 6c 65 2c 69 6e 74 | 29 7d 20 61 6e 64 20 7b |uble,int|)} and {|
|000027d0| 5c 74 74 20 70 6f 77 28 | 66 6c 6f 61 74 2c 69 6e |\tt pow(|float,in|
|000027e0| 74 29 7d 20 77 65 72 65 | 0a 61 64 64 65 64 20 74 |t)} were|.added t|
|000027f0| 6f 20 74 68 65 20 73 74 | 61 6e 64 61 72 64 20 6c |o the st|andard l|
|00002800| 69 62 72 61 72 79 2c 20 | 74 68 69 73 20 77 6f 75 |ibrary, |this wou|
|00002810| 6c 64 20 61 6c 6c 65 76 | 69 61 74 65 20 61 74 20 |ld allev|iate at |
|00002820| 6c 65 61 73 74 20 70 61 | 72 74 20 6f 66 0a 74 68 |least pa|rt of.th|
|00002830| 65 20 64 69 66 66 69 63 | 75 6c 74 79 2e 20 20 28 |e diffic|ulty. (|
|00002840| 54 68 69 73 20 77 61 73 | 20 6e 6f 74 20 61 20 70 |This was| not a p|
|00002850| 6f 73 73 69 62 6c 65 20 | 73 6f 6c 75 74 69 6f 6e |ossible |solution|
|00002860| 20 66 6f 72 20 5c 6f 6c | 64 43 2c 20 77 68 69 63 | for \ol|dC, whic|
|00002870| 68 0a 64 6f 65 73 20 6e | 6f 74 20 61 6c 6c 6f 77 |h.does n|ot allow|
|00002880| 20 66 75 6e 63 74 69 6f | 6e 20 6f 76 65 72 6c 6f | functio|n overlo|
|00002890| 61 64 69 6e 67 2e 29 20 | 20 54 68 69 73 20 77 6f |ading.) | This wo|
|000028a0| 75 6c 64 20 62 65 20 61 | 20 73 61 74 69 73 66 61 |uld be a| satisfa|
|000028b0| 63 74 6f 72 79 0a 6d 65 | 61 6e 73 20 6f 66 20 72 |ctory.me|ans of r|
|000028c0| 61 69 73 69 6e 67 20 6e | 75 6d 62 65 72 73 20 74 |aising n|umbers t|
|000028d0| 6f 20 73 6d 61 6c 6c 20 | 69 6e 74 65 67 72 61 6c |o small |integral|
|000028e0| 20 70 6f 77 65 72 73 2c | 20 61 6e 64 20 77 6f 75 | powers,| and wou|
|000028f0| 6c 64 20 62 65 20 61 0a | 64 69 73 74 69 6e 63 74 |ld be a.|distinct|
|00002900| 20 69 6d 70 72 6f 76 65 | 6d 65 6e 74 20 6f 76 65 | improve|ment ove|
|00002910| 72 20 74 68 65 20 70 72 | 65 73 65 6e 74 20 73 69 |r the pr|esent si|
|00002920| 74 75 61 74 69 6f 6e 2e | 20 20 0a 0a 54 68 69 73 |tuation.| ..This|
|00002930| 20 73 6f 6c 75 74 69 6f | 6e 20 69 73 20 72 65 61 | solutio|n is rea|
|00002940| 6c 6c 79 20 6f 6e 6c 79 | 20 75 73 65 66 75 6c 20 |lly only| useful |
|00002950| 69 66 20 69 74 20 69 73 | 20 64 6f 6e 65 20 62 79 |if it is| done by|
|00002960| 20 61 6c 6c 20 63 6f 6d | 70 69 6c 65 72 0a 76 65 | all com|piler.ve|
|00002970| 6e 64 6f 72 73 2c 20 7b | 5c 65 6d 20 69 2e 65 2e |ndors, {|\em i.e.|
|00002980| 7d 2c 20 69 66 20 69 74 | 20 69 73 20 6d 61 6e 64 |}, if it| is mand|
|00002990| 61 74 65 64 20 69 6e 20 | 74 68 65 20 53 74 61 6e |ated in |the Stan|
|000029a0| 64 61 72 64 2e 20 20 4e | 6f 62 6f 64 79 20 69 73 |dard. N|obody is|
|000029b0| 0a 67 6f 69 6e 67 20 74 | 6f 20 77 72 69 74 65 20 |.going t|o write |
|000029c0| 7b 5c 74 74 20 70 6f 77 | 28 78 2c 32 29 7d 20 74 |{\tt pow|(x,2)} t|
|000029d0| 6f 20 73 71 75 61 72 65 | 20 61 20 71 75 61 6e 74 |o square| a quant|
|000029e0| 69 74 79 20 69 66 20 6d | 6f 73 74 20 63 6f 6d 70 |ity if m|ost comp|
|000029f0| 69 6c 65 72 73 0a 61 72 | 65 20 6a 75 73 74 20 67 |ilers.ar|e just g|
|00002a00| 6f 69 6e 67 20 74 6f 20 | 70 61 73 73 20 69 74 20 |oing to |pass it |
|00002a10| 74 6f 20 7b 5c 74 74 20 | 70 6f 77 28 64 6f 75 5c |to {\tt |pow(dou\|
|00002a20| 2d 62 6c 65 2c 64 6f 75 | 5c 2d 62 6c 65 29 7d 20 |-ble,dou|\-ble)} |
|00002a30| 61 6e 64 20 63 6f 6d 70 | 75 74 65 20 69 74 0a 62 |and comp|ute it.b|
|00002a40| 79 20 6d 65 61 6e 73 20 | 6f 66 20 74 72 61 6e 73 |y means |of trans|
|00002a50| 63 65 6e 64 65 6e 74 61 | 6c 20 66 75 6e 63 74 69 |cendenta|l functi|
|00002a60| 6f 6e 73 2e 0a 0a 4f 6e | 65 20 64 69 66 66 69 63 |ons...On|e diffic|
|00002a70| 75 6c 74 79 20 77 69 74 | 68 20 74 68 69 73 20 73 |ulty wit|h this s|
|00002a80| 6f 6c 75 74 69 6f 6e 20 | 69 73 20 74 68 61 74 20 |olution |is that |
|00002a90| 69 74 20 77 6f 75 6c 64 | 20 63 68 61 6e 67 65 20 |it would| change |
|00002aa0| 74 68 65 20 6d 65 61 6e | 69 6e 67 0a 6f 66 20 65 |the mean|ing.of e|
|00002ab0| 78 69 73 74 69 6e 67 20 | 63 6f 64 65 3a 20 7b 5c |xisting |code: {\|
|00002ac0| 74 74 20 70 6f 77 28 78 | 2c 32 29 7d 20 61 6e 64 |tt pow(x|,2)} and|
|00002ad0| 20 7b 5c 74 74 20 70 6f | 77 28 78 2c 32 2e 29 7d | {\tt po|w(x,2.)}|
|00002ae0| 2c 20 66 6f 72 20 65 78 | 61 6d 70 6c 65 2c 0a 77 |, for ex|ample,.w|
|00002af0| 6f 75 6c 64 20 6e 6f 77 | 20 72 65 70 72 65 73 65 |ould now| represe|
|00002b00| 6e 74 20 63 61 6c 6c 73 | 20 74 6f 20 74 77 6f 20 |nt calls| to two |
|00002b10| 64 69 66 66 65 72 65 6e | 74 20 66 75 6e 63 74 69 |differen|t functi|
|00002b20| 6f 6e 73 2e 20 20 57 68 | 65 6e 65 76 65 72 20 74 |ons. Wh|enever t|
|00002b30| 68 65 0a 6d 65 61 6e 69 | 6e 67 20 6f 66 20 65 78 |he.meani|ng of ex|
|00002b40| 69 73 74 69 6e 67 20 63 | 6f 64 65 20 69 73 20 63 |isting c|ode is c|
|00002b50| 68 61 6e 67 65 64 2c 20 | 65 76 65 6e 20 69 6e 20 |hanged, |even in |
|00002b60| 61 20 73 65 65 6d 69 6e | 67 6c 79 20 69 6e 6e 6f |a seemin|gly inno|
|00002b70| 63 75 6f 75 73 0a 77 61 | 79 2c 20 74 68 65 72 65 |cuous.wa|y, there|
|00002b80| 20 69 73 20 73 6f 6d 65 | 20 72 69 73 6b 20 6f 66 | is some| risk of|
|00002b90| 20 62 72 65 61 6b 69 6e | 67 20 61 20 63 75 72 72 | breakin|g a curr|
|00002ba0| 65 6e 74 6c 79 20 77 6f | 72 6b 69 6e 67 20 70 72 |ently wo|rking pr|
|00002bb0| 6f 67 72 61 6d 2e 0a 0a | 4e 6f 74 65 20 61 6c 73 |ogram...|Note als|
|00002bc0| 6f 20 74 68 61 74 20 74 | 68 69 73 20 6f 6e 6c 79 |o that t|his only|
|00002bd0| 20 73 6f 6c 76 65 73 20 | 6f 6e 65 20 6f 66 20 74 | solves |one of t|
|00002be0| 68 65 20 74 77 6f 20 70 | 72 6f 62 6c 65 6d 73 20 |he two p|roblems |
|00002bf0| 77 68 69 63 68 20 77 61 | 73 0a 64 69 73 63 75 73 |which wa|s.discus|
|00002c00| 73 65 64 20 61 62 6f 76 | 65 2e 20 20 54 68 65 20 |sed abov|e. The |
|00002c10| 6d 6f 72 65 20 69 6d 70 | 6f 72 74 61 6e 74 20 70 |more imp|ortant p|
|00002c20| 72 6f 62 6c 65 6d 2c 20 | 74 68 65 20 63 6c 75 6d |roblem, |the clum|
|00002c30| 73 79 20 73 79 6e 74 61 | 78 2c 20 73 74 69 6c 6c |sy synta|x, still|
|00002c40| 0a 72 65 6d 61 69 6e 73 | 2e 20 20 4c 69 62 72 61 |.remains|. Libra|
|00002c50| 72 79 20 73 6f 6c 75 74 | 69 6f 6e 73 2c 20 62 79 |ry solut|ions, by|
|00002c60| 20 74 68 65 69 72 20 6e | 61 74 75 72 65 2c 20 63 | their n|ature, c|
|00002c70| 61 6e 6e 6f 74 20 61 64 | 64 72 65 73 73 20 74 68 |annot ad|dress th|
|00002c80| 65 0a 73 79 6e 74 61 63 | 74 69 63 20 70 72 6f 62 |e.syntac|tic prob|
|00002c90| 6c 65 6d 2e 0a 0a 5c 73 | 75 62 73 75 62 73 65 63 |lem...\s|ubsubsec|
|00002ca0| 74 69 6f 6e 7b 55 73 65 | 20 6f 66 20 61 6e 20 65 |tion{Use| of an e|
|00002cb0| 78 69 73 74 69 6e 67 20 | 6f 70 65 72 61 74 6f 72 |xisting |operator|
|00002cc0| 7d 0a 53 65 76 65 72 61 | 6c 20 6f 70 65 72 61 74 |}.Severa|l operat|
|00002cd0| 6f 72 73 20 65 78 69 73 | 74 20 28 7b 5c 69 74 20 |ors exis|t ({\it |
|00002ce0| 65 2e 67 2e 7d 2c 20 7b | 5c 74 74 20 5e 7d 29 20 |e.g.}, {|\tt ^}) |
|00002cf0| 77 68 69 63 68 20 61 72 | 65 20 6e 6f 74 20 64 65 |which ar|e not de|
|00002d00| 66 69 6e 65 64 0a 66 6f | 72 20 66 6c 6f 61 74 69 |fined.fo|r floati|
|00002d10| 6e 67 2d 70 6f 69 6e 74 | 20 6f 70 65 72 61 6e 64 |ng-point| operand|
|00002d20| 73 3b 20 6f 6e 65 20 63 | 6f 75 6c 64 20 69 6d 61 |s; one c|ould ima|
|00002d30| 67 69 6e 65 20 63 68 61 | 6e 67 69 6e 67 20 74 68 |gine cha|nging th|
|00002d40| 65 20 6c 61 6e 67 75 61 | 67 65 0a 73 6f 20 74 68 |e langua|ge.so th|
|00002d50| 61 74 2c 20 69 66 20 61 | 74 20 6c 65 61 73 74 20 |at, if a|t least |
|00002d60| 6f 6e 65 20 61 72 67 75 | 6d 65 6e 74 20 69 73 20 |one argu|ment is |
|00002d70| 6f 66 20 61 20 66 6c 6f | 61 74 69 6e 67 2d 70 6f |of a flo|ating-po|
|00002d80| 69 6e 74 20 74 79 70 65 | 2c 20 69 74 0a 64 65 6e |int type|, it.den|
|00002d90| 6f 74 65 73 20 65 78 70 | 6f 6e 65 6e 74 69 61 74 |otes exp|onentiat|
|00002da0| 69 6f 6e 2e 20 20 54 68 | 69 73 20 69 73 20 61 20 |ion. Th|is is a |
|00002db0| 70 6f 6f 72 20 69 64 65 | 61 2c 20 68 6f 77 65 76 |poor ide|a, howev|
|00002dc0| 65 72 2c 20 62 65 63 61 | 75 73 65 20 61 6c 6c 20 |er, beca|use all |
|00002dd0| 6f 66 0a 74 68 65 73 65 | 20 6f 70 65 72 61 74 6f |of.these| operato|
|00002de0| 72 73 20 68 61 76 65 20 | 70 72 65 63 65 64 65 6e |rs have |preceden|
|00002df0| 63 65 20 6c 6f 77 65 72 | 20 74 68 61 6e 20 61 64 |ce lower| than ad|
|00002e00| 64 69 74 69 6f 6e 3b 20 | 61 73 20 64 69 73 63 75 |dition; |as discu|
|00002e10| 73 73 65 64 0a 61 62 6f | 76 65 2c 20 73 75 63 68 |ssed.abo|ve, such|
|00002e20| 20 61 20 70 72 65 63 65 | 64 65 6e 63 65 20 66 6f | a prece|dence fo|
|00002e30| 72 20 61 6e 20 65 78 70 | 6f 6e 65 6e 74 69 61 74 |r an exp|onentiat|
|00002e40| 69 6f 6e 20 6f 70 65 72 | 61 74 6f 72 20 77 6f 75 |ion oper|ator wou|
|00002e50| 6c 64 20 62 65 0a 67 72 | 6f 73 73 6c 79 20 63 6f |ld be.gr|ossly co|
|00002e60| 75 6e 74 65 72 2d 69 6e | 74 75 69 74 69 76 65 2e |unter-in|tuitive.|
|00002e70| 0a 0a 5c 73 65 63 74 69 | 6f 6e 7b 54 68 65 20 70 |..\secti|on{The p|
|00002e80| 72 6f 70 6f 73 61 6c 7d | 09 09 09 5c 6c 61 62 65 |roposal}|...\labe|
|00002e90| 6c 7b 70 72 6f 70 6f 73 | 61 6c 2d 73 65 63 74 69 |l{propos|al-secti|
|00002ea0| 6f 6e 7d 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |on}.\sub|section{|
|00002eb0| 43 68 61 6e 67 65 73 20 | 74 6f 20 74 68 65 20 6c |Changes |to the l|
|00002ec0| 61 6e 67 75 61 67 65 7d | 09 5c 6c 61 62 65 6c 7b |anguage}|.\label{|
|00002ed0| 70 72 6f 70 6f 73 61 6c | 7d 0a 0a 41 20 6e 65 77 |proposal|}..A new|
|00002ee0| 20 74 6f 6b 65 6e 2c 20 | 5c 6f 70 2c 20 77 69 6c | token, |\op, wil|
|00002ef0| 6c 20 62 65 20 61 64 64 | 65 64 20 74 6f 20 74 68 |l be add|ed to th|
|00002f00| 65 20 5c 43 5c 20 6c 61 | 6e 67 75 61 67 65 2e 20 |e \C\ la|nguage. |
|00002f10| 20 54 68 69 73 20 74 6f | 6b 65 6e 20 77 69 6c 6c | This to|ken will|
|00002f20| 0a 62 65 20 61 20 62 69 | 6e 61 72 79 20 6f 70 65 |.be a bi|nary ope|
|00002f30| 72 61 74 6f 72 2c 20 61 | 6e 64 20 77 69 6c 6c 20 |rator, a|nd will |
|00002f40| 64 65 6e 6f 74 65 20 65 | 78 70 6f 6e 65 6e 74 69 |denote e|xponenti|
|00002f50| 61 74 69 6f 6e 2e 20 20 | 49 74 20 77 69 6c 6c 20 |ation. |It will |
|00002f60| 67 72 6f 75 70 0a 72 69 | 67 68 74 20 74 6f 20 6c |group.ri|ght to l|
|00002f70| 65 66 74 2c 20 61 6e 64 | 20 77 69 6c 6c 20 68 61 |eft, and| will ha|
|00002f80| 76 65 20 61 20 70 72 65 | 63 65 64 65 6e 63 65 20 |ve a pre|cedence |
|00002f90| 68 69 67 68 65 72 20 74 | 68 61 6e 20 6d 75 6c 74 |higher t|han mult|
|00002fa0| 69 70 6c 69 63 61 74 69 | 6f 6e 0a 61 6e 64 20 64 |iplicati|on.and d|
|00002fb0| 69 76 69 73 69 6f 6e 2c | 20 62 75 74 20 6c 6f 77 |ivision,| but low|
|00002fc0| 65 72 20 74 68 61 6e 20 | 74 68 65 20 70 6f 69 6e |er than |the poin|
|00002fd0| 74 65 72 2d 74 6f 2d 6d | 65 6d 62 65 72 20 6f 70 |ter-to-m|ember op|
|00002fe0| 65 72 61 74 6f 72 73 2e | 20 20 28 4e 6f 74 65 0a |erators.| (Note.|
|00002ff0| 74 68 61 74 20 74 68 69 | 73 20 69 73 20 61 20 6e |that thi|s is a n|
|00003000| 65 77 20 70 72 65 63 65 | 64 65 6e 63 65 20 6c 65 |ew prece|dence le|
|00003010| 76 65 6c 2e 29 0a 42 6f | 74 68 20 61 72 67 75 6d |vel.).Bo|th argum|
|00003020| 65 6e 74 73 20 6f 66 20 | 74 68 69 73 20 6f 70 65 |ents of |this ope|
|00003030| 72 61 74 6f 72 20 6d 75 | 73 74 20 62 65 20 6f 66 |rator mu|st be of|
|00003040| 20 61 20 6e 75 6d 65 72 | 69 63 20 74 79 70 65 2e | a numer|ic type.|
|00003050| 0a 0a 49 66 20 74 68 65 | 20 66 69 72 73 74 20 6f |..If the| first o|
|00003060| 70 65 72 61 6e 64 20 69 | 73 20 61 20 66 6c 6f 61 |perand i|s a floa|
|00003070| 74 69 6e 67 2d 70 6f 69 | 6e 74 20 74 79 70 65 20 |ting-poi|nt type |
|00003080| 61 6e 64 20 74 68 65 20 | 73 65 63 6f 6e 64 20 69 |and the |second i|
|00003090| 73 20 61 6e 0a 69 6e 74 | 65 67 72 61 6c 20 74 79 |s an.int|egral ty|
|000030a0| 70 65 2c 20 74 68 65 6e | 20 74 68 65 20 74 79 70 |pe, then| the typ|
|000030b0| 65 20 6f 66 20 74 68 65 | 20 65 78 70 72 65 73 73 |e of the| express|
|000030c0| 69 6f 6e 20 69 73 20 74 | 68 61 74 20 6f 66 20 74 |ion is t|hat of t|
|000030d0| 68 65 20 66 69 72 73 74 | 0a 6f 70 65 72 61 6e 64 |he first|.operand|
|000030e0| 3b 20 74 68 65 20 65 78 | 70 72 65 73 73 69 6f 6e |; the ex|pression|
|000030f0| 20 69 73 20 65 76 61 6c | 75 61 74 65 64 20 7b 5c | is eval|uated {\|
|00003100| 65 6d 20 77 69 74 68 6f | 75 74 7d 20 63 6f 6e 76 |em witho|ut} conv|
|00003110| 65 72 74 69 6e 67 20 74 | 68 65 0a 73 65 63 6f 6e |erting t|he.secon|
|00003120| 64 20 6f 70 65 72 61 6e | 64 20 74 6f 20 74 68 65 |d operan|d to the|
|00003130| 20 73 61 6d 65 20 74 79 | 70 65 20 61 73 20 74 68 | same ty|pe as th|
|00003140| 65 20 66 69 72 73 74 2e | 20 20 45 78 63 65 70 74 |e first.| Except|
|00003150| 20 66 6f 72 20 74 68 69 | 73 20 73 70 65 63 69 61 | for thi|s specia|
|00003160| 6c 0a 63 61 73 65 2c 20 | 74 68 65 20 75 73 75 61 |l.case, |the usua|
|00003170| 6c 20 61 72 69 74 68 6d | 65 74 69 63 20 63 6f 6e |l arithm|etic con|
|00003180| 76 65 72 73 69 6f 6e 73 | 20 61 72 65 20 70 65 72 |versions| are per|
|00003190| 66 6f 72 6d 65 64 20 6f | 6e 20 74 68 65 20 6f 70 |formed o|n the op|
|000031a0| 65 72 61 6e 64 73 2c 0a | 61 6e 64 20 64 65 74 65 |erands,.|and dete|
|000031b0| 72 6d 69 6e 65 20 74 68 | 65 20 72 65 74 75 72 6e |rmine th|e return|
|000031c0| 20 74 79 70 65 2e 0a 0a | 54 68 65 20 66 6f 6c 6c | type...|The foll|
|000031d0| 6f 77 69 6e 67 20 63 6f | 6e 64 69 74 69 6f 6e 73 |owing co|nditions|
|000031e0| 20 6f 6e 20 74 68 65 20 | 6f 70 65 72 61 6e 64 73 | on the |operands|
|000031f0| 20 63 6f 6e 73 74 69 74 | 75 74 65 20 61 20 64 6f | constit|ute a do|
|00003200| 6d 61 69 6e 20 65 72 72 | 6f 72 3a 0a 5c 62 65 67 |main err|or:.\beg|
|00003210| 69 6e 7b 65 6e 75 6d 65 | 72 61 74 65 7d 0a 5c 69 |in{enume|rate}.\i|
|00003220| 74 65 6d 20 54 68 65 20 | 66 69 72 73 74 20 6f 70 |tem The |first op|
|00003230| 65 72 61 6e 64 20 69 73 | 20 7a 65 72 6f 2c 20 61 |erand is| zero, a|
|00003240| 6e 64 20 74 68 65 20 73 | 65 63 6f 6e 64 20 69 73 |nd the s|econd is|
|00003250| 20 6e 65 67 61 74 69 76 | 65 2e 0a 5c 69 74 65 6d | negativ|e..\item|
|00003260| 20 54 68 65 20 66 69 72 | 73 74 20 6f 70 65 72 61 | The fir|st opera|
|00003270| 6e 64 20 69 73 20 6e 65 | 67 61 74 69 76 65 2c 20 |nd is ne|gative, |
|00003280| 61 6e 64 20 74 68 65 20 | 73 65 63 6f 6e 64 20 69 |and the |second i|
|00003290| 73 20 6e 6f 74 0a 20 20 | 20 20 20 20 61 6e 20 69 |s not. | an i|
|000032a0| 6e 74 65 67 65 72 2e 20 | 20 28 41 6e 20 69 6d 70 |nteger. | (An imp|
|000032b0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 69 73 20 61 |lementat|ion is a|
|000032c0| 6c 6c 6f 77 65 64 2c 20 | 62 75 74 0a 20 20 20 20 |llowed, |but. |
|000032d0| 20 20 6e 6f 74 20 72 65 | 71 75 69 72 65 64 2c 20 | not re|quired, |
|000032e0| 74 6f 20 69 6e 74 65 72 | 70 72 65 74 20 60 60 6e |to inter|pret ``n|
|000032f0| 6f 74 20 61 6e 20 69 6e | 74 65 67 65 72 27 27 20 |ot an in|teger'' |
|00003300| 61 73 20 60 60 6e 6f 74 | 20 61 20 0a 20 20 20 20 |as ``not| a . |
|00003310| 20 20 6e 75 6d 62 65 72 | 20 6f 66 20 61 6e 20 69 | number| of an i|
|00003320| 6e 74 65 67 72 61 6c 20 | 74 79 70 65 2e 27 27 29 |ntegral |type.'')|
|00003330| 0a 5c 65 6e 64 7b 65 6e | 75 6d 65 72 61 74 65 7d |.\end{en|umerate}|
|00003340| 0a 54 68 65 20 76 61 6c | 75 65 20 6f 66 20 74 68 |.The val|ue of th|
|00003350| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 7b 5c 74 |e expres|sion {\t|
|00003360| 74 20 30 20 2a 5e 20 30 | 7d 20 69 73 20 69 6d 70 |t 0 *^ 0|} is imp|
|00003370| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 0a 64 65 70 65 |lementat|ion.depe|
|00003380| 6e 64 65 6e 74 2c 20 72 | 65 67 61 72 64 6c 65 73 |ndent, r|egardles|
|00003390| 73 20 6f 66 20 77 68 65 | 74 68 65 72 20 74 68 65 |s of whe|ther the|
|000033a0| 20 74 79 70 65 73 20 6f | 66 20 74 68 65 20 6f 70 | types o|f the op|
|000033b0| 65 72 61 6e 64 73 20 61 | 72 65 0a 69 6e 74 65 67 |erands a|re.integ|
|000033c0| 72 61 6c 20 6f 72 20 66 | 6c 6f 61 74 69 6e 67 2d |ral or f|loating-|
|000033d0| 70 6f 69 6e 74 2e 20 20 | 41 6e 20 69 6d 70 6c 65 |point. |An imple|
|000033e0| 6d 65 6e 74 61 74 69 6f | 6e 20 69 73 20 61 6c 6c |mentatio|n is all|
|000033f0| 6f 77 65 64 20 74 6f 20 | 74 72 65 61 74 0a 74 68 |owed to |treat.th|
|00003400| 69 73 20 61 73 20 61 20 | 64 6f 6d 61 69 6e 20 65 |is as a |domain e|
|00003410| 72 72 6f 72 2e 0a 0a 41 | 20 73 65 63 6f 6e 64 20 |rror...A| second |
|00003420| 74 6f 6b 65 6e 2c 20 7b | 5c 74 74 20 2a 5e 3d 7d |token, {|\tt *^=}|
|00003430| 2c 20 77 69 6c 6c 20 61 | 6c 73 6f 20 62 65 20 61 |, will a|lso be a|
|00003440| 64 64 65 64 2e 20 20 49 | 74 20 77 69 6c 6c 20 62 |dded. I|t will b|
|00003450| 65 20 64 65 66 69 6e 65 | 64 20 69 6e 0a 74 68 65 |e define|d in.the|
|00003460| 20 73 61 6d 65 20 77 61 | 79 20 61 73 20 61 6c 6c | same wa|y as all|
|00003470| 20 6f 66 20 74 68 65 20 | 6f 74 68 65 72 20 7b 5c | of the |other {\|
|00003480| 69 74 20 6f 70 5c 2f 7d | 7b 5c 74 74 20 3d 7d 20 |it op\/}|{\tt =} |
|00003490| 6f 70 65 72 61 74 6f 72 | 73 2e 0a 0a 41 73 20 77 |operator|s...As w|
|000034a0| 69 74 68 20 6f 74 68 65 | 72 20 6f 70 65 72 61 74 |ith othe|r operat|
|000034b0| 6f 72 73 2c 20 5c 6f 70 | 5c 20 61 6e 64 20 7b 5c |ors, \op|\ and {\|
|000034c0| 74 74 20 2a 5e 3d 7d 20 | 6d 61 79 20 62 65 20 6f |tt *^=} |may be o|
|000034d0| 76 65 72 6c 6f 61 64 65 | 64 20 62 79 20 74 68 65 |verloade|d by the|
|000034e0| 0a 75 73 65 72 20 69 66 | 20 61 74 20 6c 65 61 73 |.user if| at leas|
|000034f0| 74 20 6f 6e 65 20 6f 70 | 65 72 61 6e 64 20 69 73 |t one op|erand is|
|00003500| 20 61 6e 20 6f 62 6a 65 | 63 74 20 6f 66 20 61 20 | an obje|ct of a |
|00003510| 63 6c 61 73 73 20 74 79 | 70 65 2e 0a 0a 5c 73 75 |class ty|pe...\su|
|00003520| 62 73 65 63 74 69 6f 6e | 7b 43 68 61 6e 67 65 73 |bsection|{Changes|
|00003530| 20 74 6f 20 74 68 65 20 | 5c 43 5c 20 72 65 66 65 | to the |\C\ refe|
|00003540| 72 65 6e 63 65 20 6d 61 | 6e 75 61 6c 7d 0a 0a 41 |rence ma|nual}..A|
|00003550| 20 6e 65 77 20 73 65 63 | 74 69 6f 6e 20 64 65 73 | new sec|tion des|
|00003560| 63 72 69 62 69 6e 67 20 | 74 68 65 20 65 78 70 6f |cribing |the expo|
|00003570| 6e 65 6e 74 69 61 74 69 | 6f 6e 20 6f 70 65 72 61 |nentiati|on opera|
|00003580| 74 6f 72 20 77 69 6c 6c | 20 68 61 76 65 20 74 6f |tor will| have to|
|00003590| 20 62 65 0a 61 64 64 65 | 64 20 74 6f 20 5c 53 35 | be.adde|d to \S5|
|000035a0| 20 6f 66 20 74 68 65 20 | 72 65 66 65 72 65 6e 63 | of the |referenc|
|000035b0| 65 20 6d 61 6e 75 61 6c | 2c 20 77 68 69 63 68 20 |e manual|, which |
|000035c0| 64 65 73 63 72 69 62 65 | 73 20 65 78 70 72 65 73 |describe|s expres|
|000035d0| 73 69 6f 6e 73 3b 20 69 | 74 0a 77 6f 75 6c 64 20 |sions; i|t.would |
|000035e0| 6c 6f 67 69 63 61 6c 6c | 79 20 66 69 74 20 62 65 |logicall|y fit be|
|000035f0| 74 77 65 65 6e 20 5c 53 | 35 2e 35 20 61 6e 64 20 |tween \S|5.5 and |
|00003600| 5c 53 35 2e 36 20 6f 66 | 20 74 68 65 20 7b 5c 73 |\S5.6 of| the {\s|
|00003610| 6c 20 41 6e 6e 6f 74 61 | 74 65 64 0a 52 65 66 65 |l Annota|ted.Refe|
|00003620| 72 65 6e 63 65 20 4d 61 | 6e 75 61 6c 5c 2f 7d 5c |rence Ma|nual\/}\|
|00003630| 66 6f 6f 74 6e 6f 74 65 | 7b 4d 2e 7e 41 2e 7e 45 |footnote|{M.~A.~E|
|00003640| 6c 6c 69 73 20 61 6e 64 | 20 42 2e 7e 53 74 72 6f |llis and| B.~Stro|
|00003650| 75 73 74 72 75 70 2c 20 | 7b 5c 73 6c 20 54 68 65 |ustrup, |{\sl The|
|00003660| 0a 41 6e 6e 6f 74 61 74 | 65 64 20 43 2b 2b 20 52 |.Annotat|ed C++ R|
|00003670| 65 66 65 72 65 6e 63 65 | 20 4d 61 6e 75 61 6c 7d |eference| Manual}|
|00003680| 20 28 52 65 61 64 69 6e | 67 3a 20 41 64 64 69 73 | (Readin|g: Addis|
|00003690| 6f 6e 2d 57 65 73 6c 65 | 79 29 2c 0a 31 39 39 30 |on-Wesle|y),.1990|
|000036a0| 2e 7d 7e 28 41 52 4d 29 | 2c 20 62 75 74 20 77 69 |.}~(ARM)|, but wi|
|000036b0| 6c 6c 20 70 72 6f 62 61 | 62 6c 79 20 68 61 76 65 |ll proba|bly have|
|000036c0| 20 74 6f 20 62 65 20 70 | 6c 61 63 65 64 20 65 6c | to be p|laced el|
|000036d0| 73 65 77 68 65 72 65 20 | 69 6e 73 74 65 61 64 2c |sewhere |instead,|
|000036e0| 0a 74 6f 20 61 76 6f 69 | 64 20 72 65 6e 75 6d 62 |.to avoi|d renumb|
|000036f0| 65 72 69 6e 67 20 6d 6f | 73 74 20 6f 66 20 74 68 |ering mo|st of th|
|00003700| 65 20 63 68 61 70 74 65 | 72 2e 20 20 49 74 20 77 |e chapte|r. It w|
|00003710| 69 6c 6c 20 69 6e 63 6c | 75 64 65 20 74 68 65 0a |ill incl|ude the.|
|00003720| 66 6f 6c 6c 6f 77 69 6e | 67 20 64 65 73 63 72 69 |followin|g descri|
|00003730| 70 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 67 72 61 |ption of| the gra|
|00003740| 6d 6d 61 72 3a 0a 0a 5c | 62 65 67 69 6e 7b 69 74 |mmar:..\|begin{it|
|00003750| 7d 0a 5c 68 73 70 61 63 | 65 2a 7b 33 63 6d 7d 70 |}.\hspac|e*{3cm}p|
|00003760| 6f 77 65 72 2d 65 78 70 | 72 65 73 73 69 6f 6e 3a |ower-exp|ression:|
|00003770| 09 09 09 09 5c 5c 0a 5c | 68 73 70 61 63 65 2a 7b |....\\.\|hspace*{|
|00003780| 34 63 6d 7d 09 70 6d 2d | 65 78 70 72 65 73 73 69 |4cm}.pm-|expressi|
|00003790| 6f 6e 09 09 09 09 09 5c | 5c 0a 5c 68 73 70 61 63 |on.....\|\.\hspac|
|000037a0| 65 2a 7b 34 63 6d 7d 09 | 70 6d 2d 65 78 70 72 65 |e*{4cm}.|pm-expre|
|000037b0| 73 73 69 6f 6e 20 2a 5e | 20 70 6f 77 65 72 2d 65 |ssion *^| power-e|
|000037c0| 78 70 72 65 73 73 69 6f | 6e 2e 0a 5c 65 6e 64 7b |xpressio|n..\end{|
|000037d0| 69 74 7d 0a 0a 49 6e 20 | 5c 53 35 2e 36 2c 20 77 |it}..In |\S5.6, w|
|000037e0| 68 69 63 68 20 64 65 73 | 63 72 69 62 65 73 20 6d |hich des|cribes m|
|000037f0| 75 6c 74 69 70 6c 69 63 | 61 74 69 76 65 20 65 78 |ultiplic|ative ex|
|00003800| 70 72 65 73 73 69 6f 6e | 73 2c 20 74 68 65 20 72 |pression|s, the r|
|00003810| 65 66 65 72 65 6e 63 65 | 73 0a 74 6f 20 7b 5c 69 |eference|s.to {\i|
|00003820| 74 20 70 6d 2d 65 78 70 | 72 65 73 73 69 6f 6e 7d |t pm-exp|ression}|
|00003830| 20 77 69 6c 6c 20 68 61 | 76 65 20 74 6f 20 62 65 | will ha|ve to be|
|00003840| 20 63 68 61 6e 67 65 64 | 20 74 6f 20 7b 5c 69 74 | changed| to {\it|
|00003850| 0a 70 6f 77 65 72 2d 65 | 78 70 72 65 73 73 69 6f |.power-e|xpressio|
|00003860| 6e 7d 2e 0a 0a 49 66 20 | 61 6e 20 7b 5c 69 74 20 |n}...If |an {\it |
|00003870| 6f 70 5c 2f 7d 7b 5c 74 | 74 20 3d 7d 20 6f 70 65 |op\/}{\t|t =} ope|
|00003880| 72 61 74 6f 72 20 66 6f | 72 20 65 78 70 6f 6e 65 |rator fo|r expone|
|00003890| 6e 74 69 61 74 69 6f 6e | 20 69 73 20 61 64 64 65 |ntiation| is adde|
|000038a0| 64 20 61 73 20 77 65 6c | 6c 0a 28 73 65 65 20 53 |d as wel|l.(see S|
|000038b0| 65 63 74 69 6f 6e 7e 5c | 72 65 66 7b 6f 70 2d 65 |ection~\|ref{op-e|
|000038c0| 71 75 61 6c 73 7d 29 2c | 20 69 74 20 77 69 6c 6c |quals}),| it will|
|000038d0| 20 68 61 76 65 20 74 6f | 20 62 65 20 69 6e 63 6c | have to| be incl|
|000038e0| 75 64 65 64 20 69 6e 20 | 74 68 65 20 6c 69 73 74 |uded in |the list|
|000038f0| 0a 6f 66 20 7b 5c 69 74 | 20 6f 70 5c 2f 7d 7b 5c |.of {\it| op\/}{\|
|00003900| 74 74 20 3d 7d 20 6f 70 | 65 72 61 74 6f 72 73 20 |tt =} op|erators |
|00003910| 61 74 20 74 68 65 20 62 | 65 67 69 6e 6e 69 6e 67 |at the b|eginning|
|00003920| 20 6f 66 20 5c 53 35 2e | 31 37 20 6f 66 20 74 68 | of \S5.|17 of th|
|00003930| 65 20 41 52 4d 2e 0a 0a | 5c 73 65 63 74 69 6f 6e |e ARM...|\section|
|00003940| 7b 52 61 74 69 6f 6e 61 | 6c 65 20 62 65 68 69 6e |{Rationa|le behin|
|00003950| 64 20 64 65 74 61 69 6c | 73 20 6f 66 20 74 68 65 |d detail|s of the|
|00003960| 20 70 72 6f 70 6f 73 61 | 6c 7d 20 20 5c 6c 61 62 | proposa|l} \lab|
|00003970| 65 6c 7b 72 61 74 69 6f | 6e 61 6c 65 7d 0a 5c 73 |el{ratio|nale}.\s|
|00003980| 75 62 73 65 63 74 69 6f | 6e 7b 47 65 6e 65 72 61 |ubsectio|n{Genera|
|00003990| 6c 20 64 69 73 63 75 73 | 73 69 6f 6e 7d 0a 0a 54 |l discus|sion}..T|
|000039a0| 68 65 20 70 72 69 6d 61 | 72 79 20 67 6f 61 6c 20 |he prima|ry goal |
|000039b0| 62 65 68 69 6e 64 20 74 | 68 69 73 20 70 72 6f 70 |behind t|his prop|
|000039c0| 6f 73 61 6c 20 69 73 20 | 74 6f 20 6d 61 6b 65 20 |osal is |to make |
|000039d0| 74 68 65 20 62 65 68 61 | 76 69 6f 72 20 6f 66 20 |the beha|vior of |
|000039e0| 74 68 65 0a 65 78 70 6f | 6e 65 6e 74 69 61 74 69 |the.expo|nentiati|
|000039f0| 6f 6e 20 6f 70 65 72 61 | 74 6f 72 20 61 73 20 75 |on opera|tor as u|
|00003a00| 6e 73 75 72 70 72 69 73 | 69 6e 67 20 61 73 20 70 |nsurpris|ing as p|
|00003a10| 6f 73 73 69 62 6c 65 2e | 20 20 53 70 65 63 69 66 |ossible.| Specif|
|00003a20| 69 63 61 6c 6c 79 2c 0a | 74 68 69 73 20 6d 65 61 |ically,.|this mea|
|00003a30| 6e 73 20 74 68 61 74 20 | 69 74 73 20 62 65 68 61 |ns that |its beha|
|00003a40| 76 69 6f 72 20 73 68 6f | 75 6c 64 20 62 65 20 63 |vior sho|uld be c|
|00003a50| 6f 6e 73 69 73 74 65 6e | 74 20 77 69 74 68 0a 5c |onsisten|t with.\|
|00003a60| 62 65 67 69 6e 7b 65 6e | 75 6d 65 72 61 74 65 7d |begin{en|umerate}|
|00003a70| 0a 5c 69 74 65 6d 20 54 | 68 65 20 6d 65 61 6e 69 |.\item T|he meani|
|00003a80| 6e 67 20 6f 66 20 65 78 | 70 6f 6e 65 6e 74 69 61 |ng of ex|ponentia|
|00003a90| 74 69 6f 6e 20 69 6e 20 | 6f 72 64 69 6e 61 72 79 |tion in |ordinary|
|00003aa0| 20 6d 61 74 68 65 6d 61 | 74 69 63 61 6c 20 6e 6f | mathema|tical no|
|00003ab0| 74 61 74 69 6f 6e 3b 0a | 5c 69 74 65 6d 20 54 68 |tation;.|\item Th|
|00003ac0| 65 20 62 65 68 61 76 69 | 6f 72 20 6f 66 20 65 78 |e behavi|or of ex|
|00003ad0| 70 6f 6e 65 6e 74 69 61 | 74 69 6f 6e 20 6f 70 65 |ponentia|tion ope|
|00003ae0| 72 61 74 6f 72 73 20 69 | 6e 20 6f 74 68 65 72 20 |rators i|n other |
|00003af0| 6c 61 6e 67 75 61 67 65 | 73 20 0a 20 20 20 20 20 |language|s . |
|00003b00| 20 28 70 61 72 74 69 63 | 75 6c 61 72 6c 79 20 7b | (partic|ularly {|
|00003b10| 5c 73 63 20 66 6f 72 74 | 72 61 6e 7d 29 3b 20 61 |\sc fort|ran}); a|
|00003b20| 6e 64 0a 5c 69 74 65 6d | 20 54 68 65 20 62 65 68 |nd.\item| The beh|
|00003b30| 61 76 69 6f 72 20 6f 66 | 20 6f 74 68 65 72 20 5c |avior of| other \|
|00003b40| 43 5c 20 6f 70 65 72 61 | 74 6f 72 73 2e 0a 5c 65 |C\ opera|tors..\e|
|00003b50| 6e 64 7b 65 6e 75 6d 65 | 72 61 74 65 7d 0a 4f 6e |nd{enume|rate}.On|
|00003b60| 63 65 20 74 68 65 73 65 | 20 64 65 73 69 67 6e 20 |ce these| design |
|00003b70| 67 6f 61 6c 73 20 61 72 | 65 20 61 63 63 65 70 74 |goals ar|e accept|
|00003b80| 65 64 2c 20 74 68 65 72 | 65 20 69 73 20 76 65 72 |ed, ther|e is ver|
|00003b90| 79 20 6c 69 74 74 6c 65 | 20 66 72 65 65 64 6f 6d |y little| freedom|
|00003ba0| 0a 72 65 6d 61 69 6e 69 | 6e 67 20 69 6e 20 63 68 |.remaini|ng in ch|
|00003bb0| 6f 6f 73 69 6e 67 20 68 | 6f 77 20 74 68 65 20 65 |oosing h|ow the e|
|00003bc0| 78 70 6f 6e 65 6e 74 69 | 61 74 69 6f 6e 20 6f 70 |xponenti|ation op|
|00003bd0| 65 72 61 74 6f 72 20 73 | 68 6f 75 6c 64 20 62 65 |erator s|hould be|
|00003be0| 68 61 76 65 3b 0a 69 6e | 20 61 6c 6d 6f 73 74 20 |have;.in| almost |
|00003bf0| 61 6c 6c 20 63 61 73 65 | 73 2c 20 6f 6e 6c 79 20 |all case|s, only |
|00003c00| 6f 6e 65 20 63 68 6f 69 | 63 65 20 69 73 20 72 65 |one choi|ce is re|
|00003c10| 61 73 6f 6e 61 62 6c 65 | 2e 0a 0a 5c 73 75 62 73 |asonable|...\subs|
|00003c20| 65 63 74 69 6f 6e 7b 54 | 68 65 20 6e 61 6d 65 20 |ection{T|he name |
|00003c30| 6f 66 20 74 68 65 20 6f | 70 65 72 61 74 6f 72 7d |of the o|perator}|
|00003c40| 0a 0a 4d 6f 73 74 20 6f | 74 68 65 72 20 6c 61 6e |..Most o|ther lan|
|00003c50| 67 75 61 67 65 73 20 75 | 73 65 20 7b 5c 74 74 20 |guages u|se {\tt |
|00003c60| 5e 7d 20 6f 72 20 7b 5c | 74 74 20 2a 2a 7d 20 61 |^} or {\|tt **} a|
|00003c70| 73 20 65 78 70 6f 6e 65 | 6e 74 69 61 74 69 6f 6e |s expone|ntiation|
|00003c80| 0a 6f 70 65 72 61 74 6f | 72 73 2e 20 20 4e 65 69 |.operato|rs. Nei|
|00003c90| 74 68 65 72 20 69 73 20 | 73 75 69 74 61 62 6c 65 |ther is |suitable|
|00003ca0| 20 66 6f 72 20 5c 43 2c | 20 73 69 6e 63 65 20 62 | for \C,| since b|
|00003cb0| 6f 74 68 20 61 6c 72 65 | 61 64 79 20 68 61 76 65 |oth alre|ady have|
|00003cc0| 20 76 65 72 79 0a 64 69 | 66 66 65 72 65 6e 74 20 | very.di|fferent |
|00003cd0| 6d 65 61 6e 69 6e 67 73 | 2e 20 20 57 65 20 6d 75 |meanings|. We mu|
|00003ce0| 73 74 20 74 68 65 72 65 | 66 6f 72 65 20 6c 6f 6f |st there|fore loo|
|00003cf0| 6b 20 66 6f 72 20 61 6c | 74 65 72 6e 61 74 69 76 |k for al|ternativ|
|00003d00| 65 20 6e 61 6d 65 73 2e | 0a 0a 54 68 65 20 6e 61 |e names.|..The na|
|00003d10| 6d 65 73 20 7b 5c 74 74 | 20 5c 40 7d 2c 20 7b 5c |mes {\tt| \@}, {\|
|00003d20| 74 74 20 21 7d 2c 20 7b | 5c 74 74 20 5e 5e 7d 2c |tt !}, {|\tt ^^},|
|00003d30| 20 7b 5c 74 74 20 5c 7e | 7d 2c 20 61 6e 64 20 7b | {\tt \~|}, and {|
|00003d40| 5c 74 74 20 2a 5e 7d 20 | 68 61 76 65 20 62 65 65 |\tt *^} |have bee|
|00003d50| 6e 0a 73 75 67 67 65 73 | 74 65 64 20 66 6f 72 20 |n.sugges|ted for |
|00003d60| 61 6e 20 65 78 70 6f 6e | 65 6e 74 69 61 74 69 6f |an expon|entiatio|
|00003d70| 6e 20 6f 70 65 72 61 74 | 6f 72 2e 20 20 4d 6f 73 |n operat|or. Mos|
|00003d80| 74 20 6f 66 20 74 68 65 | 73 65 20 61 72 65 0a 75 |t of the|se are.u|
|00003d90| 6e 73 75 69 74 61 62 6c | 65 2e 20 20 7b 5c 74 74 |nsuitabl|e. {\tt|
|00003da0| 20 5c 40 7d 20 63 61 6e | 6e 6f 74 20 62 65 20 75 | \@} can|not be u|
|00003db0| 73 65 64 2c 20 62 65 63 | 61 75 73 65 20 69 74 20 |sed, bec|ause it |
|00003dc0| 69 73 20 6e 6f 74 20 70 | 72 65 73 65 6e 74 20 69 |is not p|resent i|
|00003dd0| 6e 0a 6d 61 6e 79 20 63 | 6f 75 6e 74 72 69 65 73 |n.many c|ountries|
|00003de0| 27 20 63 68 61 72 61 63 | 74 65 72 20 73 65 74 73 |' charac|ter sets|
|00003df0| 2e 20 20 7b 5c 74 74 20 | 21 7d 20 61 6e 64 20 7b |. {\tt |!} and {|
|00003e00| 5c 74 74 20 5e 5e 7d 20 | 77 6f 75 6c 64 20 62 65 |\tt ^^} |would be|
|00003e10| 0a 70 6f 73 73 69 62 6c | 65 20 63 68 6f 69 63 65 |.possibl|e choice|
|00003e20| 73 2c 20 62 75 74 20 70 | 6f 6f 72 20 6f 6e 65 73 |s, but p|oor ones|
|00003e30| 2c 20 62 65 63 61 75 73 | 65 20 74 68 65 79 20 63 |, becaus|e they c|
|00003e40| 6f 75 6c 64 20 63 61 75 | 73 65 20 63 6f 6e 66 75 |ould cau|se confu|
|00003e50| 73 69 6f 6e 2e 0a 49 6e | 20 70 61 72 74 69 63 75 |sion..In| particu|
|00003e60| 6c 61 72 2c 20 7b 5c 74 | 74 20 21 7d 20 77 6f 75 |lar, {\t|t !} wou|
|00003e70| 6c 64 20 62 65 20 61 20 | 63 6f 6e 66 75 73 69 6e |ld be a |confusin|
|00003e80| 67 20 63 68 6f 69 63 65 | 20 62 65 63 61 75 73 65 |g choice| because|
|00003e90| 20 74 68 65 0a 63 6f 72 | 72 65 73 70 6f 6e 64 69 | the.cor|respondi|
|00003ea0| 6e 67 20 7b 5c 69 74 20 | 6f 70 5c 2f 7d 7b 5c 74 |ng {\it |op\/}{\t|
|00003eb0| 74 20 3d 7d 20 6f 70 65 | 72 61 74 6f 72 20 77 6f |t =} ope|rator wo|
|00003ec0| 75 6c 64 20 62 65 20 7b | 5c 74 74 20 21 3d 7d 2c |uld be {|\tt !=},|
|00003ed0| 20 77 68 69 63 68 2c 20 | 6f 66 0a 63 6f 75 72 73 | which, |of.cours|
|00003ee0| 65 2c 20 61 6c 72 65 61 | 64 79 20 68 61 73 20 61 |e, alrea|dy has a|
|00003ef0| 20 71 75 69 74 65 20 64 | 69 66 66 65 72 65 6e 74 | quite d|ifferent|
|00003f00| 20 6d 65 61 6e 69 6e 67 | 2e 20 20 28 54 68 65 20 | meaning|. (The |
|00003f10| 63 6f 6e 66 75 73 69 6f | 6e 20 77 6f 75 6c 64 0a |confusio|n would.|
|00003f20| 72 65 6d 61 69 6e 20 65 | 76 65 6e 20 69 66 20 69 |remain e|ven if i|
|00003f30| 74 20 77 61 73 20 64 65 | 63 69 64 65 64 20 6e 6f |t was de|cided no|
|00003f40| 74 20 74 6f 20 64 65 66 | 69 6e 65 20 61 6e 20 7b |t to def|ine an {|
|00003f50| 5c 69 74 20 6f 70 5c 2f | 7d 7b 5c 74 74 20 3d 7d |\it op\/|}{\tt =}|
|00003f60| 0a 6f 70 65 72 61 74 6f | 72 20 66 6f 72 20 65 78 |.operato|r for ex|
|00003f70| 70 6f 6e 65 6e 74 69 61 | 74 69 6f 6e 2e 29 20 20 |ponentia|tion.) |
|00003f80| 53 69 6d 69 6c 61 72 6c | 79 2c 20 7b 5c 74 74 20 |Similarl|y, {\tt |
|00003f90| 5e 5e 7d 20 77 6f 75 6c | 64 20 62 65 20 61 0a 63 |^^} woul|d be a.c|
|00003fa0| 6f 6e 66 75 73 69 6e 67 | 20 63 68 6f 69 63 65 20 |onfusing| choice |
|00003fb0| 62 65 63 61 75 73 65 20 | 70 72 6f 67 72 61 6d 6d |because |programm|
|00003fc0| 65 72 73 20 6d 69 67 68 | 74 2c 20 72 65 61 73 6f |ers migh|t, reaso|
|00003fd0| 6e 69 6e 67 20 62 79 20 | 61 6e 61 6c 6f 67 79 20 |ning by |analogy |
|00003fe0| 66 72 6f 6d 0a 7b 5c 74 | 74 20 20 5c 26 5c 26 7d |from.{\t|t \&\&}|
|00003ff0| 20 61 6e 64 20 7b 5c 74 | 74 20 7c 7c 7d 2c 20 65 | and {\t|t ||}, e|
|00004000| 78 70 65 63 74 20 69 74 | 20 74 6f 20 62 65 68 61 |xpect it| to beha|
|00004010| 76 65 20 61 73 20 61 0a | 6c 6f 67 69 63 61 6c 20 |ve as a.|logical |
|00004020| 65 78 63 6c 75 73 69 76 | 65 20 6f 72 2e 0a 0a 54 |exclusiv|e or...T|
|00004030| 68 65 20 72 65 6d 61 69 | 6e 69 6e 67 20 63 68 6f |he remai|ning cho|
|00004040| 69 63 65 73 2c 20 74 68 | 65 6e 2c 20 61 72 65 20 |ices, th|en, are |
|00004050| 7b 5c 74 74 20 2a 5e 7d | 20 61 6e 64 20 7b 5c 74 |{\tt *^}| and {\t|
|00004060| 74 20 5c 7e 7d 2e 20 20 | 4f 66 20 74 68 65 20 74 |t \~}. |Of the t|
|00004070| 77 6f 2c 0a 7b 5c 74 74 | 20 2a 5e 7d 20 69 73 20 |wo,.{\tt| *^} is |
|00004080| 70 72 65 66 65 72 61 62 | 6c 65 20 62 65 63 61 75 |preferab|le becau|
|00004090| 73 65 20 69 74 20 69 73 | 20 6d 6f 72 65 20 6d 6e |se it is| more mn|
|000040a0| 65 6d 6f 6e 69 63 3a 20 | 69 74 20 69 73 20 73 69 |emonic: |it is si|
|000040b0| 6d 69 6c 61 72 2c 0a 65 | 76 65 6e 20 74 68 6f 75 |milar,.e|ven thou|
|000040c0| 67 68 20 6e 6f 74 20 69 | 64 65 6e 74 69 63 61 6c |gh not i|dentical|
|000040d0| 2c 20 74 6f 20 74 68 65 | 20 65 78 70 6f 6e 65 6e |, to the| exponen|
|000040e0| 74 69 61 74 69 6f 6e 20 | 6f 70 65 72 61 74 6f 72 |tiation |operator|
|000040f0| 73 20 75 73 65 64 20 69 | 6e 0a 6f 74 68 65 72 20 |s used i|n.other |
|00004100| 6c 61 6e 67 75 61 67 65 | 73 2e 20 20 49 74 20 69 |language|s. It i|
|00004110| 73 20 61 6c 73 6f 20 70 | 72 65 66 65 72 61 62 6c |s also p|referabl|
|00004120| 65 20 62 65 63 61 75 73 | 65 20 69 74 20 69 73 20 |e becaus|e it is |
|00004130| 61 20 63 68 61 72 61 63 | 74 65 72 0a 73 65 71 75 |a charac|ter.sequ|
|00004140| 65 6e 63 65 20 74 68 61 | 74 20 64 6f 65 73 20 6e |ence tha|t does n|
|00004150| 6f 74 20 6f 63 63 75 72 | 20 69 6e 20 61 6e 79 20 |ot occur| in any |
|00004160| 65 78 69 73 74 69 6e 67 | 20 6c 65 67 61 6c 20 5c |existing| legal \|
|00004170| 43 5c 20 63 6f 64 65 3b | 20 6d 61 6b 69 6e 67 0a |C\ code;| making.|
|00004180| 74 68 69 73 20 65 78 74 | 65 6e 73 69 6f 6e 2c 20 |this ext|ension, |
|00004190| 74 68 65 6e 2c 20 63 61 | 6e 6e 6f 74 20 63 68 61 |then, ca|nnot cha|
|000041a0| 6e 67 65 20 74 68 65 20 | 6d 65 61 6e 69 6e 67 20 |nge the |meaning |
|000041b0| 6f 66 20 61 6e 79 20 63 | 75 72 72 65 6e 74 6c 79 |of any c|urrently|
|000041c0| 0a 77 6f 72 6b 69 6e 67 | 20 70 72 6f 67 72 61 6d |.working| program|
|000041d0| 2e 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 54 |...\subs|ection{T|
|000041e0| 79 70 65 73 20 6f 66 20 | 74 68 65 20 6f 70 65 72 |ypes of |the oper|
|000041f0| 61 6e 64 73 7d 0a 0a 41 | 73 20 65 6d 70 68 61 73 |ands}..A|s emphas|
|00004200| 69 7a 65 64 20 69 6e 20 | 53 65 63 74 69 6f 6e 7e |ized in |Section~|
|00004210| 5c 72 65 66 7b 69 6d 70 | 6f 72 74 61 6e 63 65 7d |\ref{imp|ortance}|
|00004220| 2c 20 74 68 65 20 6d 6f | 73 74 20 63 6f 6d 6d 6f |, the mo|st commo|
|00004230| 6e 0a 73 69 74 75 61 74 | 69 6f 6e 2c 20 62 79 20 |n.situat|ion, by |
|00004240| 66 61 72 2c 20 69 73 20 | 61 6e 20 65 78 70 72 65 |far, is |an expre|
|00004250| 73 73 69 6f 6e 20 6c 69 | 6b 65 20 7b 5c 74 74 20 |ssion li|ke {\tt |
|00004260| 78 20 2a 5e 20 33 7d 2c | 20 77 68 65 72 65 20 61 |x *^ 3},| where a|
|00004270| 0a 66 6c 6f 61 74 69 6e | 67 2d 70 6f 69 6e 74 20 |.floatin|g-point |
|00004280| 6e 75 6d 62 65 72 20 69 | 73 20 72 61 69 73 65 64 |number i|s raised|
|00004290| 20 74 6f 20 61 6e 20 69 | 6e 74 65 67 72 61 6c 20 | to an i|ntegral |
|000042a0| 70 6f 77 65 72 2e 20 20 | 45 76 65 6e 20 69 66 20 |power. |Even if |
|000042b0| 74 68 65 0a 6f 70 65 72 | 61 74 6f 72 20 5c 6f 70 |the.oper|ator \op|
|000042c0| 5c 20 77 65 72 65 20 6f | 6e 6c 79 20 64 65 66 69 |\ were o|nly defi|
|000042d0| 6e 65 64 20 66 6f 72 20 | 74 68 65 20 63 61 73 65 |ned for |the case|
|000042e0| 20 77 68 65 72 65 20 74 | 68 65 20 66 69 72 73 74 | where t|he first|
|000042f0| 20 6f 70 65 72 61 6e 64 | 0a 69 73 20 66 6c 6f 61 | operand|.is floa|
|00004300| 74 69 6e 67 2d 70 6f 69 | 6e 74 20 61 6e 64 20 74 |ting-poi|nt and t|
|00004310| 68 65 20 73 65 63 6f 6e | 64 20 69 73 20 69 6e 74 |he secon|d is int|
|00004320| 65 67 72 61 6c 2c 20 74 | 68 65 6e 2c 20 69 74 20 |egral, t|hen, it |
|00004330| 77 6f 75 6c 64 20 73 74 | 69 6c 6c 20 62 65 0a 75 |would st|ill be.u|
|00004340| 73 65 66 75 6c 3b 20 63 | 61 6c 6c 69 6e 67 20 61 |seful; c|alling a|
|00004350| 20 6c 69 62 72 61 72 79 | 20 66 75 6e 63 74 69 6f | library| functio|
|00004360| 6e 20 66 6f 72 20 74 68 | 65 20 72 65 6d 61 69 6e |n for th|e remain|
|00004370| 69 6e 67 20 63 61 73 65 | 73 20 77 6f 75 6c 64 20 |ing case|s would |
|00004380| 6e 6f 74 0a 62 65 20 61 | 6e 20 75 6e 64 75 65 20 |not.be a|n undue |
|00004390| 62 75 72 64 65 6e 2e 0a | 0a 54 68 65 20 72 65 61 |burden..|.The rea|
|000043a0| 73 6f 6e 20 77 68 79 20 | 49 20 68 61 76 65 20 70 |son why |I have p|
|000043b0| 72 6f 70 6f 73 65 64 20 | 61 20 6d 6f 72 65 20 67 |roposed |a more g|
|000043c0| 65 6e 65 72 61 6c 20 6f | 70 65 72 61 74 6f 72 20 |eneral o|perator |
|000043d0| 74 68 61 6e 20 74 68 61 | 74 20 69 73 0a 73 69 6d |than tha|t is.sim|
|000043e0| 70 6c 79 20 62 65 63 61 | 75 73 65 20 49 20 62 65 |ply beca|use I be|
|000043f0| 6c 69 65 76 65 20 74 68 | 61 74 20 73 75 63 68 20 |lieve th|at such |
|00004400| 61 20 72 65 73 74 72 69 | 63 74 69 6f 6e 20 77 6f |a restri|ction wo|
|00004410| 75 6c 64 20 62 65 20 63 | 6f 6e 66 75 73 69 6e 67 |uld be c|onfusing|
|00004420| 3b 0a 65 78 70 6f 6e 65 | 6e 74 69 61 74 69 6f 6e |;.expone|ntiation|
|00004430| 20 69 73 20 61 20 77 65 | 6c 6c 2d 64 65 66 69 6e | is a we|ll-defin|
|00004440| 65 64 20 6f 70 65 72 61 | 74 69 6f 6e 20 66 6f 72 |ed opera|tion for|
|00004450| 20 74 77 6f 20 66 6c 6f | 61 74 69 6e 67 2d 70 6f | two flo|ating-po|
|00004460| 69 6e 74 0a 6f 70 65 72 | 61 6e 64 73 2c 20 6f 72 |int.oper|ands, or|
|00004470| 20 74 77 6f 20 69 6e 74 | 65 67 72 61 6c 20 6f 70 | two int|egral op|
|00004480| 65 72 61 6e 64 73 2c 20 | 61 6e 64 20 6c 65 61 76 |erands, |and leav|
|00004490| 69 6e 67 20 69 74 20 75 | 6e 64 65 66 69 6e 65 64 |ing it u|ndefined|
|000044a0| 20 66 6f 72 20 74 68 65 | 73 65 0a 63 61 73 65 73 | for the|se.cases|
|000044b0| 20 77 6f 75 6c 64 20 62 | 65 20 77 69 74 68 6f 75 | would b|e withou|
|000044c0| 74 20 70 72 65 63 65 64 | 65 6e 74 20 69 6e 20 65 |t preced|ent in e|
|000044d0| 69 74 68 65 72 20 5c 43 | 5c 20 6f 72 20 61 6e 79 |ither \C|\ or any|
|000044e0| 20 6f 74 68 65 72 20 6c | 61 6e 67 75 61 67 65 2e | other l|anguage.|
|000044f0| 0a 46 75 72 74 68 65 72 | 6d 6f 72 65 2c 20 49 20 |.Further|more, I |
|00004500| 64 6f 20 6e 6f 74 20 73 | 65 65 20 61 6e 79 20 61 |do not s|ee any a|
|00004510| 64 76 61 6e 74 61 67 65 | 20 69 6e 20 6d 61 6b 69 |dvantage| in maki|
|00004520| 6e 67 20 74 68 69 73 20 | 72 65 73 74 72 69 63 74 |ng this |restrict|
|00004530| 69 6f 6e 3b 20 69 74 0a | 77 6f 75 6c 64 6e 27 74 |ion; it.|wouldn't|
|00004540| 20 6d 61 6b 65 20 69 6d | 70 6c 65 6d 65 6e 74 61 | make im|plementa|
|00004550| 74 69 6f 6e 20 6f 66 20 | 5c 6f 70 5c 20 73 69 67 |tion of |\op\ sig|
|00004560| 6e 69 66 69 63 61 6e 74 | 6c 79 20 65 61 73 69 65 |nificant|ly easie|
|00004570| 72 2e 0a 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |r...\sub|section{|
|00004580| 52 65 74 75 72 6e 20 74 | 79 70 65 7d 0a 0a 54 68 |Return t|ype}..Th|
|00004590| 65 20 66 69 72 73 74 20 | 69 73 73 75 65 20 74 6f |e first |issue to|
|000045a0| 20 64 69 73 63 75 73 73 | 20 69 73 20 74 68 65 20 | discuss| is the |
|000045b0| 67 65 6e 65 72 61 6c 20 | 72 75 6c 65 2c 20 74 68 |general |rule, th|
|000045c0| 61 74 20 74 68 65 20 72 | 65 74 75 72 6e 20 74 79 |at the r|eturn ty|
|000045d0| 70 65 0a 6f 66 20 61 6e | 20 65 78 70 72 65 73 73 |pe.of an| express|
|000045e0| 69 6f 6e 20 69 6e 76 6f | 6c 76 69 6e 67 20 5c 6f |ion invo|lving \o|
|000045f0| 70 5c 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 74 |p\ is th|e same t|
|00004600| 79 70 65 20 61 73 20 74 | 68 65 20 6f 70 65 72 61 |ype as t|he opera|
|00004610| 6e 64 73 2e 0a 53 70 65 | 63 69 66 69 63 61 6c 6c |nds..Spe|cificall|
|00004620| 79 2c 20 6f 6e 65 20 6d | 69 67 68 74 20 71 75 65 |y, one m|ight que|
|00004630| 73 74 69 6f 6e 20 77 68 | 65 74 68 65 72 20 74 68 |stion wh|ether th|
|00004640| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 7b 5c 74 |e expres|sion {\t|
|00004650| 74 20 6e 2a 5e 6d 7d 2c | 0a 77 68 65 72 65 20 7b |t n*^m},|.where {|
|00004660| 5c 74 74 20 6e 7d 20 61 | 6e 64 20 7b 5c 74 74 20 |\tt n} a|nd {\tt |
|00004670| 6d 7d 20 61 72 65 20 69 | 6e 74 65 67 65 72 73 2c |m} are i|ntegers,|
|00004680| 20 72 65 61 6c 6c 79 20 | 73 68 6f 75 6c 64 20 72 | really |should r|
|00004690| 65 74 75 72 6e 20 61 6e | 0a 69 6e 74 65 67 65 72 |eturn an|.integer|
|000046a0| 2e 20 20 0a 0a 54 68 65 | 72 65 20 61 72 65 20 74 |. ..The|re are t|
|000046b0| 77 6f 20 72 65 61 73 6f | 6e 73 20 77 68 79 20 74 |wo reaso|ns why t|
|000046c0| 68 69 73 20 65 78 70 72 | 65 73 73 69 6f 6e 20 73 |his expr|ession s|
|000046d0| 68 6f 75 6c 64 20 72 65 | 74 75 72 6e 20 61 6e 20 |hould re|turn an |
|000046e0| 69 6e 74 65 67 65 72 2e | 0a 46 69 72 73 74 2c 20 |integer.|.First, |
|000046f0| 74 68 69 73 20 69 73 20 | 74 68 65 20 6f 72 64 69 |this is |the ordi|
|00004700| 6e 61 72 79 20 72 75 6c | 65 20 69 6e 20 5c 43 5c |nary rul|e in \C\|
|00004710| 20 28 63 6f 6e 73 69 64 | 65 72 2c 20 66 6f 72 20 | (consid|er, for |
|00004720| 65 78 61 6d 70 6c 65 2c | 20 74 68 65 0a 65 78 70 |example,| the.exp|
|00004730| 72 65 73 73 69 6f 6e 20 | 7b 5c 74 74 20 31 2f 6e |ression |{\tt 1/n|
|00004740| 7d 29 2c 20 61 6e 64 20 | 70 72 6f 67 72 61 6d 6d |}), and |programm|
|00004750| 65 72 73 20 68 61 76 65 | 20 74 68 65 20 72 69 67 |ers have| the rig|
|00004760| 68 74 20 74 6f 20 65 78 | 70 65 63 74 20 73 6f 6d |ht to ex|pect som|
|00004770| 65 0a 64 65 67 72 65 65 | 20 6f 66 20 63 6f 6e 73 |e.degree| of cons|
|00004780| 69 73 74 65 6e 63 79 20 | 69 6e 20 74 68 65 20 6c |istency |in the l|
|00004790| 61 6e 67 75 61 67 65 2e | 20 20 53 65 63 6f 6e 64 |anguage.| Second|
|000047a0| 2c 20 74 68 69 73 20 62 | 65 68 61 76 69 6f 72 20 |, this b|ehavior |
|000047b0| 69 73 0a 63 6f 6e 73 69 | 73 74 65 6e 74 20 77 69 |is.consi|stent wi|
|000047c0| 74 68 20 74 68 65 20 62 | 65 68 61 76 69 6f 72 20 |th the b|ehavior |
|000047d0| 6f 66 20 74 68 65 20 7b | 5c 73 63 20 66 6f 72 74 |of the {|\sc fort|
|000047e0| 72 61 6e 7d 20 65 78 70 | 6f 6e 65 6e 74 69 61 74 |ran} exp|onentiat|
|000047f0| 69 6f 6e 0a 6f 70 65 72 | 61 74 6f 72 3b 20 61 67 |ion.oper|ator; ag|
|00004800| 61 69 6e 2c 20 70 72 6f | 67 72 61 6d 6d 65 72 73 |ain, pro|grammers|
|00004810| 20 68 61 76 65 20 74 68 | 65 20 72 69 67 68 74 20 | have th|e right |
|00004820| 74 6f 20 65 78 70 65 63 | 74 20 74 68 61 74 20 61 |to expec|t that a|
|00004830| 20 5c 43 5c 0a 65 78 70 | 6f 6e 65 6e 74 69 61 74 | \C\.exp|onentiat|
|00004840| 69 6f 6e 20 6f 70 65 72 | 61 74 6f 72 20 73 68 6f |ion oper|ator sho|
|00004850| 75 6c 64 20 62 65 68 61 | 76 65 20 73 69 6d 69 6c |uld beha|ve simil|
|00004860| 61 72 6c 79 20 74 6f 20 | 65 78 70 6f 6e 65 6e 74 |arly to |exponent|
|00004870| 69 61 74 69 6f 6e 0a 6f | 70 65 72 61 74 6f 72 73 |iation.o|perators|
|00004880| 20 69 6e 20 6f 74 68 65 | 72 20 6c 61 6e 67 75 61 | in othe|r langua|
|00004890| 67 65 73 2e 20 20 49 6e | 20 66 61 63 74 2c 20 7b |ges. In| fact, {|
|000048a0| 5c 73 63 20 66 6f 72 74 | 72 61 6e 7d 20 70 72 6f |\sc fort|ran} pro|
|000048b0| 67 72 61 6d 6d 65 72 73 | 20 64 6f 0a 73 6f 6d 65 |grammers| do.some|
|000048c0| 74 69 6d 65 73 20 6d 61 | 6b 65 20 75 73 65 20 6f |times ma|ke use o|
|000048d0| 66 20 74 68 69 73 20 70 | 72 6f 70 65 72 74 79 3b |f this p|roperty;|
|000048e0| 20 65 78 70 72 65 73 73 | 69 6f 6e 73 20 6c 69 6b | express|ions lik|
|000048f0| 65 20 7b 5c 74 74 20 28 | 2d 31 29 2a 2a 6e 7d 0a |e {\tt (|-1)**n}.|
|00004900| 61 72 65 20 6e 6f 74 20 | 75 6e 63 6f 6d 6d 6f 6e |are not |uncommon|
|00004910| 2e 0a 0a 54 68 65 20 70 | 72 6f 70 6f 73 61 6c 20 |...The p|roposal |
|00004920| 69 6e 20 53 65 63 74 69 | 6f 6e 7e 5c 72 65 66 7b |in Secti|on~\ref{|
|00004930| 70 72 6f 70 6f 73 61 6c | 7d 20 73 70 65 63 69 66 |proposal|} specif|
|00004940| 69 65 73 20 61 6e 20 65 | 78 63 65 70 74 69 6f 6e |ies an e|xception|
|00004950| 20 74 6f 20 74 68 65 0a | 75 73 75 61 6c 20 5c 43 | to the.|usual \C|
|00004960| 5c 20 72 75 6c 65 20 66 | 6f 72 20 65 76 61 6c 75 |\ rule f|or evalu|
|00004970| 61 74 69 6f 6e 20 6f 66 | 20 61 72 69 74 68 6d 65 |ation of| arithme|
|00004980| 74 69 63 20 6f 70 65 72 | 61 74 6f 72 73 3a 20 69 |tic oper|ators: i|
|00004990| 66 20 74 68 65 20 66 69 | 72 73 74 0a 6f 70 65 72 |f the fi|rst.oper|
|000049a0| 61 6e 64 20 6f 66 20 5c | 6f 70 5c 20 69 73 20 61 |and of \|op\ is a|
|000049b0| 20 66 6c 6f 61 74 69 6e | 67 2d 70 6f 69 6e 74 20 | floatin|g-point |
|000049c0| 74 79 70 65 20 61 6e 64 | 20 74 68 65 20 73 65 63 |type and| the sec|
|000049d0| 6f 6e 64 20 69 73 20 61 | 6e 20 69 6e 74 65 67 72 |ond is a|n integr|
|000049e0| 61 6c 0a 74 79 70 65 2c | 20 74 68 65 6e 20 74 68 |al.type,| then th|
|000049f0| 65 20 72 65 74 75 72 6e | 20 74 79 70 65 20 69 73 |e return| type is|
|00004a00| 20 74 68 61 74 20 6f 66 | 20 74 68 65 20 66 69 72 | that of| the fir|
|00004a10| 73 74 20 6f 70 65 72 61 | 6e 64 2c 20 62 75 74 20 |st opera|nd, but |
|00004a20| 74 68 65 0a 73 65 63 6f | 6e 64 20 6f 70 65 72 61 |the.seco|nd opera|
|00004a30| 6e 64 20 69 73 20 6e 6f | 74 20 70 72 6f 6d 6f 74 |nd is no|t promot|
|00004a40| 65 64 20 74 6f 20 74 68 | 65 20 73 61 6d 65 20 74 |ed to th|e same t|
|00004a50| 79 70 65 20 61 73 20 74 | 68 65 20 66 69 72 73 74 |ype as t|he first|
|00004a60| 2e 20 20 54 68 69 73 0a | 62 65 68 61 76 69 6f 72 |. This.|behavior|
|00004a70| 20 69 73 20 63 6f 6e 73 | 69 73 74 65 6e 74 20 77 | is cons|istent w|
|00004a80| 69 74 68 20 74 68 61 74 | 20 6f 66 20 74 68 65 20 |ith that| of the |
|00004a90| 7b 5c 73 63 20 66 6f 72 | 74 72 61 6e 7d 20 65 78 |{\sc for|tran} ex|
|00004aa0| 70 6f 6e 65 6e 74 69 61 | 74 69 6f 6e 0a 6f 70 65 |ponentia|tion.ope|
|00004ab0| 72 61 74 6f 72 2c 20 61 | 6e 64 20 69 74 20 69 73 |rator, a|nd it is|
|00004ac0| 20 61 6e 20 65 73 73 65 | 6e 74 69 61 6c 20 70 61 | an esse|ntial pa|
|00004ad0| 72 74 20 6f 66 20 74 68 | 69 73 20 70 72 6f 70 6f |rt of th|is propo|
|00004ae0| 73 61 6c 2e 20 20 54 68 | 65 20 69 6e 74 65 6e 74 |sal. Th|e intent|
|00004af0| 20 69 73 0a 74 68 61 74 | 20 69 66 20 7b 5c 74 74 | is.that| if {\tt|
|00004b00| 20 78 7d 20 69 73 20 61 | 20 76 61 72 69 61 62 6c | x} is a| variabl|
|00004b10| 65 20 6f 66 20 73 6f 6d | 65 20 66 6c 6f 61 74 69 |e of som|e floati|
|00004b20| 6e 67 2d 70 6f 69 6e 74 | 20 74 79 70 65 2c 20 61 |ng-point| type, a|
|00004b30| 20 63 6f 6d 70 69 6c 65 | 72 0a 6d 61 79 20 67 65 | compile|r.may ge|
|00004b40| 6e 65 72 61 74 65 20 64 | 69 66 66 65 72 65 6e 74 |nerate d|ifferent|
|00004b50| 20 63 6f 64 65 20 66 6f | 72 20 74 68 65 20 65 78 | code fo|r the ex|
|00004b60| 70 72 65 73 73 69 6f 6e | 20 7b 5c 74 74 20 78 20 |pression| {\tt x |
|00004b70| 2a 5e 20 33 7d 20 74 68 | 61 6e 20 66 6f 72 0a 74 |*^ 3} th|an for.t|
|00004b80| 68 65 20 65 78 70 72 65 | 73 73 69 6f 6e 20 7b 5c |he expre|ssion {\|
|00004b90| 74 74 20 78 20 2a 5e 20 | 33 2e 30 7d 2e 0a 0a 41 |tt x *^ |3.0}...A|
|00004ba0| 73 20 65 6d 70 68 61 73 | 69 7a 65 64 20 69 6e 20 |s emphas|ized in |
|00004bb0| 53 65 63 74 69 6f 6e 7e | 5c 72 65 66 7b 6a 75 73 |Section~|\ref{jus|
|00004bc0| 74 69 66 69 63 61 74 69 | 6f 6e 7d 2c 20 74 68 65 |tificati|on}, the|
|00004bd0| 20 70 72 69 6d 61 72 79 | 20 75 73 65 20 66 6f 72 | primary| use for|
|00004be0| 20 61 6e 0a 65 78 70 6f | 6e 65 6e 74 69 61 74 69 | an.expo|nentiati|
|00004bf0| 6f 6e 20 6f 70 65 72 61 | 74 6f 72 20 69 73 20 72 |on opera|tor is r|
|00004c00| 61 69 73 69 6e 67 20 61 | 20 6e 75 6d 62 65 72 20 |aising a| number |
|00004c10| 74 6f 20 61 20 73 6d 61 | 6c 6c 20 69 6e 74 65 67 |to a sma|ll integ|
|00004c20| 72 61 6c 20 70 6f 77 65 | 72 0a 77 68 69 63 68 20 |ral powe|r.which |
|00004c30| 69 73 20 6b 6e 6f 77 6e | 20 61 74 20 63 6f 6d 70 |is known| at comp|
|00004c40| 69 6c 65 20 74 69 6d 65 | 2e 20 20 41 20 67 6f 6f |ile time|. A goo|
|00004c50| 64 20 7b 5c 73 63 20 66 | 6f 72 74 72 61 6e 7d 20 |d {\sc f|ortran} |
|00004c60| 63 6f 6d 70 69 6c 65 72 | 20 63 61 6e 20 62 65 0a |compiler| can be.|
|00004c70| 65 78 70 65 63 74 65 64 | 20 74 6f 20 6f 70 74 69 |expected| to opti|
|00004c80| 6d 69 7a 65 20 61 6e 20 | 65 78 70 72 65 73 73 69 |mize an |expressi|
|00004c90| 6f 6e 20 6c 69 6b 65 20 | 7b 5c 74 74 20 78 20 2a |on like |{\tt x *|
|00004ca0| 2a 20 34 7d 20 74 6f 20 | 74 77 6f 0a 66 6c 6f 61 |* 4} to |two.floa|
|00004cb0| 74 69 6e 67 2d 70 6f 69 | 6e 74 20 6d 75 6c 74 69 |ting-poi|nt multi|
|00004cc0| 70 6c 69 65 73 2c 20 61 | 6e 64 20 74 68 65 20 69 |plies, a|nd the i|
|00004cd0| 6e 74 65 6e 74 20 6f 66 | 20 74 68 69 73 20 70 72 |ntent of| this pr|
|00004ce0| 6f 70 6f 73 61 6c 20 69 | 73 20 74 68 61 74 20 61 |oposal i|s that a|
|00004cf0| 0a 67 6f 6f 64 20 5c 43 | 5c 20 63 6f 6d 70 69 6c |.good \C|\ compil|
|00004d00| 65 72 20 73 68 6f 75 6c | 64 20 62 65 20 61 62 6c |er shoul|d be abl|
|00004d10| 65 20 74 6f 20 70 65 72 | 66 6f 72 6d 20 74 68 61 |e to per|form tha|
|00004d20| 74 20 73 61 6d 65 20 6f | 70 74 69 6d 69 7a 61 74 |t same o|ptimizat|
|00004d30| 69 6f 6e 20 66 6f 72 0a | 74 68 65 20 65 78 70 72 |ion for.|the expr|
|00004d40| 65 73 73 69 6f 6e 20 7b | 5c 74 74 20 78 20 2a 5e |ession {|\tt x *^|
|00004d50| 20 34 7d 2e 0a 0a 5c 73 | 75 62 73 65 63 74 69 6f | 4}...\s|ubsectio|
|00004d60| 6e 7b 44 6f 6d 61 69 6e | 20 65 72 72 6f 72 73 7d |n{Domain| errors}|
|00004d70| 0a 0a 54 68 65 20 63 6f | 6e 64 69 74 69 6f 6e 73 |..The co|nditions|
|00004d80| 20 77 68 69 63 68 20 61 | 72 65 20 69 64 65 6e 74 | which a|re ident|
|00004d90| 69 66 69 65 64 20 69 6e | 20 53 65 63 74 69 6f 6e |ified in| Section|
|00004da0| 7e 5c 72 65 66 7b 70 72 | 6f 70 6f 73 61 6c 7d 20 |~\ref{pr|oposal} |
|00004db0| 61 73 0a 64 6f 6d 61 69 | 6e 20 65 72 72 6f 72 73 |as.domai|n errors|
|00004dc0| 20 61 72 65 20 74 68 6f | 73 65 20 66 6f 72 20 77 | are tho|se for w|
|00004dd0| 68 69 63 68 2c 20 6d 61 | 74 68 65 6d 61 74 69 63 |hich, ma|thematic|
|00004de0| 61 6c 6c 79 2c 20 74 68 | 65 20 72 65 73 75 6c 74 |ally, th|e result|
|00004df0| 20 6f 66 20 61 6e 0a 65 | 78 70 6f 6e 65 6e 74 69 | of an.e|xponenti|
|00004e00| 61 74 69 6f 6e 20 69 73 | 20 65 69 74 68 65 72 20 |ation is| either |
|00004e10| 61 20 63 6f 6d 70 6c 65 | 78 20 6e 75 6d 62 65 72 |a comple|x number|
|00004e20| 20 6f 72 20 69 73 20 75 | 6e 64 65 66 69 6e 65 64 | or is u|ndefined|
|00004e30| 2e 20 20 0a 0a 4f 6e 65 | 20 6d 69 67 68 74 20 61 |. ..One| might a|
|00004e40| 72 67 75 65 20 74 68 61 | 74 20 61 6e 20 65 78 70 |rgue tha|t an exp|
|00004e50| 72 65 73 73 69 6f 6e 20 | 6c 69 6b 65 20 7b 5c 74 |ression |like {\t|
|00004e60| 74 20 28 2d 31 29 20 2a | 5e 20 30 2e 35 7d 20 73 |t (-1) *|^ 0.5} s|
|00004e70| 68 6f 75 6c 64 20 72 65 | 74 75 72 6e 0a 61 20 63 |hould re|turn.a c|
|00004e80| 6f 6d 70 6c 65 78 20 72 | 65 73 75 6c 74 20 69 6e |omplex r|esult in|
|00004e90| 73 74 65 61 64 20 6f 66 | 20 62 65 69 6e 67 20 61 |stead of| being a|
|00004ea0| 6e 20 65 72 72 6f 72 3b | 20 74 68 69 73 20 77 6f |n error;| this wo|
|00004eb0| 75 6c 64 2c 20 68 6f 77 | 65 76 65 72 2c 20 62 65 |uld, how|ever, be|
|00004ec0| 20 61 0a 6d 69 73 74 61 | 6b 65 2e 20 20 46 69 72 | a.mista|ke. Fir|
|00004ed0| 73 74 2c 20 5c 43 5c 20 | 68 61 73 20 6e 6f 20 63 |st, \C\ |has no c|
|00004ee0| 6f 6d 70 6c 65 78 20 64 | 61 74 61 20 74 79 70 65 |omplex d|ata type|
|00004ef0| 3b 20 69 74 20 77 6f 75 | 6c 64 20 62 65 20 61 20 |; it wou|ld be a |
|00004f00| 76 65 72 79 20 70 6f 6f | 72 0a 64 65 73 69 67 6e |very poo|r.design|
|00004f10| 20 64 65 63 69 73 69 6f | 6e 20 69 66 20 61 20 66 | decisio|n if a f|
|00004f20| 65 61 74 75 72 65 20 6f | 66 20 74 68 65 20 6c 61 |eature o|f the la|
|00004f30| 6e 67 75 61 67 65 20 69 | 74 73 65 6c 66 20 64 65 |nguage i|tself de|
|00004f40| 70 65 6e 64 65 64 20 6f | 6e 20 74 68 65 0a 69 6e |pended o|n the.in|
|00004f50| 63 6c 75 73 69 6f 6e 20 | 6f 66 20 73 6f 6d 65 20 |clusion |of some |
|00004f60| 63 6c 61 73 73 20 6c 69 | 62 72 61 72 79 2e 20 20 |class li|brary. |
|00004f70| 53 65 63 6f 6e 64 2c 20 | 5c 43 5c 20 69 73 20 61 |Second, |\C\ is a|
|00004f80| 20 73 74 72 6f 6e 67 6c | 79 20 74 79 70 65 64 0a | strongl|y typed.|
|00004f90| 6c 61 6e 67 75 61 67 65 | 2c 20 61 6e 64 20 74 68 |language|, and th|
|00004fa0| 65 20 74 79 70 65 20 73 | 79 73 74 65 6d 20 63 61 |e type s|ystem ca|
|00004fb0| 6e 6e 6f 74 20 61 63 63 | 6f 6d 6d 6f 64 61 74 65 |nnot acc|ommodate|
|00004fc0| 20 61 6e 20 6f 70 65 72 | 61 74 6f 72 20 77 68 69 | an oper|ator whi|
|00004fd0| 63 68 0a 63 6f 75 6c 64 | 20 72 65 74 75 72 6e 20 |ch.could| return |
|00004fe0| 65 69 74 68 65 72 20 61 | 20 7b 5c 74 74 20 64 6f |either a| {\tt do|
|00004ff0| 75 62 6c 65 7d 20 6f 72 | 20 61 20 7b 5c 74 74 20 |uble} or| a {\tt |
|00005000| 43 6f 6d 70 6c 65 78 7d | 20 64 65 70 65 6e 64 69 |Complex}| dependi|
|00005010| 6e 67 20 6f 6e 20 74 68 | 65 0a 76 61 6c 75 65 73 |ng on th|e.values|
|00005020| 20 6f 66 20 74 68 65 20 | 6f 70 65 72 61 6e 64 73 | of the |operands|
|00005030| 2e 20 20 46 69 6e 61 6c | 6c 79 2c 20 65 76 65 6e |. Final|ly, even|
|00005040| 20 69 6e 20 7b 5c 73 63 | 20 66 6f 72 74 72 61 6e | in {\sc| fortran|
|00005050| 7d 2c 20 77 68 69 63 68 | 20 64 6f 65 73 0a 68 61 |}, which| does.ha|
|00005060| 76 65 20 61 20 63 6f 6d | 70 6c 65 78 20 64 61 74 |ve a com|plex dat|
|00005070| 61 20 74 79 70 65 2c 20 | 74 68 65 20 65 78 70 72 |a type, |the expr|
|00005080| 65 73 73 69 6f 6e 20 7b | 5c 74 74 20 28 2d 31 29 |ession {|\tt (-1)|
|00005090| 20 2a 2a 20 30 2e 35 7d | 20 69 73 20 61 6e 20 65 | ** 0.5}| is an e|
|000050a0| 72 72 6f 72 3b 0a 75 73 | 65 72 73 20 6f 66 20 7b |rror;.us|ers of {|
|000050b0| 5c 73 63 20 66 6f 72 74 | 72 61 6e 7d 20 77 68 6f |\sc fort|ran} who|
|000050c0| 20 77 61 6e 74 20 63 6f | 6d 70 6c 65 78 20 72 65 | want co|mplex re|
|000050d0| 73 75 6c 74 73 20 6d 75 | 73 74 20 70 72 6f 76 69 |sults mu|st provi|
|000050e0| 64 65 20 63 6f 6d 70 6c | 65 78 0a 6f 70 65 72 61 |de compl|ex.opera|
|000050f0| 6e 64 73 2e 20 0a 0a 4e | 6f 74 65 20 74 68 61 74 |nds. ..N|ote that|
|00005100| 20 74 68 69 73 20 70 72 | 6f 70 6f 73 61 6c 20 64 | this pr|oposal d|
|00005110| 6f 65 73 20 6e 6f 74 20 | 73 70 65 63 69 66 79 20 |oes not |specify |
|00005120| 74 68 65 20 72 75 6e 2d | 74 69 6d 65 20 62 65 68 |the run-|time beh|
|00005130| 61 76 69 6f 72 20 6f 66 | 20 61 0a 70 72 6f 67 72 |avior of| a.progr|
|00005140| 61 6d 20 77 68 69 63 68 | 20 63 6f 6e 74 61 69 6e |am which| contain|
|00005150| 73 20 61 20 64 6f 6d 61 | 69 6e 20 65 72 72 6f 72 |s a doma|in error|
|00005160| 2e 20 20 54 68 69 73 20 | 69 73 20 63 6f 6e 73 69 |. This |is consi|
|00005170| 73 74 65 6e 74 20 77 69 | 74 68 20 77 68 61 74 0a |stent wi|th what.|
|00005180| 74 68 65 20 53 74 61 6e | 64 61 72 64 20 63 75 72 |the Stan|dard cur|
|00005190| 72 65 6e 74 6c 79 20 73 | 61 79 73 20 61 62 6f 75 |rently s|ays abou|
|000051a0| 74 20 74 68 65 20 74 72 | 65 61 74 6d 65 6e 74 20 |t the tr|eatment |
|000051b0| 6f 66 20 64 6f 6d 61 69 | 6e 20 65 72 72 6f 72 73 |of domai|n errors|
|000051c0| 20 28 7b 5c 69 74 0a 65 | 2e 67 2e 7d 2c 20 7b 5c | ({\it.e|.g.}, {\|
|000051d0| 74 74 20 78 2f 30 7d 29 | 20 61 6e 64 20 6f 76 65 |tt x/0})| and ove|
|000051e0| 72 66 6c 6f 77 73 2e 20 | 20 49 6e 20 62 6f 74 68 |rflows. | In both|
|000051f0| 20 63 61 73 65 73 2c 20 | 69 6d 70 6c 65 6d 65 6e | cases, |implemen|
|00005200| 74 61 74 69 6f 6e 73 0a | 73 68 6f 75 6c 64 20 62 |tations.|should b|
|00005210| 65 20 66 72 65 65 20 74 | 6f 20 64 6f 20 77 68 61 |e free t|o do wha|
|00005220| 74 65 76 65 72 20 69 73 | 20 72 65 61 73 6f 6e 61 |tever is| reasona|
|00005230| 62 6c 65 20 66 6f 72 20 | 74 68 65 20 73 70 65 63 |ble for |the spec|
|00005240| 69 66 69 63 20 68 61 72 | 64 77 61 72 65 0a 61 6e |ific har|dware.an|
|00005250| 64 20 6f 70 65 72 61 74 | 69 6e 67 20 65 6e 76 69 |d operat|ing envi|
|00005260| 72 6f 6e 6d 65 6e 74 2e | 20 20 53 6f 6d 65 20 72 |ronment.| Some r|
|00005270| 65 61 73 6f 6e 61 62 6c | 65 20 63 68 6f 69 63 65 |easonabl|e choice|
|00005280| 73 20 6d 69 67 68 74 20 | 62 65 20 72 65 74 75 72 |s might |be retur|
|00005290| 6e 69 6e 67 0a 61 20 7b | 5c 74 74 20 4e 61 4e 7d |ning.a {|\tt NaN}|
|000052a0| 2c 20 6f 72 20 72 61 69 | 73 69 6e 67 20 61 6e 20 |, or rai|sing an |
|000052b0| 65 78 63 65 70 74 69 6f | 6e 2c 20 6f 72 20 70 72 |exceptio|n, or pr|
|000052c0| 69 6e 74 69 6e 67 20 61 | 20 64 69 61 67 6e 6f 73 |inting a| diagnos|
|000052d0| 74 69 63 20 61 6e 64 0a | 74 65 72 6d 69 6e 61 74 |tic and.|terminat|
|000052e0| 69 6e 67 20 70 72 6f 67 | 72 61 6d 20 65 78 65 63 |ing prog|ram exec|
|000052f0| 75 74 69 6f 6e 2e 0a 0a | 5c 73 75 62 73 65 63 74 |ution...|\subsect|
|00005300| 69 6f 6e 7b 30 20 5c 6f | 70 5c 20 30 7d 0a 20 20 |ion{0 \o|p\ 0}. |
|00005310| 20 20 5c 63 61 74 63 6f | 64 65 60 5c 5e 3d 37 0a | \catco|de`\^=7.|
|00005320| 4d 61 74 68 65 6d 61 74 | 69 63 61 6c 6c 79 2c 20 |Mathemat|ically, |
|00005330| 74 68 65 20 6d 65 61 6e | 69 6e 67 20 6f 66 20 24 |the mean|ing of $|
|00005340| 30 5e 30 24 20 64 65 70 | 65 6e 64 73 20 6f 6e 20 |0^0$ dep|ends on |
|00005350| 68 6f 77 20 74 68 69 73 | 20 65 78 70 72 65 73 73 |how this| express|
|00005360| 69 6f 6e 20 69 73 0a 69 | 6e 74 65 72 70 72 65 74 |ion is.i|nterpret|
|00005370| 65 64 3b 20 6f 6e 65 20 | 6d 69 67 68 74 20 73 65 |ed; one |might se|
|00005380| 6e 73 69 62 6c 79 20 69 | 6d 61 67 69 6e 65 20 69 |nsibly i|magine i|
|00005390| 74 20 74 6f 20 6d 65 61 | 6e 0a 5c 5b 20 5c 6c 69 |t to mea|n.\[ \li|
|000053a0| 6d 5f 7b 78 20 5c 72 69 | 67 68 74 61 72 72 6f 77 |m_{x \ri|ghtarrow|
|000053b0| 20 30 7d 20 78 5e 78 2c | 5c 5d 20 0a 5c 5b 20 5c | 0} x^x,|\] .\[ \|
|000053c0| 6c 69 6d 5f 7b 78 20 5c | 72 69 67 68 74 61 72 72 |lim_{x \|rightarr|
|000053d0| 6f 77 20 30 7d 20 78 5e | 30 2c 5c 5d 20 0a 5c 5b |ow 0} x^|0,\] .\[|
|000053e0| 20 5c 6c 69 6d 5f 7b 78 | 20 5c 72 69 67 68 74 61 | \lim_{x| \righta|
|000053f0| 72 72 6f 77 20 30 5e 2b | 7d 20 30 5e 78 2c 5c 5d |rrow 0^+|} 0^x,\]|
|00005400| 20 0a 6f 72 20 73 65 76 | 65 72 61 6c 20 6f 74 68 | .or sev|eral oth|
|00005410| 65 72 20 70 6f 73 73 69 | 62 69 6c 69 74 69 65 73 |er possi|bilities|
|00005420| 2e 20 20 54 68 65 20 76 | 61 6c 75 65 73 20 6f 66 |. The v|alues of|
|00005430| 20 74 68 65 73 65 20 65 | 78 70 72 65 73 73 69 6f | these e|xpressio|
|00005440| 6e 73 20 61 72 65 0a 64 | 69 66 66 65 72 65 6e 74 |ns are.d|ifferent|
|00005450| 2e 20 20 41 20 63 6f 6d | 70 75 74 65 72 20 6c 61 |. A com|puter la|
|00005460| 6e 67 75 61 67 65 2c 20 | 74 68 65 6e 2c 20 6d 69 |nguage, |then, mi|
|00005470| 67 68 74 20 70 6c 61 75 | 73 69 62 6c 79 20 63 6f |ght plau|sibly co|
|00005480| 6d 70 75 74 65 20 74 68 | 65 0a 76 61 6c 75 65 20 |mpute th|e.value |
|00005490| 6f 66 20 74 68 69 73 20 | 65 78 70 72 65 73 73 69 |of this |expressi|
|000054a0| 6f 6e 20 61 73 20 24 30 | 24 2c 20 6f 72 20 61 73 |on as $0|$, or as|
|000054b0| 20 24 31 24 2c 20 6f 72 | 20 74 72 65 61 74 20 69 | $1$, or| treat i|
|000054c0| 74 20 61 73 20 61 20 64 | 6f 6d 61 69 6e 0a 65 72 |t as a d|omain.er|
|000054d0| 72 6f 72 2e 20 20 28 49 | 6e 20 7b 5c 73 63 20 66 |ror. (I|n {\sc f|
|000054e0| 6f 72 74 72 61 6e 7d 2c | 20 74 68 69 73 20 65 78 |ortran},| this ex|
|000054f0| 70 72 65 73 73 69 6f 6e | 20 69 73 20 61 6e 20 65 |pression| is an e|
|00005500| 72 72 6f 72 2e 29 0a 5c | 63 61 74 63 6f 64 65 60 |rror.).\|catcode`|
|00005510| 5c 5e 3d 31 31 0a 0a 49 | 74 20 69 73 20 63 6f 6e |\^=11..I|t is con|
|00005520| 73 69 73 74 65 6e 74 20 | 77 69 74 68 20 74 68 65 |sistent |with the|
|00005530| 20 73 70 69 72 69 74 20 | 6f 66 20 5c 43 5c 20 74 | spirit |of \C\ t|
|00005540| 6f 20 6c 65 61 76 65 20 | 74 68 69 73 20 63 68 6f |o leave |this cho|
|00005550| 69 63 65 20 75 70 20 74 | 6f 20 74 68 65 0a 63 6f |ice up t|o the.co|
|00005560| 6d 70 69 6c 65 72 20 77 | 72 69 74 65 72 3b 20 63 |mpiler w|riter; c|
|00005570| 6f 6d 70 61 72 65 2c 20 | 66 6f 72 20 65 78 61 6d |ompare, |for exam|
|00005580| 70 6c 65 2c 20 74 68 65 | 20 73 69 67 6e 20 6f 66 |ple, the| sign of|
|00005590| 20 7b 5c 74 74 20 5c 25 | 7d 20 77 68 65 6e 20 6f | {\tt \%|} when o|
|000055a0| 6e 65 0a 6f 70 65 72 61 | 6e 64 20 69 73 20 6e 65 |ne.opera|nd is ne|
|000055b0| 67 61 74 69 76 65 2e 20 | 20 41 73 20 77 69 74 68 |gative. | As with|
|000055c0| 20 7b 5c 74 74 20 5c 25 | 7d 2c 20 6f 6e 65 20 6d | {\tt \%|}, one m|
|000055d0| 6f 74 69 76 65 20 66 6f | 72 20 73 70 65 63 69 66 |otive fo|r specif|
|000055e0| 79 69 6e 67 20 74 68 61 | 74 0a 74 68 69 73 20 62 |ying tha|t.this b|
|000055f0| 65 68 61 76 69 6f 72 20 | 69 73 20 69 6d 70 6c 65 |ehavior |is imple|
|00005600| 6d 65 6e 74 61 74 69 6f | 6e 2d 64 65 70 65 6e 64 |mentatio|n-depend|
|00005610| 65 6e 74 20 69 73 20 74 | 6f 20 61 6c 6c 6f 77 20 |ent is t|o allow |
|00005620| 63 6f 6d 70 69 6c 65 72 | 20 77 72 69 74 65 72 73 |compiler| writers|
|00005630| 0a 74 6f 20 6d 61 6b 65 | 20 65 66 66 69 63 69 65 |.to make| efficie|
|00005640| 6e 74 20 75 73 65 20 6f | 66 20 77 68 61 74 65 76 |nt use o|f whatev|
|00005650| 65 72 20 68 61 72 64 77 | 61 72 65 20 66 65 61 74 |er hardw|are feat|
|00005660| 75 72 65 73 20 61 72 65 | 20 70 72 65 73 65 6e 74 |ures are| present|
|00005670| 2e 0a 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 41 |...\subs|ection{A|
|00005680| 73 73 6f 63 69 61 74 69 | 76 69 74 79 7d 09 5c 6c |ssociati|vity}.\l|
|00005690| 61 62 65 6c 7b 61 73 73 | 6f 63 69 61 74 69 76 69 |abel{ass|ociativi|
|000056a0| 74 79 7d 0a 0a 55 6e 70 | 61 72 65 6e 74 68 65 73 |ty}..Unp|arenthes|
|000056b0| 69 7a 65 64 20 65 78 70 | 72 65 73 73 69 6f 6e 73 |ized exp|ressions|
|000056c0| 20 69 6e 76 6f 6c 76 69 | 6e 67 20 74 77 6f 20 65 | involvi|ng two e|
|000056d0| 78 70 6f 6e 65 6e 74 69 | 61 74 69 6f 6e 20 6f 70 |xponenti|ation op|
|000056e0| 65 72 61 74 6f 72 73 20 | 61 72 65 0a 6e 6f 74 20 |erators |are.not |
|000056f0| 76 65 72 79 20 63 6f 6d | 6d 6f 6e 2c 20 73 6f 20 |very com|mon, so |
|00005700| 74 68 69 73 20 63 68 6f | 69 63 65 20 69 73 6e 27 |this cho|ice isn'|
|00005710| 74 20 61 20 6d 61 74 74 | 65 72 20 6f 66 20 74 65 |t a matt|er of te|
|00005720| 72 72 69 62 6c 79 20 67 | 72 65 61 74 0a 69 6d 70 |rribly g|reat.imp|
|00005730| 6f 72 74 61 6e 63 65 2e | 20 20 46 6f 72 20 74 68 |ortance.| For th|
|00005740| 65 20 73 61 6b 65 20 6f | 66 20 63 6f 6e 73 69 73 |e sake o|f consis|
|00005750| 74 65 6e 63 79 2c 20 69 | 74 20 69 73 20 62 65 73 |tency, i|t is bes|
|00005760| 74 20 74 6f 20 66 6f 6c | 6c 6f 77 20 74 68 65 0a |t to fol|low the.|
|00005770| 70 72 65 63 65 64 65 6e | 74 20 6f 66 20 7b 5c 73 |preceden|t of {\s|
|00005780| 63 20 66 6f 72 74 72 61 | 6e 7d 2c 20 77 68 65 72 |c fortra|n}, wher|
|00005790| 65 20 74 68 65 20 65 78 | 70 6f 6e 65 6e 74 69 61 |e the ex|ponentia|
|000057a0| 74 69 6f 6e 20 6f 70 65 | 72 61 74 6f 72 20 62 69 |tion ope|rator bi|
|000057b0| 6e 64 73 20 74 6f 0a 74 | 68 65 20 72 69 67 68 74 |nds to.t|he right|
|000057c0| 2e 20 20 54 68 61 74 20 | 69 73 2c 20 69 6e 20 7b |. That |is, in {|
|000057d0| 5c 73 63 20 66 6f 72 74 | 72 61 6e 7d 2c 20 74 68 |\sc fort|ran}, th|
|000057e0| 65 20 65 78 70 72 65 73 | 73 69 6f 6e 20 0a 7b 5c |e expres|sion .{\|
|000057f0| 74 74 20 78 20 2a 2a 20 | 79 20 2a 2a 20 7a 7d 20 |tt x ** |y ** z} |
|00005800| 6d 65 61 6e 73 20 74 68 | 65 20 73 61 6d 65 20 74 |means th|e same t|
|00005810| 68 69 6e 67 20 61 73 20 | 7b 5c 74 74 20 78 20 2a |hing as |{\tt x *|
|00005820| 2a 20 28 79 20 2a 2a 20 | 7a 29 7d 2e 0a 0a 5c 73 |* (y ** |z)}...\s|
|00005830| 75 62 73 65 63 74 69 6f | 6e 7b 50 72 65 63 65 64 |ubsectio|n{Preced|
|00005840| 65 6e 63 65 7d 0a 0a 5c | 73 75 62 73 75 62 73 65 |ence}..\|subsubse|
|00005850| 63 74 69 6f 6e 7b 50 6f | 73 73 69 62 69 6c 69 74 |ction{Po|ssibilit|
|00005860| 69 65 73 20 66 6f 72 20 | 74 68 65 20 70 72 65 63 |ies for |the prec|
|00005870| 65 64 65 6e 63 65 7d 0a | 4d 61 74 68 65 6d 61 74 |edence}.|Mathemat|
|00005880| 69 63 61 6c 6c 79 2c 20 | 65 78 70 6f 6e 65 6e 74 |ically, |exponent|
|00005890| 69 61 74 69 6f 6e 20 62 | 69 6e 64 73 20 6d 6f 72 |iation b|inds mor|
|000058a0| 65 20 74 69 67 68 74 6c | 79 20 74 68 61 6e 20 6d |e tightl|y than m|
|000058b0| 75 6c 74 69 70 6c 69 63 | 61 74 69 6f 6e 2e 0a 54 |ultiplic|ation..T|
|000058c0| 68 69 73 20 6c 65 61 76 | 65 73 20 66 6f 75 72 20 |his leav|es four |
|000058d0| 70 6f 73 73 69 62 69 6c | 69 74 69 65 73 2c 20 74 |possibil|ities, t|
|000058e0| 68 65 6e 2c 20 66 6f 72 | 20 74 68 65 20 70 72 65 |hen, for| the pre|
|000058f0| 63 65 64 65 6e 63 65 20 | 6f 66 20 61 20 5c 43 5c |cedence |of a \C\|
|00005900| 0a 65 78 70 6f 6e 65 6e | 74 69 61 74 69 6f 6e 20 |.exponen|tiation |
|00005910| 6f 70 65 72 61 74 6f 72 | 3a 0a 5c 62 65 67 69 6e |operator|:.\begin|
|00005920| 7b 69 74 65 6d 69 7a 65 | 7d 0a 5c 69 74 65 6d 20 |{itemize|}.\item |
|00005930| 41 20 6e 65 77 20 70 72 | 65 63 65 64 65 6e 63 65 |A new pr|ecedence|
|00005940| 20 6c 65 76 65 6c 20 62 | 65 74 77 65 65 6e 20 74 | level b|etween t|
|00005950| 68 65 20 6d 75 6c 74 69 | 70 6c 69 63 61 74 69 76 |he multi|plicativ|
|00005960| 65 20 6f 70 65 72 61 74 | 6f 72 73 20 61 6e 64 0a |e operat|ors and.|
|00005970| 20 20 20 20 20 20 74 68 | 65 20 75 6e 61 72 79 20 | th|e unary |
|00005980| 6f 70 65 72 61 74 6f 72 | 73 2e 0a 5c 69 74 65 6d |operator|s..\item|
|00005990| 20 54 68 65 20 73 61 6d | 65 20 70 72 65 63 65 64 | The sam|e preced|
|000059a0| 65 6e 63 65 20 6c 65 76 | 65 6c 20 61 73 20 74 68 |ence lev|el as th|
|000059b0| 65 20 75 6e 61 72 79 20 | 6f 70 65 72 61 74 6f 72 |e unary |operator|
|000059c0| 73 2e 0a 5c 69 74 65 6d | 20 41 20 6e 65 77 20 70 |s..\item| A new p|
|000059d0| 72 65 63 65 64 65 6e 63 | 65 20 6c 65 76 65 6c 20 |recedenc|e level |
|000059e0| 61 62 6f 76 65 20 74 68 | 65 20 75 6e 61 72 79 20 |above th|e unary |
|000059f0| 6f 70 65 72 61 74 6f 72 | 73 20 62 75 74 20 62 65 |operator|s but be|
|00005a00| 6c 6f 77 20 74 68 65 0a | 20 20 20 20 20 20 70 6f |low the.| po|
|00005a10| 73 74 66 69 78 20 6f 70 | 65 72 61 74 6f 72 73 2e |stfix op|erators.|
|00005a20| 0a 5c 69 74 65 6d 20 54 | 68 65 20 73 61 6d 65 20 |.\item T|he same |
|00005a30| 70 72 65 63 65 64 65 6e | 63 65 20 6c 65 76 65 6c |preceden|ce level|
|00005a40| 20 61 73 20 74 68 65 20 | 70 6f 73 74 66 69 78 20 | as the |postfix |
|00005a50| 6f 70 65 72 61 74 6f 72 | 73 2e 0a 5c 65 6e 64 7b |operator|s..\end{|
|00005a60| 69 74 65 6d 69 7a 65 7d | 0a 49 20 77 69 6c 6c 20 |itemize}|.I will |
|00005a70| 63 6f 6e 73 69 64 65 72 | 20 74 68 65 73 65 20 69 |consider| these i|
|00005a80| 6e 20 74 75 72 6e 2c 20 | 69 6e 20 6f 72 64 65 72 |n turn, |in order|
|00005a90| 20 6f 66 20 64 65 63 72 | 65 61 73 69 6e 67 20 70 | of decr|easing p|
|00005aa0| 72 65 63 65 64 65 6e 63 | 65 2e 0a 0a 5c 73 75 62 |recedenc|e...\sub|
|00005ab0| 73 75 62 73 65 63 74 69 | 6f 6e 7b 5c 6f 70 5c 20 |subsecti|on{\op\ |
|00005ac0| 61 73 20 61 20 70 6f 73 | 74 66 69 78 20 6f 70 65 |as a pos|tfix ope|
|00005ad0| 72 61 74 6f 72 7d 09 5c | 6c 61 62 65 6c 7b 70 6f |rator}.\|label{po|
|00005ae0| 73 74 66 69 78 7d 0a 50 | 6f 73 74 66 69 78 20 65 |stfix}.P|ostfix e|
|00005af0| 78 70 72 65 73 73 69 6f | 6e 73 2c 20 61 73 20 64 |xpressio|ns, as d|
|00005b00| 65 73 63 72 69 62 65 64 | 20 69 6e 20 5c 53 20 35 |escribed| in \S 5|
|00005b10| 2e 32 20 6f 66 20 74 68 | 65 20 41 52 4d 2c 20 67 |.2 of th|e ARM, g|
|00005b20| 72 6f 75 70 20 6c 65 66 | 74 20 74 6f 0a 72 69 67 |roup lef|t to.rig|
|00005b30| 68 74 2e 20 20 54 68 65 | 20 70 72 6f 70 6f 73 61 |ht. The| proposa|
|00005b40| 6c 20 6f 66 20 53 65 63 | 74 69 6f 6e 7e 5c 72 65 |l of Sec|tion~\re|
|00005b50| 66 7b 70 72 6f 70 6f 73 | 61 6c 7d 20 73 70 65 63 |f{propos|al} spec|
|00005b60| 69 66 69 65 73 20 74 68 | 61 74 20 74 68 65 0a 61 |ifies th|at the.a|
|00005b70| 73 73 6f 63 69 61 74 69 | 76 69 74 79 20 6f 66 20 |ssociati|vity of |
|00005b80| 5c 6f 70 5c 20 69 73 20 | 72 69 67 68 74 20 74 6f |\op\ is |right to|
|00005b90| 20 6c 65 66 74 2c 20 62 | 75 74 20 63 68 61 6e 67 | left, b|ut chang|
|00005ba0| 69 6e 67 20 74 68 69 73 | 20 77 6f 75 6c 64 20 6e |ing this| would n|
|00005bb0| 6f 74 20 62 65 0a 61 20 | 74 65 72 72 69 62 6c 79 |ot be.a |terribly|
|00005bc0| 20 73 65 72 69 6f 75 73 | 20 6d 61 74 74 65 72 2e | serious| matter.|
|00005bd0| 20 20 41 73 20 6e 6f 74 | 65 64 20 69 6e 20 53 65 | As not|ed in Se|
|00005be0| 63 74 69 6f 6e 7e 5c 72 | 65 66 7b 61 73 73 6f 63 |ction~\r|ef{assoc|
|00005bf0| 69 61 74 69 76 69 74 79 | 7d 2c 0a 69 74 20 69 73 |iativity|},.it is|
|00005c00| 20 72 61 72 65 20 74 6f | 20 65 6e 63 6f 75 6e 74 | rare to| encount|
|00005c10| 65 72 20 65 78 70 72 65 | 73 73 69 6f 6e 20 77 68 |er expre|ssion wh|
|00005c20| 65 72 65 20 74 68 65 20 | 61 73 73 6f 63 69 61 74 |ere the |associat|
|00005c30| 69 76 69 74 79 20 6f 66 | 20 61 6e 0a 65 78 70 6f |ivity of| an.expo|
|00005c40| 6e 65 6e 74 69 61 74 69 | 6f 6e 20 6f 70 65 72 61 |nentiati|on opera|
|00005c50| 74 6f 72 20 6d 61 6b 65 | 73 20 6d 75 63 68 20 64 |tor make|s much d|
|00005c60| 69 66 66 65 72 65 6e 63 | 65 2e 0a 0a 41 20 6d 6f |ifferenc|e...A mo|
|00005c70| 72 65 20 73 65 72 69 6f | 75 73 20 70 72 6f 62 6c |re serio|us probl|
|00005c80| 65 6d 2c 20 68 6f 77 65 | 76 65 72 2c 20 69 73 20 |em, howe|ver, is |
|00005c90| 69 6e 20 61 6e 20 65 78 | 70 72 65 73 73 69 6f 6e |in an ex|pression|
|00005ca0| 20 6c 69 6b 65 20 0a 5c | 62 65 67 69 6e 7b 63 65 | like .\|begin{ce|
|00005cb0| 6e 74 65 72 7d 5c 62 65 | 67 69 6e 7b 74 74 7d 20 |nter}\be|gin{tt} |
|00005cc0| 20 78 20 2a 5e 20 70 2d | 3e 61 2e 20 09 5c 65 6e | x *^ p-|>a. .\en|
|00005cd0| 64 7b 74 74 7d 5c 65 6e | 64 7b 63 65 6e 74 65 72 |d{tt}\en|d{center|
|00005ce0| 7d 0a 54 68 69 73 20 77 | 6f 75 6c 64 20 62 65 20 |}.This w|ould be |
|00005cf0| 69 6e 74 65 72 70 72 65 | 74 65 64 20 62 79 20 74 |interpre|ted by t|
|00005d00| 68 65 20 63 6f 6d 70 69 | 6c 65 72 20 61 73 0a 5c |he compi|ler as.\|
|00005d10| 62 65 67 69 6e 7b 63 65 | 6e 74 65 72 7d 5c 62 65 |begin{ce|nter}\be|
|00005d20| 67 69 6e 7b 74 74 7d 20 | 20 28 78 2a 5e 70 29 2d |gin{tt} | (x*^p)-|
|00005d30| 3e 61 2c 20 09 5c 65 6e | 64 7b 74 74 7d 5c 65 6e |>a, .\en|d{tt}\en|
|00005d40| 64 7b 63 65 6e 74 65 72 | 7d 0a 77 68 69 63 68 20 |d{center|}.which |
|00005d50| 77 6f 75 6c 64 20 62 65 | 20 64 69 73 61 73 74 72 |would be| disastr|
|00005d60| 6f 75 73 2e 20 20 4f 70 | 65 72 61 74 6f 72 73 20 |ous. Op|erators |
|00005d70| 6c 69 6b 65 20 7b 5c 74 | 74 20 2d 3e 7d 2c 20 7b |like {\t|t ->}, {|
|00005d80| 5c 74 74 20 2e 7d 2c 20 | 61 6e 64 20 7b 5c 74 74 |\tt .}, |and {\tt|
|00005d90| 0a 5b 5d 7d 20 68 61 76 | 65 20 61 20 68 69 67 68 |.[]} hav|e a high|
|00005da0| 20 70 72 65 63 65 64 65 | 6e 63 65 20 66 6f 72 20 | precede|nce for |
|00005db0| 61 20 72 65 61 73 6f 6e | 2c 20 77 68 69 63 68 20 |a reason|, which |
|00005dc0| 69 73 20 74 6f 20 65 6e | 73 75 72 65 20 74 68 61 |is to en|sure tha|
|00005dd0| 74 0a 70 6f 73 74 66 69 | 78 20 65 78 70 72 65 73 |t.postfi|x expres|
|00005de0| 73 69 6f 6e 73 20 62 65 | 68 61 76 65 20 74 68 65 |sions be|have the|
|00005df0| 20 73 61 6d 65 20 77 61 | 79 20 69 6e 20 61 72 69 | same wa|y in ari|
|00005e00| 74 68 6d 65 74 69 63 20 | 65 78 70 72 65 73 73 69 |thmetic |expressi|
|00005e10| 6f 6e 73 20 61 73 0a 6f | 72 64 69 6e 61 72 79 20 |ons as.o|rdinary |
|00005e20| 76 61 72 69 61 62 6c 65 | 73 20 64 6f 2e 20 20 54 |variable|s do. T|
|00005e30| 68 69 73 20 70 72 6f 70 | 65 72 74 79 20 69 73 20 |his prop|erty is |
|00005e40| 76 61 6c 75 61 62 6c 65 | 2c 20 61 6e 64 20 69 74 |valuable|, and it|
|00005e50| 20 73 68 6f 75 6c 64 20 | 6e 6f 74 0a 62 65 20 62 | should |not.be b|
|00005e60| 72 6f 6b 65 6e 20 62 79 | 20 61 6e 20 65 78 70 6f |roken by| an expo|
|00005e70| 6e 65 6e 74 69 61 74 69 | 6f 6e 20 6f 70 65 72 61 |nentiati|on opera|
|00005e80| 74 6f 72 2e 0a 0a 5c 73 | 75 62 73 75 62 73 65 63 |tor...\s|ubsubsec|
|00005e90| 74 69 6f 6e 7b 41 20 6e | 65 77 20 6c 65 76 65 6c |tion{A n|ew level|
|00005ea0| 20 61 62 6f 76 65 20 75 | 6e 61 72 79 20 6f 70 65 | above u|nary ope|
|00005eb0| 72 61 74 6f 72 73 7d 0a | 54 68 65 20 70 72 6f 62 |rators}.|The prob|
|00005ec0| 6c 65 6d 20 68 65 72 65 | 20 69 73 20 76 65 72 79 |lem here| is very|
|00005ed0| 20 73 69 6d 69 6c 61 72 | 20 74 6f 20 74 68 61 74 | similar| to that|
|00005ee0| 20 64 65 73 63 72 69 62 | 65 64 20 61 62 6f 76 65 | describ|ed above|
|00005ef0| 3a 20 20 74 68 65 20 0a | 65 78 70 72 65 73 73 69 |: the .|expressi|
|00005f00| 6f 6e 0a 5c 62 65 67 69 | 6e 7b 63 65 6e 74 65 72 |on.\begi|n{center|
|00005f10| 7d 5c 62 65 67 69 6e 7b | 74 74 7d 20 20 2a 70 20 |}\begin{|tt} *p |
|00005f20| 2a 5e 20 78 20 09 5c 65 | 6e 64 7b 74 74 7d 5c 65 |*^ x .\e|nd{tt}\e|
|00005f30| 6e 64 7b 63 65 6e 74 65 | 72 7d 0a 77 6f 75 6c 64 |nd{cente|r}.would|
|00005f40| 20 62 65 20 69 6e 74 65 | 72 70 72 65 74 65 64 20 | be inte|rpreted |
|00005f50| 61 73 0a 5c 62 65 67 69 | 6e 7b 63 65 6e 74 65 72 |as.\begi|n{center|
|00005f60| 7d 5c 62 65 67 69 6e 7b | 74 74 7d 20 20 2a 28 70 |}\begin{|tt} *(p|
|00005f70| 2a 5e 78 29 2c 20 09 5c | 65 6e 64 7b 74 74 7d 5c |*^x), .\|end{tt}\|
|00005f80| 65 6e 64 7b 63 65 6e 74 | 65 72 7d 0a 77 68 69 63 |end{cent|er}.whic|
|00005f90| 68 20 69 73 20 75 6e 64 | 65 73 69 72 61 62 6c 65 |h is und|esirable|
|00005fa0| 20 66 6f 72 20 65 78 61 | 63 74 6c 79 20 74 68 65 | for exa|ctly the|
|00005fb0| 20 73 61 6d 65 20 72 65 | 61 73 6f 6e 20 61 73 20 | same re|ason as |
|00005fc0| 74 68 61 74 20 67 69 76 | 65 6e 20 69 6e 0a 53 65 |that giv|en in.Se|
|00005fd0| 63 74 69 6f 6e 7e 5c 72 | 65 66 7b 70 6f 73 74 66 |ction~\r|ef{postf|
|00005fe0| 69 78 7d 2e 0a 0a 5c 73 | 75 62 73 75 62 73 65 63 |ix}...\s|ubsubsec|
|00005ff0| 74 69 6f 6e 7b 54 68 65 | 20 73 61 6d 65 20 70 72 |tion{The| same pr|
|00006000| 65 63 65 64 65 6e 63 65 | 20 61 73 20 75 6e 61 72 |ecedence| as unar|
|00006010| 79 20 6f 70 65 72 61 74 | 6f 72 73 7d 0a 55 6e 61 |y operat|ors}.Una|
|00006020| 72 79 20 6f 70 65 72 61 | 74 6f 72 73 20 67 72 6f |ry opera|tors gro|
|00006030| 75 70 20 72 69 67 68 74 | 20 74 6f 20 6c 65 66 74 |up right| to left|
|00006040| 2c 20 73 6f 2c 20 61 67 | 61 69 6e 2c 20 74 68 65 |, so, ag|ain, the|
|00006050| 20 65 78 70 72 65 73 73 | 69 6f 6e 0a 5c 62 65 67 | express|ion.\beg|
|00006060| 69 6e 7b 63 65 6e 74 65 | 72 7d 5c 62 65 67 69 6e |in{cente|r}\begin|
|00006070| 7b 74 74 7d 20 20 2a 70 | 20 2a 5e 20 78 20 09 5c |{tt} *p| *^ x .\|
|00006080| 65 6e 64 7b 74 74 7d 5c | 65 6e 64 7b 63 65 6e 74 |end{tt}\|end{cent|
|00006090| 65 72 7d 0a 77 6f 75 6c | 64 20 62 65 20 69 6e 74 |er}.woul|d be int|
|000060a0| 65 72 70 72 65 74 65 64 | 20 69 6e 20 61 6e 20 75 |erpreted| in an u|
|000060b0| 6e 64 65 73 69 72 61 62 | 6c 65 20 77 61 79 2e 20 |ndesirab|le way. |
|000060c0| 20 5c 6f 70 5c 20 6d 75 | 73 74 20 62 65 20 67 69 | \op\ mu|st be gi|
|000060d0| 76 65 6e 20 61 0a 70 72 | 65 63 65 64 65 6e 63 65 |ven a.pr|ecedence|
|000060e0| 20 6c 6f 77 65 72 20 74 | 68 61 6e 20 74 68 65 20 | lower t|han the |
|000060f0| 75 6e 61 72 79 20 6f 70 | 65 72 61 74 6f 72 73 2e |unary op|erators.|
|00006100| 0a 0a 54 68 65 20 73 61 | 6d 65 20 72 65 61 73 6f |..The sa|me reaso|
|00006110| 6e 69 6e 67 20 61 62 6f | 75 74 20 74 68 65 20 6f |ning abo|ut the o|
|00006120| 70 65 72 61 74 6f 72 20 | 7b 5c 74 74 20 2d 3e 7d |perator |{\tt ->}|
|00006130| 20 61 6c 73 6f 20 61 70 | 70 6c 69 65 73 20 74 6f | also ap|plies to|
|00006140| 20 74 68 65 0a 6f 70 65 | 72 61 74 6f 72 73 20 7b | the.ope|rators {|
|00006150| 5c 74 74 20 2d 3e 2a 7d | 20 61 6e 64 20 7b 5c 74 |\tt ->*}| and {\t|
|00006160| 74 20 2e 2a 7d 2c 20 69 | 6d 70 6c 79 69 6e 67 20 |t .*}, i|mplying |
|00006170| 74 68 61 74 20 74 68 65 | 20 70 72 65 63 65 64 65 |that the| precede|
|00006180| 6e 63 65 20 6f 66 20 7b | 5c 74 74 0a 2a 5e 7d 20 |nce of {|\tt.*^} |
|00006190| 6d 75 73 74 20 62 65 20 | 62 65 6c 6f 77 20 74 68 |must be |below th|
|000061a0| 61 74 20 6f 66 20 74 68 | 65 20 70 6f 69 6e 74 65 |at of th|e pointe|
|000061b0| 72 2d 74 6f 2d 6d 65 6d | 62 65 72 20 6f 70 65 72 |r-to-mem|ber oper|
|000061c0| 61 74 6f 72 73 2e 0a 0a | 5c 73 75 62 73 75 62 73 |ators...|\subsubs|
|000061d0| 65 63 74 69 6f 6e 7b 41 | 20 6e 65 77 20 6c 65 76 |ection{A| new lev|
|000061e0| 65 6c 20 61 62 6f 76 65 | 20 6d 75 6c 74 69 70 6c |el above| multipl|
|000061f0| 69 63 61 74 69 6f 6e 7d | 0a 0a 54 68 65 72 65 20 |ication}|..There |
|00006200| 61 72 65 20 6e 6f 20 64 | 69 73 61 73 74 72 6f 75 |are no d|isastrou|
|00006210| 73 20 70 72 6f 62 6c 65 | 6d 73 20 61 73 73 6f 63 |s proble|ms assoc|
|00006220| 69 61 74 65 64 20 77 69 | 74 68 20 70 75 74 74 69 |iated wi|th putti|
|00006230| 6e 67 20 5c 6f 70 5c 20 | 61 62 6f 76 65 0a 74 68 |ng \op\ |above.th|
|00006240| 65 20 6d 75 6c 74 69 70 | 6c 69 63 61 74 69 76 65 |e multip|licative|
|00006250| 20 6f 70 65 72 61 74 6f | 72 73 20 61 6e 64 20 62 | operato|rs and b|
|00006260| 65 6c 6f 77 20 75 6e 61 | 72 79 20 6f 70 65 72 61 |elow una|ry opera|
|00006270| 74 6f 72 73 2c 20 62 75 | 74 20 74 68 65 72 65 20 |tors, bu|t there |
|00006280| 69 73 20 61 0a 73 6d 61 | 6c 6c 20 61 6e 6e 6f 79 |is a.sma|ll annoy|
|00006290| 61 6e 63 65 3a 20 74 68 | 65 20 65 78 70 72 65 73 |ance: th|e expres|
|000062a0| 73 69 6f 6e 20 7b 5c 74 | 74 20 2d 78 2a 5e 32 7d |sion {\t|t -x*^2}|
|000062b0| 20 77 6f 75 6c 64 20 62 | 65 20 69 6e 74 65 72 70 | would b|e interp|
|000062c0| 72 65 74 65 64 20 61 73 | 0a 7b 5c 74 74 20 28 2d |reted as|.{\tt (-|
|000062d0| 78 29 20 2a 5e 20 32 7d | 2c 20 77 68 69 63 68 20 |x) *^ 2}|, which |
|000062e0| 69 73 20 75 6e 6c 69 6b | 65 6c 79 20 74 6f 20 62 |is unlik|ely to b|
|000062f0| 65 20 77 68 61 74 20 74 | 68 65 20 70 72 6f 67 72 |e what t|he progr|
|00006300| 61 6d 6d 65 72 20 69 6e | 74 65 6e 64 65 64 2e 0a |ammer in|tended..|
|00006310| 54 68 69 73 20 69 73 20 | 6d 65 72 65 6c 79 20 61 |This is |merely a|
|00006320| 6e 20 61 6e 6e 6f 79 61 | 6e 63 65 2c 20 68 6f 77 |n annoya|nce, how|
|00006330| 65 76 65 72 3b 20 69 74 | 20 69 73 20 75 6e 6c 69 |ever; it| is unli|
|00006340| 6b 65 6c 79 20 74 6f 20 | 62 65 20 61 20 73 65 72 |kely to |be a ser|
|00006350| 69 6f 75 73 0a 73 6f 75 | 72 63 65 20 6f 66 20 65 |ious.sou|rce of e|
|00006360| 72 72 6f 72 73 2e 20 20 | 45 78 70 72 65 73 73 69 |rrors. |Expressi|
|00006370| 6f 6e 73 20 6f 66 20 74 | 68 69 73 20 73 6f 72 74 |ons of t|his sort|
|00006380| 20 61 72 65 20 72 61 72 | 65 2c 20 61 6e 64 20 63 | are rar|e, and c|
|00006390| 6f 6d 70 69 6c 65 72 73 | 0a 63 6f 75 6c 64 20 69 |ompilers|.could i|
|000063a0| 73 73 75 65 20 77 61 72 | 6e 69 6e 67 73 20 77 68 |ssue war|nings wh|
|000063b0| 65 6e 20 74 68 65 79 20 | 6f 63 63 75 72 20 77 69 |en they |occur wi|
|000063c0| 74 68 6f 75 74 20 70 61 | 72 65 6e 74 68 65 73 65 |thout pa|renthese|
|000063d0| 73 2e 0a 0a 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |s....\su|bsection|
|000063e0| 7b 47 75 61 72 61 6e 74 | 65 65 73 20 61 62 6f 75 |{Guarant|ees abou|
|000063f0| 74 20 74 68 65 20 76 61 | 6c 75 65 20 72 65 74 75 |t the va|lue retu|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.