Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias NUMBER_TO_NUMBERS {
- .bigfloat on
- var %bits
- var %encrypted $1
- var %count $2
- while %count {
- var %encrypted %encrypted + 1
- var %current_bit 0
- while ($calc((%encrypted / (2 ^ %current_bit)) % 2) == 0) inc %current_bit
- var %encrypted $calc(((%encrypted / (2 ^ %current_bit) + 1) / 2) - 1)
- var %bits %current_bit %bits
- dec %count
- }
- return %bits
- }
- alias NUMBERS_TO_NUMBER {
- .bigfloat on
- var %encrypted $1 + 1
- tokenize 32 $2-
- while $0 {
- var %encrypted $calc((%encrypted * 2 - 1) * (2 ^ $1))
- tokenize 32 $2-
- }
- var %encrypted %encrypted - 1
- return %encrypted
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement