AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Numbers Numbers Numbers, can someone help me make this work?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Sarah



Joined: 12 Jul 2007
Posts: 90
Location: Hawaii, USA

PostPosted: Wed Jun 04, 2008 1:50 pm    Post subject: Numbers Numbers Numbers, can someone help me make this work? Reply with quote

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? Smile It would be greatly appreciated Smile Smile Have a great day & thank you!
Back to top
View user's profile Send private message
SKAN



Joined: 26 Dec 2005
Posts: 6264

PostPosted: Wed Jun 04, 2008 2:18 pm    Post subject: Reply with quote

Quote:
basically pure high level math or some other technique all on one line


Code:
NumPut( 12855,(Output:="  ") )
MsgBox, % Output
Back to top
View user's profile Send private message
John W



Joined: 09 Apr 2007
Posts: 172

PostPosted: Wed Jun 04, 2008 2:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Sarah



Joined: 12 Jul 2007
Posts: 90
Location: Hawaii, USA

PostPosted: Wed Jun 04, 2008 2:37 pm    Post subject: Reply with quote

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! Smile
Back to top
View user's profile Send private message
greynite



Joined: 17 May 2008
Posts: 11

PostPosted: Wed Jun 04, 2008 2:55 pm    Post subject: Reply with quote

How about:

Code:
value:=ln(input)

output:=exp(value)


Thus you could store 10 (decimal) as:
Code:
output:=exp(2.3025850929940456840179914546844)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group