Advertisement
Guest User

attempt at hypercalc mod

a guest
Apr 26th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 0 'hypercalc basic
  2. 1 let t=%;
  3. 3 let t0=t;
  4. 4 print "t0 is "; t0
  5. 6 if t0<0=1 then 500
  6. 7 if t0<0=0 then 10
  7. 10 let  t1=t0/64;
  8. 11 print "t1 is "; t1
  9. 12 if t1<64=1 then 485
  10. 15 ' 185 is end seq
  11. 16 'get len
  12. 19 let len=0;
  13. 20 let t2=t1*10;
  14. 25 let len=len+1;
  15. 30 if t2<1=1 then 40
  16. 32 if t2<1=0 then 20
  17. 35 if t2=1=1 then 20
  18. 37 if t2<0=1 then 485
  19. 40 let length=len;
  20. 45 print "length is "; length
  21. 50 let t3=t2*10^length;
  22. 52 print "t3 is "; t3
  23. 55
  24. 110  let d=%;
  25. 130  let d1=d;
  26. 131  let d1=d1-1;
  27. 132 if d1<1=0 then 136
  28. 134 if d1<1=1 then 138
  29. 136 go to 131
  30. 138 let rem=d1;
  31. 140 ' print "rem is "; rem
  32. 142 let mod=d-d1;
  33. 144 ' print "mod is "; mod
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. 185 let d=t1;
  49. 186 let d1=d;
  50. 188 let d1=d1-1;
  51. 190 if d1<1=0 then 188
  52. 192 if d1<1=1 then 193
  53. 193 let rem=d1;
  54. 194 print "                                                     "; rem
  55. 195 let mod=d-d1;
  56. 196 ' print "mod is "; mod
  57. 197 let t7=mod/64;
  58. 198 print "                                                     "; t7
  59. 200 go to 300
  60. 485 print "error negative int"
  61. 500 end
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86. 15 let t2=logn(64,t1);
  87. 16 ' print "t2 is "; t2
  88. 20 let d=t2;
  89. 30 let d1=d;
  90. 31 let d1=d1-1;
  91. 40 if d1<1=0 then 60
  92. 50 if d1<1=1 then 70
  93. 60 go to 31
  94. 70 let rem=d1;
  95. 71 ' print "rem is "; rem
  96. 80 let mod=d-d1;
  97. 81 ' print "mod is "; mod
  98. 120 let t3=mod;
  99. 121 ' print "t3 is "; t3
  100. 125 let t4=64^t3;
  101. 126 ' print "t4 is "; t4
  102. 130 let t5=t1-t4;
  103. 131 ' print "t5 is "; t5
  104. 133 let d=t5;
  105. 136 let d1=d;
  106. 139 let d1=d1-1;
  107. 142 if d1<1=0 then 148
  108. 145 if d1<1=1 then 151
  109. 148 go to 139
  110. 151 let rem=d1;
  111. 154 ' print "rem is "; rem
  112. 157 let mod=d-d1;
  113. 160 ' print "mod is "; mod
  114. 163 print "                                                     "; rem
  115. 166 let t6=t5-rem;
  116. 169 ' print "t6 is "; t6
  117. 172 let t0=t1-rem;
  118. 175 ' print "t0 is "; t0
  119. 176 if t5<0=1 then 200
  120. 178 if t5<0=0 then 4
  121. 180 if t1<64=1 then 185
  122. 185 let d=t1;
  123. 186 let d1=d;
  124. 188 let d1=d1-1;
  125. 190 if d1<1=0 then 188
  126. 192 if d1<1=1 then 193
  127. 193 let rem=d1;
  128. 194 print "                                                     "; rem
  129. 195 let mod=d-d1;
  130. 196 ' print "mod is "; mod
  131. 197 let t7=mod/64;
  132. 198 print "                                                     "; t7
  133. 200 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement