home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / RLaB 1.18c / manual / sign.tex < prev    next >
LaTeX Document  |  1994-04-27  |  1.4 KB  |  [TEXT/ttxt]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

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

You can browse this item here: sign.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text, with CR line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[CR] default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ttxt]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 73 69 67 6e 20 2d 2d |\section|{sign --|
|00000010| 2d 20 73 69 67 6e 20 6f | 66 20 74 68 65 20 61 72 |- sign o|f the ar|
|00000020| 67 75 6d 65 6e 74 7d 0d | 5c 6c 61 62 65 6c 7b 66 |gument}.|\label{f|
|00000030| 6e 3a 73 69 67 6e 7d 0d | 5c 69 6e 64 65 78 7b 73 |n:sign}.|\index{s|
|00000040| 69 67 6e 28 29 7d 0d 5c | 69 6e 64 65 78 7b 73 69 |ign()}.\|index{si|
|00000050| 67 6e 20 6f 66 20 61 72 | 67 75 6d 65 6e 74 7d 0d |gn of ar|gument}.|
|00000060| 5c 62 65 67 69 6e 7b 72 | 61 69 6c 7d 0d 53 69 67 |\begin{r|ail}.Sig|
|00000070| 6e 20 3a 20 27 73 69 67 | 6e 27 20 27 28 27 20 28 |n : 'sig|n' '(' (|
|00000080| 20 53 63 61 6c 61 72 20 | 7c 20 4d 61 74 72 69 78 | Scalar || Matrix|
|00000090| 20 29 20 27 29 27 20 3b | 0d 5c 65 6e 64 7b 72 61 | ) ')' ;|.\end{ra|
|000000a0| 69 6c 7d 0d 0d 5c 76 65 | 72 62 2b 73 69 67 6e 2b |il}..\ve|rb+sign+|
|000000b0| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 73 69 67 | returns| the sig|
|000000c0| 6e 20 6f 66 20 74 68 65 | 20 61 72 67 75 6d 65 6e |n of the| argumen|
|000000d0| 74 2e 20 20 49 66 20 74 | 68 65 20 61 72 67 75 6d |t. If t|he argum|
|000000e0| 65 6e 74 20 69 73 20 0d | 67 72 65 61 74 65 72 20 |ent is .|greater |
|000000f0| 74 68 61 6e 20 7a 65 72 | 6f 2c 20 69 74 20 72 65 |than zer|o, it re|
|00000100| 74 75 72 6e 73 20 24 31 | 24 2e 20 49 66 20 74 68 |turns $1|$. If th|
|00000110| 65 20 61 72 67 75 6d 65 | 6e 74 20 69 73 20 6c 65 |e argume|nt is le|
|00000120| 73 73 20 74 68 61 6e 20 | 7a 65 72 6f 2c 0d 69 74 |ss than |zero,.it|
|00000130| 20 72 65 74 75 72 6e 73 | 20 24 2d 31 24 2e 20 20 | returns| $-1$. |
|00000140| 4f 74 68 65 72 77 69 73 | 65 20 7a 65 72 6f 20 69 |Otherwis|e zero i|
|00000150| 73 20 72 65 74 75 72 6e | 65 64 2e 20 20 49 66 20 |s return|ed. If |
|00000160| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 69 73 20 |the argu|ment is |
|00000170| 61 0d 6d 61 74 72 69 78 | 2c 20 74 68 65 20 6f 70 |a.matrix|, the op|
|00000180| 65 72 61 74 69 6f 6e 20 | 69 73 20 70 65 72 66 6f |eration |is perfo|
|00000190| 72 6d 65 64 20 65 6c 65 | 6d 65 6e 74 2d 62 79 2d |rmed ele|ment-by-|
|000001a0| 65 6c 65 6d 65 6e 74 2c | 20 72 65 74 75 72 6e 69 |element,| returni|
|000001b0| 6e 67 20 61 20 0d 6d 61 | 74 72 69 78 20 6f 66 20 |ng a .ma|trix of |
|000001c0| 74 68 65 20 73 61 6d 65 | 20 64 69 6d 65 6e 73 69 |the same| dimensi|
|000001d0| 6f 6e 73 20 61 73 20 74 | 68 65 20 61 72 67 75 6d |ons as t|he argum|
|000001e0| 65 6e 74 2e 0d 49 66 20 | 74 68 65 20 61 72 67 75 |ent..If |the argu|
|000001f0| 6d 65 6e 74 20 69 73 20 | 63 6f 6d 70 6c 65 78 2c |ment is |complex,|
|00000200| 20 74 68 65 6e 20 5c 76 | 65 72 62 2b 73 69 67 6e | then \v|erb+sign|
|00000210| 2b 20 72 65 74 75 72 6e | 73 20 74 68 65 20 61 72 |+ return|s the ar|
|00000220| 67 75 6d 65 6e 74 0d 64 | 69 76 69 64 65 64 20 62 |gument.d|ivided b|
|00000230| 79 20 69 74 73 20 6d 61 | 67 6e 69 74 75 64 65 2e |y its ma|gnitude.|
|00000240| 0d 0d 24 5c 4c 6f 6e 67 | 72 69 67 68 74 61 72 72 |..$\Long|rightarr|
|00000250| 6f 77 24 20 54 68 69 73 | 20 69 73 20 6e 6f 74 20 |ow$ This| is not |
|00000260| 61 6e 20 5c 52 4c 61 42 | 5c 20 62 75 69 6c 74 2d |an \RLaB|\ built-|
|00000270| 69 6e 20 66 75 6e 63 74 | 69 6f 6e 2e 20 20 54 68 |in funct|ion. Th|
|00000280| 69 73 20 66 75 6e 63 74 | 69 6f 6e 0d 69 73 20 6e |is funct|ion.is n|
|00000290| 6f 72 6d 61 6c 6c 79 20 | 6c 6f 61 64 65 64 20 6f |ormally |loaded o|
|000002a0| 6e 20 73 74 61 72 74 2d | 75 70 20 66 72 6f 6d 20 |n start-|up from |
|000002b0| 74 68 65 20 5c 76 65 72 | 62 2b 73 69 67 6e 2e 72 |the \ver|b+sign.r|
|000002c0| 2b 20 66 69 6c 65 20 69 | 6e 20 74 68 65 0d 73 74 |+ file i|n the.st|
|000002d0| 61 6e 64 61 72 64 20 5c | 76 65 72 62 2b 72 6c 69 |andard \|verb+rli|
|000002e0| 62 2b 20 64 69 72 65 63 | 74 6f 72 79 2e 20 55 73 |b+ direc|tory. Us|
|000002f0| 65 20 6f 66 20 74 68 65 | 20 5c 76 65 72 62 2b 2d |e of the| \verb+-|
|00000300| 72 2b 20 6f 70 74 69 6f | 6e 2c 20 69 6e 63 6f 72 |r+ optio|n, incor|
|00000310| 72 65 63 74 6c 79 20 0d | 73 65 74 74 69 6e 67 20 |rectly .|setting |
|00000320| 74 68 65 20 5c 76 65 72 | 62 2b 52 4c 41 42 5f 4c |the \ver|b+RLAB_L|
|00000330| 49 42 5f 44 49 52 2b 20 | 65 6e 76 69 72 6f 6e 6d |IB_DIR+ |environm|
|00000340| 65 6e 74 61 6c 20 76 61 | 72 69 61 62 6c 65 2c 20 |ental va|riable, |
|00000350| 6f 72 20 6d 6f 64 69 66 | 79 69 6e 67 0d 5c 76 65 |or modif|ying.\ve|
|00000360| 72 62 2b 73 69 67 6e 2e | 72 2b 20 6d 61 79 20 6d |rb+sign.|r+ may m|
|00000370| 61 6b 65 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |ake this| functio|
|00000380| 6e 20 75 6e 61 76 61 69 | 6c 61 62 6c 65 2e 0d 0d |n unavai|lable...|
|00000390| 0d 5c 70 61 72 61 67 72 | 61 70 68 7b 45 78 61 6d |.\paragr|aph{Exam|
|000003a0| 70 6c 65 7d 0d 5c 69 6e | 64 65 78 7b 65 78 61 6d |ple}.\in|dex{exam|
|000003b0| 70 6c 65 20 6f 66 20 73 | 69 67 6e 28 29 7d 0d 5c |ple of s|ign()}.\|
|000003c0| 69 6e 64 65 78 7b 73 69 | 67 6e 28 29 21 65 78 61 |index{si|gn()!exa|
|000003d0| 6d 70 6c 65 7d 0d 5c 62 | 65 67 69 6e 7b 76 65 72 |mple}.\b|egin{ver|
|000003e0| 62 61 74 69 6d 7d 0d 3e | 20 73 69 67 6e 28 33 29 |batim}.>| sign(3)|
|000003f0| 0d 20 20 20 20 20 20 20 | 20 31 20 20 0d 3e 20 73 |. | 1 .> s|
|00000400| 69 67 6e 28 2d 33 29 0d | 20 20 20 20 20 20 20 2d |ign(-3).| -|
|00000410| 31 20 20 0d 3e 20 73 69 | 67 6e 28 30 29 0d 20 20 |1 .> si|gn(0). |
|00000420| 20 20 20 20 20 20 30 20 | 20 0d 3e 20 73 69 67 6e | 0 | .> sign|
|00000430| 28 33 2b 34 6a 29 0d 20 | 20 20 20 20 20 30 2e 36 |(3+4j). | 0.6|
|00000440| 20 2b 20 30 2e 38 69 0d | 3e 20 61 20 3d 20 28 72 | + 0.8i.|> a = (r|
|00000450| 61 6e 64 28 32 2c 35 29 | 2d 30 2e 35 29 2a 31 30 |and(2,5)|-0.5)*10|
|00000460| 0d 20 61 20 3d 0d 20 20 | 20 20 20 20 20 20 35 20 |. a =. | 5 |
|00000470| 20 20 20 20 20 20 31 2e | 34 37 20 20 20 20 20 20 | 1.|47 |
|00000480| 2d 34 2e 36 33 20 20 20 | 20 20 20 20 31 2e 36 35 |-4.63 | 1.65|
|00000490| 20 20 20 20 20 20 2d 32 | 2e 39 36 20 20 0d 20 20 | -2|.96 . |
|000004a0| 20 20 20 34 2e 37 35 20 | 20 20 20 20 20 2d 31 2e | 4.75 | -1.|
|000004b0| 36 37 20 20 20 20 20 20 | 2d 33 2e 33 38 20 20 20 |67 |-3.38 |
|000004c0| 20 20 20 2d 34 2e 31 35 | 20 20 20 20 20 20 2d 33 | -4.15| -3|
|000004d0| 2e 33 33 20 20 0d 3e 20 | 73 69 67 6e 28 61 29 0d |.33 .> |sign(a).|
|000004e0| 20 20 20 20 20 20 20 20 | 31 20 20 20 20 20 20 20 | |1 |
|000004f0| 20 20 20 31 20 20 20 20 | 20 20 20 20 20 2d 31 20 | 1 | -1 |
|00000500| 20 20 20 20 20 20 20 20 | 20 31 20 20 20 20 20 20 | | 1 |
|00000510| 20 20 20 2d 31 20 20 0d | 20 20 20 20 20 20 20 20 | -1 .| |
|00000520| 31 20 20 20 20 20 20 20 | 20 20 2d 31 20 20 20 20 |1 | -1 |
|00000530| 20 20 20 20 20 2d 31 20 | 20 20 20 20 20 20 20 20 | -1 | |
|00000540| 2d 31 20 20 20 20 20 20 | 20 20 20 2d 31 20 0d 5c |-1 | -1 .\|
|00000550| 65 6e 64 7b 76 65 72 62 | 61 74 69 6d 7d 0d 0d 5c |end{verb|atim}..\|
|00000560| 6e 65 77 70 61 67 65 0d | 0d 0d 0d |newpage.|... |
+--------+-------------------------+-------------------------+--------+--------+