jennico Posted October 5, 2008 Share Posted October 5, 2008 (edited) hi there, i need to operate with large integers. example: Mod(2121233235543365*2121233235543365,5232225434356058) the result must be smaller than 5232225434356058, but autoit cannot handle the intermediate product. so i tried it with dllcalls : Dim $tStruct = DllStructCreate("double");or uint64 or int64 ? DllStructSetData($tStruct, 1, DllStructGetData($tStruct, 1) +2121233235543365) DllStructSetData($tStruct, 1, DllStructGetData($tStruct, 1) *2121233235543365) DllStructSetData($tStruct, 1, DllStructGetData($tStruct, 1) /5232225434356058) MsgBox(0,"result=",DllStructGetData($tStruct, 1)) the result (an integer) is correct so far. but i wanted a modulo operation. can anyone tell me the equivalent so that i can get the remainder and not the integer part of the division ? thx j. Edited October 5, 2008 by jennico Spoiler I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.Don't forget this IP: 213.251.145.96 Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 6, 2008 Share Posted October 6, 2008 hi there, i need to operate with large integers. example: Mod(2121233235543365*2121233235543365,5232225434356058) the result must be smaller than 5232225434356058, but autoit cannot handle the intermediate product. so i tried it with dllcalls : Dim $tStruct = DllStructCreate("double");or uint64 or int64 ? DllStructSetData($tStruct, 1, DllStructGetData($tStruct, 1) +2121233235543365) DllStructSetData($tStruct, 1, DllStructGetData($tStruct, 1) *2121233235543365) DllStructSetData($tStruct, 1, DllStructGetData($tStruct, 1) /5232225434356058) MsgBox(0,"result=",DllStructGetData($tStruct, 1)) the result (an integer) is correct so far. but i wanted a modulo operation. can anyone tell me the equivalent so that i can get the remainder and not the integer part of the division ? thx j. Have you tried this on a 64bit OS, with the 64bit compile option of AutoIt? And is your sig really saying you are running version 3.2.8.1 of AutoIt? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now