Autoit and huge numbers

2 posts in this topic

Hey there

I'm thinking about making a program that will calculate with huge numbers. Well above 1*10^18 probably. Can autoit deal with that? If not, how can I make it work?


Share this post

Link to post
Share on other sites

AutoIt doesn't natively support arbitrary-precision values but this UDF brings some support:


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • triodz
      By triodz
      I want the number in a file to be overwritten with the next number up each time a button is pressed. 
      So it is pressed once, the number '1' is written to the file. It is pressed again and the number '2' overwrites the first number.
      At the moment I get the number 1 written, but can't get it to overwrite. What I have so far:
      #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <FileConstants.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> #Region ### START Koda GUI section ### Form=C:\Users\soulf\Desktop\CalcGui\RLCalc.kxf $Form1 = GUICreate("Form1", 615, 437, 426, 141) $One = GUICtrlCreateButton("1", 32, 72, 25, 25) GUICtrlSetBkColor(-1, 0xFF0000) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Func First ()     $fPath = "C:\temp\First.txt"     $fOpen = FileOpen ($fPath, 2)     $Counter = FileReadLine ($fpath)     $counter = $counter + 1     $fWrite = filewriteline ($fPath, $counter)     FileClose ($fpath) EndFunc While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit         Case $One             Call ("First")     EndSwitch WEnd I tried a Do Until statement, but that just puts the numbers 1 to 5 in the file.
      Any help would be greatly appreciated! 
    • jrsofsd
      By jrsofsd
      RunningStats calculates running (moving) statistics: Standard Deviation, Variance, and Mean . The single function _RunningStats(), queries, clears, restores, or adds to the running statistics.
      Example.au3 adds 7 samples of data to running statistics and displays the results using _ArrayDisplay().
      Example-Persistent-Storage.au3 adds the first 6 samples to the running statistics and stores the results in an INI file. The data is read from the INI file and restored to the running statistics. The 7th sample is added and the results displayed, matching the results from Example.au3.
      Credits: John D. Cook for his article "Accurately computing running variance" at http://www.johndcook.com/blog/standard_deviation/
    • scintilla4evr
      By scintilla4evr
      I started writing this UDF a while ago, so I decided to share it here.
      This is an UDF full of advanced mathematical functions. It allows to work with primes, create number sequences, interpolate, calculate values of functions like Riemann zeta.
      Full list of functions:
    • TheDcoder
      By TheDcoder
      After watching a whole day of "Journey into cryptography" at Khan Academy, I have got to know the secrets behind some sneaky things! . This is one of em', A PRNG (Pseudo Random Number Generator). Its features (atleast what I believe) are:
      Simple, short and crappy. Great for beginners who are baffled by the mechanics of random number generation in computers! Support for custom seeds! EIGHT DIGITS OF RANDOMNESS!!! Unlike all other PRNGs, This one is predictable 1000 possible PRNs when using @MSEC as the seed. No option for min or max, the min is 10000000 and the max is 99999999. The Unlicensed . #cs LICENSE This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to <http://unlicense.org/> #ce LICENSE ; #FUNCTION# ==================================================================================================================== ; Name ..........: MiddleSquareRandom ; Description ...: Pseudo-random number generator based on the infamous "Middle Sqaure" method. ; Syntax ........: MiddleSquareRandom([$iSeed = @MSEC]) ; Parameters ....: $iSeed - [optional] A seed for generation of the random number. Default is @MSEC. ; Return values .: A pseudorandom 8 digit integer. ; Author ........: John von Neumann ; Modified ......: Damon Harris (TheDcoder) - Conversion into AutoIt and simplification + further crappification. ; Remarks .......: Fun Fact - The output is based on the $iSeed passed, Same $iSeed = Same pseudo-random number. ; Related .......: Random() ; Link ..........: https://en.wikipedia.org/wiki/Middle-square_method ; Example .......: ConsoleWrite(MiddleSquareRandom() & @CRLF) ; =============================================================================================================================== Func MiddleSquareRandom($iSeed = @MSEC) Local Const $TURNS = 8 Local $sRandomNumber, $sSeed For $iTurn = 1 To $TURNS $iSeed = $iSeed * 2 $sSeed = String($iSeed) $sRandomNumber &= StringMid($sSeed, Ceiling(StringLen($iSeed) / 2), 1) Next Return Int($sRandomNumber) EndFunc  
      Enjoy your numbers, TD .
    • rm4453
      By rm4453
      I keep getting error : Statement cannot be just an expression.
      Here are the 3 error variations it gives:
      Global $ImageCount += 1
      Global $ImageCount += 1
      Global $ImageCount +=
      Here is the code:
      Case $Image1 ;GUICtrlSetState($Image1, 4+128) GUICtrlSetState($Image2, 64) $Image1_done = 1 OpenImages() Global $Image1_added = $imagePath ;MsgBox("Info", "Image 1 Path", $Image1_added) OpenEditBox() Global $Image1_Description = $editBox_save If $im1 = 0 Then Global $ImageCount += 1 $im1 = 1 EndIf Case $Image2 If $Image1_done = 1 Then ;GUICtrlSetState($Image2, 4+128) GUICtrlSetState($Image3, 64) OpenImages() Global $Image2_added = $imagePath ;MsgBox("Info", "Image 2 Path", $Image2_added) OpenEditBox() Global $Image2_Description = $editBox_save $Image2_done = 1 If $im2 = 0 Then Global $ImageCount += 1 $im2 = 1 EndIf Else EndIf Case $Image3 If $Image2_done = 1 Then ;GUICtrlSetState($Image3, 4+128) GUICtrlSetState($Image4, 64) OpenImages() Global $Image3_added = $imagePath ;MsgBox("Info", "Image 3 Path", $Image3_added) OpenEditBox() Global $Image3_Description = $editBox_save $Image3_done = 1 If $im3 = 0 Then Global $ImageCount += 1 $im3 = 1 EndIf Else EndIf Case $Image4 If $Image3_done = 1 Then ;GUICtrlSetState($Image4, 4+128) GUICtrlSetState($Image5, 64) OpenImages() Global $Image4_added = $imagePath ;MsgBox("Info", "Image 4 Path", $Image4_added) OpenEditBox() Global $Image4_Description = $editBox_save $Image4_done = 1 If $im4 = 0 Then Global $ImageCount += 1 $im4 = 1 EndIf Else EndIf Case $Image5 If $Image4_done = 1 Then ;GUICtrlSetState($Image5, 4+128) GUICtrlSetState($Image6, 64) OpenImages() Global $Image5_added = $imagePath ;MsgBox("Info", "Image 5 Path", $Image5_added) OpenEditBox() Global $Image5_Description = $editBox_save $Image5_done = 1 If $im5 = 0 Then Global $ImageCount += 1 $im5 = 1 EndIf Else EndIf Case $Image6 If $Image1_done = 1 Then ;GUICtrlSetState($Image6, 4+128) OpenImages() Global $Image6_added = $imagePath ;MsgBox("Info", "Image 6 Path", $Image6_added) OpenEditBox() Global $Image6_Description = $editBox_save If $im6 = 0 Then Global $ImageCount += 1 $im6 = 1 EndIf Else EndIf