arnum.log 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. Codemist Standard Lisp 3.54 for DEC Alpha: May 23 1994
  2. Dump file created: Mon May 23 10:39:11 1994
  3. REDUCE 3.5, 15-Oct-93 ...
  4. Memory allocation: 6023424 bytes
  5. +++ About to read file ndotest.red
  6. % Test of algebraic number package.
  7. defpoly sqrt2**2-2;
  8. 1/(sqrt2+1);
  9. sqrt2 - 1
  10. (x**2+2*sqrt2*x+2)/(x+sqrt2);
  11. x + sqrt2
  12. on gcd;
  13. (x**3+(sqrt2-2)*x**2-(2*sqrt2+3)*x-3*sqrt2)/(x**2-2);
  14. 2
  15. x - 2*x - 3
  16. --------------
  17. x - sqrt2
  18. off gcd;
  19. sqrt(x**2-2*sqrt2*x*y+2*y**2);
  20. x - sqrt2*y
  21. off arnum;
  22. %to start a new algebraic extension.
  23. defpoly cbrt5**3-5;
  24. on rationalize;
  25. 1/(x-cbrt5);
  26. 2 2
  27. x + cbrt5*x + cbrt5
  28. -----------------------
  29. 3
  30. x - 5
  31. off rationalize;
  32. off arnum;
  33. %to start a new algebraic extension.
  34. %The following examples are taken from P.S. Wang Math. Comp. 30,
  35. % 134,(1976),p.324.
  36. on factor;
  37. defpoly i**2+1=0;
  38. w0 := x**2+1;
  39. w0 := (x + i)*(x - i)
  40. w1 := x**4-1;
  41. w1 := (x + i)*(x - i)*(x + 1)*(x - 1)
  42. w2 := x**4+(i+2)*x**3+(2*i+5)*x**2+(2*i+6)*x+6;
  43. 2
  44. w2 := (x + i*x + 3)*(x + (i + 1))*(x - (i - 1))
  45. w3 := (2*i+3)*x**4+(3*i-2)*x**3-2*(i+1)*x**2+i*x-1;
  46. 2 2 2 3
  47. w3 := (2*i + 3)*(x + i*x - 1)*(x - (----*i - ----))
  48. 13 13
  49. off arnum;
  50. defpoly a**2-5;
  51. w4 := x**2+x-1;
  52. 1 1 1 1
  53. w4 := (x + (---*a + ---))*(x - (---*a - ---))
  54. 2 2 2 2
  55. off arnum;
  56. defpoly a**2+a+2;
  57. w5 := x**4+3*x**2+4;
  58. w5 := (x + (a + 1))*(x + a)*(x - (a + 1))*(x - a)
  59. off arnum;
  60. defpoly a**3+2=0;
  61. w6:=64*x**6-4;
  62. 2 1 1 2 2 1 1 2 1
  63. w6 := 64*(x + ---*a*x + ---*a )*(x - ---*a*x + ---*a )*(x + ---*a)
  64. 2 4 2 4 2
  65. 1
  66. *(x - ---*a)
  67. 2
  68. off arnum;
  69. defpoly a**4+a**3+a**2+a+1=0;
  70. w7:=16*x**4+8*x**3+4*x**2+2*x+1;
  71. 1 3 1 2 1 1 1 3
  72. w7 := 16*(x + (---*a + ---*a + ---*a + ---))*(x - ---*a )
  73. 2 2 2 2 2
  74. 1 2 1
  75. *(x - ---*a )*(x - ---*a)
  76. 2 2
  77. off arnum, factor;
  78. defpoly sqrt5**2-5,cbrt3**3-3;
  79. *** Defining polynomial for primitive element:
  80. 6 4 3 2
  81. a1 - 15*a1 - 6*a1 + 75*a1 - 90*a1 - 116
  82. cbrt3**3;
  83. 3
  84. sqrt5**2;
  85. 5
  86. cbrt3;
  87. 120 5 27 4 2000 3 1170 2 6676
  88. - (------*a1 + ------*a1 - ------*a1 - ------*a1 + ------*a1
  89. 8243 8243 8243 8243 8243
  90. 6825
  91. - ------)
  92. 8243
  93. sqrt5;
  94. 120 5 27 4 2000 3 1170 2 14919
  95. ------*a1 + ------*a1 - ------*a1 - ------*a1 + -------*a1
  96. 8243 8243 8243 8243 8243
  97. 6825
  98. - ------
  99. 8243
  100. sqrt(x**2+2*(sqrt5-cbrt3)*x+5-2*sqrt5*cbrt3+cbrt3**2);
  101. 240 5 54 4 4000 3 2340 2 21595
  102. x + (------*a1 + ------*a1 - ------*a1 - ------*a1 + -------*a1
  103. 8243 8243 8243 8243 8243
  104. 13650
  105. - -------)
  106. 8243
  107. on rationalize;
  108. 1/(x+sqrt5-cbrt3);
  109. 5 240 5 54 4 4000 3 2340 2 21595
  110. (x - (------*a1 + ------*a1 - ------*a1 - ------*a1 + -------*a1
  111. 8243 8243 8243 8243 8243
  112. 13650 4 108 5 800 4 1800 3
  113. - -------)*x - (------*a1 - ------*a1 - ------*a1
  114. 8243 8243 8243 8243
  115. 15433 2 15900 14465 3 3 2
  116. + -------*a1 + -------*a1 + -------)*x - (a1 - 15*a1)*x - (
  117. 8243 8243 8243
  118. 900 5 3919 4 15000 3 8775 2 148986
  119. ------*a1 - ------*a1 - -------*a1 - ------*a1 + --------*a1
  120. 8243 8243 8243 8243 8243
  121. 154225 1919 5 1050 4 18245 3
  122. - --------)*x - (------*a1 + ------*a1 - -------*a1
  123. 8243 8243 8243 8243
  124. 12528 2 236725 73080 6 4 3
  125. - -------*a1 + --------*a1 - -------))/(x - 15*x - 6*x
  126. 8243 8243 8243
  127. 2
  128. + 75*x - 90*x - 116)
  129. off arnum, rationalize;
  130. split_field(x**3+2);
  131. *** Splitting field is generated by:
  132. 6
  133. a3 + 108
  134. 1 4 1
  135. {----*a3 + ---*a3,
  136. 36 2
  137. 1 4
  138. - ----*a3 ,
  139. 18
  140. 1 4 1
  141. ----*a3 - ---*a3}
  142. 36 2
  143. for each j in ws product (x-j);
  144. 3
  145. x + 2
  146. split_field(x**3+4*x**2+x-1);
  147. *** Splitting field is generated by:
  148. 3 2
  149. a4 + 4*a4 + a4 - 1
  150. 2 2
  151. {a4,a4 + 3*a4 - 2, - (a4 + 4*a4 + 2)}
  152. for each j in ws product (x-j);
  153. 3 2
  154. x + 4*x + x - 1
  155. split_field(x**3-3*x+7);
  156. *** Splitting field is generated by:
  157. 6 4 2
  158. a6 - 18*a6 + 81*a6 + 1215
  159. 1 4 5 2 1 2
  160. {-----*a6 - ----*a6 + ---*a6 + ---,
  161. 126 42 2 7
  162. 1 4 5 2 4
  163. - (----*a6 - ----*a6 + ---),
  164. 63 21 7
  165. 1 4 5 2 1 2
  166. -----*a6 - ----*a6 - ---*a6 + ---}
  167. 126 42 2 7
  168. for each j in ws product (x-j);
  169. 3
  170. x - 3*x + 7
  171. split_field(x**3+4*x**2+x-1);
  172. *** Splitting field is generated by:
  173. 3 2
  174. a7 + 4*a7 + a7 - 1
  175. 2 2
  176. {a7,a7 + 3*a7 - 2, - (a7 + 4*a7 + 2)}
  177. for each j in ws product (x-j);
  178. 3 2
  179. x + 4*x + x - 1
  180. split_field(x**3-x**2-x-1);
  181. *** Splitting field is generated by:
  182. 6 5 4 3 2
  183. a9 - 6*a9 + 7*a9 + 12*a9 - 17*a9 - 6*a9 + 53
  184. 3 4 3 3 1 2 5 17
  185. { - (----*a9 - ----*a9 - ----*a9 - ----*a9 + ----),
  186. 76 19 38 38 76
  187. 3 4 6 3 1 2 14 17
  188. ----*a9 - ----*a9 - ----*a9 + ----*a9 + ----,
  189. 38 19 19 19 38
  190. 3 4 3 3 1 2 33 59
  191. - (----*a9 - ----*a9 - ----*a9 + ----*a9 - ----)}
  192. 76 19 38 38 76
  193. for each j in ws product (x-j);
  194. 3 2
  195. x - x - x - 1
  196. % A longer example.
  197. off arnum;
  198. defpoly a**6+3*a**5+6*a**4+a**3-3*a**2+12*a+16;
  199. factorize(x**3-3);
  200. 1 5 1 4 1 3 5 2 1
  201. {x - (----*a + ---*a + ---*a + ----*a - ---*a + 1),
  202. 12 4 2 12 4
  203. 1 5 1 4 1 3 7 2 11 4
  204. x - (----*a + ----*a + ---*a - ----*a + ----*a + ---),
  205. 12 12 6 12 12 3
  206. 1 5 1 4 2 3 1 2 2 7
  207. x + (---*a + ---*a + ---*a - ---*a + ---*a + ---)}
  208. 6 3 3 6 3 3
  209. end;
  210. (TIME: arnum 21999 22849)
  211. End of Lisp run after 22.03+1.49 seconds