Variouscacti

Exponentiation Hypixel Housing

Dec 15th, 2023
604
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. // inputs: stat b, stat n
  2. // b^n = x
  3. // output: stat x
  4.  
  5. // if b^n exeeds 2^63-1 or -2^63 x will overflow with no detection
  6.  
  7. if (stat n >= 32) {
  8. stat b4 = %stat.player/b%
  9. stat b4 *= %stat.player/b4%
  10. stat b4 *= %stat.player/b4%
  11. stat b16 = %stat.player/b4%
  12. stat b16 *= %stat.player/b16%
  13. stat b16 *= %stat.player/b16%
  14. stat x = %stat.player/b16%
  15. stat x *= %stat.player/b16%
  16. stat nTemp = %stat.player/n%
  17. stat nTemp += 88
  18. } else {
  19. stat x = 1
  20. stat b4 = %stat.player/b%
  21. stat b4 *= %stat.player/b4%
  22. stat b4 *= %stat.player/b4%
  23. stat b16 = %stat.player/b4%
  24. stat b16 *= %stat.player/b16%
  25. stat b16 *= %stat.player/b16%
  26. stat nTemp = %stat.player/n%
  27. stat nTemp += 120
  28. }
  29.  
  30. if (stat nTemp >= 136) {
  31. stat b -= 1
  32. stat b4 -= 1
  33. stat x *= %stat.player/b16%
  34. stat nTemp -= 16
  35. stat conditional = %stat.player/nTemp%
  36. stat conditional /= 128
  37. stat conditional *= 8
  38. stat nTemp -= %stat.player/conditional%
  39. stat conditional /= 8
  40. stat conditional *= %stat.player/b4%
  41. } else {
  42. stat b -= 1
  43. stat b4 -= 1
  44. stat conditional = %stat.player/nTemp%
  45. stat conditional /= 128
  46. stat conditional *= 8
  47. stat nTemp -= %stat.player/conditional%
  48. stat conditional /= 8
  49. stat conditional *= %stat.player/b4%
  50. }
  51. if (stat nTemp >= 124) {
  52. stat conditional += 1
  53. stat x *= %stat.player/conditional%
  54. stat x *= %stat.player/conditional%
  55. stat b4 += 1
  56. stat x *= %stat.player/b4%
  57. stat nTemp -= 62
  58. stat conditional = %stat.player/nTemp%
  59. stat conditional /= 64
  60. stat nTemp -= %stat.player/conditional%
  61. stat nTemp -= %stat.player/conditional%
  62. } else {
  63. stat conditional += 1
  64. stat x *= %stat.player/conditional%
  65. stat x *= %stat.player/conditional%
  66. stat nTemp -= 58
  67. stat conditional = %stat.player/nTemp%
  68. stat conditional /= 64
  69. stat nTemp -= %stat.player/conditional%
  70. stat nTemp -= %stat.player/conditional%
  71. }
  72.  
  73. if (stat nTemp >= 63) {
  74. stat conditional *= %stat.player/b%
  75. stat conditional += 1
  76. stat x *= %stat.player/conditional%
  77. stat x *= %stat.player/conditional%
  78. stat b += 1
  79. stat x *= %stat.player/b%
  80. stat nTemp = 0
  81. stat b4 = 0
  82. stat b16 = 0
  83. stat conditional = 0
  84. } else {
  85. stat conditional *= %stat.player/b%
  86. stat conditional += 1
  87. stat x *= %stat.player/conditional%
  88. stat x *= %stat.player/conditional%
  89. stat nTemp = 0
  90. stat b += 1
  91. stat b4 = 0
  92. stat b16 = 0
  93. stat conditional = 0
  94. }
Advertisement
Add Comment
Please, Sign In to add comment