complex.log 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. Sat Jun 29 13:38:03 PDT 1991
  2. REDUCE 3.4, 15-Jul-91 ...
  3. 1: 1:
  4. 2: 2:
  5. 3: 3: % Test of Complex Number mode in REDUCE.
  6. on complex;
  7. (31+i)/74;
  8. 31 + I
  9. --------
  10. 74
  11. ws/(b+1);
  12. 31 + I
  13. ------------
  14. 74*(B + 1)
  15. % this now comes out right!
  16. w:=(x+3*i)**2;
  17. 2
  18. W := X + (6*I)*X - 9
  19. on gcd;
  20. (x**3-7*x**2+x-7)/(x**2+(3+i)*x+3*i);
  21. 2
  22. X - (7 + I)*X + 7*I
  23. ----------------------
  24. X + 3
  25. off gcd;
  26. sqrt(x**4+14*i*x**3-51*x**2-14*i*x+1);
  27. 2
  28. X + (7*I)*X - 1
  29. on rounded;
  30. *** Domain mode COMPLEX changed to COMPLEX-ROUNDED
  31. (3.25 + 8.5i) + (6.75 - 8.5i);
  32. 10.0
  33. (3.25 + 8.5i) - (6.0 - 9.5i);
  34. -2.75 + 18.0*I
  35. (1.0 + 10.0*i)*(-6.5 + 2.5*i);
  36. -31.5 - 62.5*I
  37. (1.2 - 3.4*i)*(-5.6 + 7.8*i);
  38. 19.8 + 28.4*I
  39. (19.8 + 28.4*i)/(-5.6 + 7.8*i);
  40. 1.2 - 3.4*I
  41. e;
  42. 2.71828182846
  43. pi;
  44. 3.14159265359
  45. 17*i**2;
  46. -17
  47. (-7.0 + 24.0*i)**(1/2);
  48. 3.0 + 4.0*I
  49. sqrt(-7.0 + 24.0*i);
  50. 3.0 + 4.0*I
  51. sqrt(-10.12 - 8.16*i);
  52. -1.2 + 3.4*I
  53. sin(0.0 + 0.0*i);
  54. 0
  55. sin(1.0 + 0.0*i);
  56. 0.841470984808
  57. sin(1.0 + 1.0*i);
  58. 1.29845758142 + 0.634963914785*I
  59. cos(0.0 + 0.0*i);
  60. 1
  61. cos(1.0 - 0.0*i);
  62. 0.540302305868
  63. cos(1.0 + 1.0*i);
  64. 0.833730025131 - 0.988897705763*I
  65. tan(0.0 + 0.0*i);
  66. 0
  67. tan(1.0 + 0.0*i);
  68. 1.55740772465
  69. tan(1.0 + 1.0*i);
  70. 0.27175258532 + 1.08392332734*I
  71. asin(1.0 + 1.0*i);
  72. 0.666239432493 + 1.06127506191*I
  73. acos(1.0 + 1.0*i);
  74. 0.904556894302 - 1.06127506191*I
  75. atan(1.0 + 1.0*i);
  76. 1.0172219679 + 0.402359478109*I
  77. log(1.0 + 1.0*i);
  78. 0.34657359028 + 0.785398163397*I
  79. asin 2;
  80. 1.57079632679 - 1.31695789692*I
  81. sin ws;
  82. 2.0
  83. acos 2;
  84. 1.31695789692*I
  85. cos ws;
  86. 2.0
  87. atan(1+i);
  88. 1.0172219679 + 0.402359478109*I
  89. tan ws;
  90. 1 + I
  91. log(2+i);
  92. 0.804718956217 + 0.463647609001*I
  93. exp ws;
  94. 2.0 + I
  95. e**(i*pi);
  96. - 1
  97. e**i;
  98. 0.540302305868 + 0.841470984808*I
  99. z := sqrt i;
  100. Z := 0.707106781187 + 0.707106781187*I
  101. z**2;
  102. I
  103. off rounded;
  104. *** Domain mode COMPLEX-ROUNDED changed to COMPLEX
  105. % on rationalize; % no longer needed, since it doesn't affect complex.
  106. s:= 1.1+2.3i;
  107. 11 + 23*I
  108. S := -----------
  109. 10
  110. s/4;
  111. 11 + 23*I
  112. -----------
  113. 40
  114. % this would have had a common factor of 4.
  115. x:= a+1.1+2.3i;
  116. 10*A + (11 + 23*I)
  117. X := --------------------
  118. 10
  119. y:= b+1.2+1.3i;
  120. 10*B + (12 + 13*I)
  121. Y := --------------------
  122. 10
  123. z:= x/y;
  124. 100*A*B + (120 - 130*I)*A + (110 + 230*I)*B + (431 + 133*I)
  125. Z := -------------------------------------------------------------
  126. 2
  127. 100*B + 240*B + 313
  128. z/4;
  129. 100*A*B + (120 - 130*I)*A + (110 + 230*I)*B + (431 + 133*I)
  130. -------------------------------------------------------------
  131. 2
  132. 4*(100*B + 240*B + 313)
  133. % this would have had a common polynomial factor b^2 + ...
  134. z*7/4;
  135. 7*(100*A*B + (120 - 130*I)*A + (110 + 230*I)*B + (431 + 133*I))
  136. -----------------------------------------------------------------
  137. 2
  138. 4*(100*B + 240*B + 313)
  139. s/(c^2+c+1);
  140. 11 + 23*I
  141. -----------------
  142. 2
  143. 10*(C + C + 1)
  144. % this would have had a common factor of c^2+c+1
  145. clear x;
  146. zz:= x^2+(1.1+2.3i)*x+1.2+1.3i;
  147. 2
  148. 10*X + (11 + 23*I)*X + (12 + 13*I)
  149. ZZ := -------------------------------------
  150. 10
  151. ss:=1.23456789x^2+1.3579i*x+5.6789;
  152. 2
  153. 123456789*X + (135790000*I)*X + 567890000
  154. SS := --------------------------------------------
  155. 100000000
  156. % off rationalize; % not needed now.
  157. z:= x+1.1+2.3i;
  158. 10*X + (11 + 23*I)
  159. Z := --------------------
  160. 10
  161. on rationalize;
  162. z;
  163. 10*X + (11 + 23*I)
  164. --------------------
  165. 10
  166. % same as previous answer.
  167. off rationalize;
  168. 1.23456789x^2+2.3456i*x+7.89;
  169. 2
  170. 123456789*X + (234560000*I)*X + 789000000
  171. --------------------------------------------
  172. 100000000
  173. on factor;
  174. x**2+1;
  175. (X + I)*(X - I)
  176. x**4-1;
  177. (X + I)*(X - I)*(X + 1)*(X - 1)
  178. x**4+(i+2)*x**3+(2*i+5)*x**2+(2*i+6)*x+6;
  179. 2
  180. (X + I*X + 3)*(X + (1 + I))*(X + 1 - I)
  181. (2*i+3)*x**4+(3*i-2)*x**3-2*(i+1)*x**2+i*x-1;
  182. 2 2
  183. I*((2 - 3*I)*X - I)*(X + I*X - 1)
  184. % Multivariate examples:
  185. x**2+y**2;
  186. (10*B + (10*I)*X + (12 + 13*I))*(10*B - (10*I)*X + (12 + 13*I))
  187. -----------------------------------------------------------------
  188. 100
  189. off factor;
  190. factorize(x**2+1);
  191. {X - I,X + I}
  192. end;
  193. 4: 4:
  194. Quitting
  195. Sat Jun 29 13:38:21 PDT 1991