Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
You would need to do it in a similar what that such types are implemented on low power microprocessors. For both double and long long int I would recommend a pair of integer variables to represent them, one being the low word and the other the high word of the number. You then need to use the available logic of the integer to emulate the necessary logic on both the integers representing a larger integer. Seeing how JASS lacks bitwise operators this can end up quite slow as those have to be emulated as well with lookup tables.
Sadly I cannot find resources explain the emulation algorithms. Some are quite simple such as addition and subtraction. Others are painfully hard like division or sine/tan/power/log.
Well you got modulus... tho its slow but at least its a 1 liner.... so you dont need a whole lib for it.. and its in blizzard.j
you could do stuff like split an int in 2 with not too much trouble if you can get the modulus.
not sure if having divides and multiplies as part of simple addittion can be called satisfactory tho.
its prolly better than whatever ppl do for true bitwise operations tho, ive seen libraries that like have libraries that got sub libraries just for what should be a 1 cycle op on any cpu horrible...
its prolly better than whatever ppl do for true bitwise operations tho, ive seen libraries that like have libraries that got sub libraries just for what should be a 1 cycle op on any cpu horrible...
You will be surprised how fast those complex bitwise operators are, at least compared to anything involving division or multiplication. Ultimately they use lookup tables and a lot of micro optimizations. Not 1 cycle, but still better than nothing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.