| View previous topic :: View next topic |
| Author |
Message |
Sarah
Joined: 12 Jul 2007 Posts: 90 Location: Hawaii, USA
|
Posted: Wed Jun 04, 2008 1:50 pm Post subject: Numbers Numbers Numbers, can someone help me make this work? |
|
|
I am looking for interesting ways to represent simple numbers using advanced math techniques to hide the original number that is very unclear by looking at the string ... I am not really looking for encryption, but some one liner that results in the intended number against a String
... so no extra backend functions, or stuff.... basically pure high level math or some other technique all on one line
so, like
72 could be
OUTPUT:=x1+y1/30/{more complexity}
(just an illustration)
so then, if I did a msgbox %output% it would generate 72 if it is constructed properly.
so please nothing simple like OUTPUT:=70+2, .... but something more ingenious with a clear path to make any number i want, is essentially what i am seeking
Could someone please show me an example of how this could work out, with hopefully a straightforward/understandable way to build these one liners, with a math generator or instructions that make sense? It would be greatly appreciated Have a great day & thank you! |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 6264
|
Posted: Wed Jun 04, 2008 2:18 pm Post subject: |
|
|
| Quote: | | basically pure high level math or some other technique all on one line |
| Code: | NumPut( 12855,(Output:=" ") )
MsgBox, % Output |
|
|
| Back to top |
|
 |
John W
Joined: 09 Apr 2007 Posts: 172
|
Posted: Wed Jun 04, 2008 2:30 pm Post subject: |
|
|
| Code: | Crypt(Num)
{
Number = %Num%
Loop
{
Ret := Ret Mod(Number,2)
Number := Number // 2
If !Number
Break
}
Return Ret
}
Decrypt(Num)
{
Ret = 0
Loop, % StrLen(Num)
{
Ret := Ret * 2 + SubStr(Num, 1 - A_Index, 1)
}
Return Ret
} |
Not a one liner, but works well. (conversion to binary system, backwards) _________________ John
Inactive - Until AutoHotkey is available for Linux.
 |
|
| Back to top |
|
 |
Sarah
Joined: 12 Jul 2007 Posts: 90 Location: Hawaii, USA
|
Posted: Wed Jun 04, 2008 2:37 pm Post subject: |
|
|
Thank you <SKAN> & !John!.... two very interesting examples. I am researching that NumPut, I have never seen that before and is very simple.
And those functions I think can be useful some other ways.... I have never thought of that approach before, Reverse Binary -- sweet!  |
|
| Back to top |
|
 |
greynite
Joined: 17 May 2008 Posts: 11
|
Posted: Wed Jun 04, 2008 2:55 pm Post subject: |
|
|
How about:
| Code: | value:=ln(input)
output:=exp(value)
|
Thus you could store 10 (decimal) as:
| Code: | output:=exp(2.3025850929940456840179914546844)
|
|
|
| Back to top |
|
 |
|