can anyone help?
I need to know every digit of a number which is larger than 10^15 and which could not be shown by calculator or AutoIt3. So I use an array for storing each digit and then for showing all the elements of the array.
but I found one thing hard to understand. For $x = 100000001 but not other some numbers, why are the calculation results of $x^2 different, of which the latter is obviously right?
Below is the script I wrote.
====================================
$x = 100000001
$d = $x^2
$t= Int(Log($d)/Log(10))
dim $array[$t+1]
$out = ""
For $i = 0 To $t
$array[$i] = Int($d/10^($t-$i))
$out = $out & $array[$i]
$d = $d - Int($d/10^($t-$i))*10^($t-$i)
Next
Run("calc.exe")
WinWaitActive("Calculator")
AutoItSetOption("SendKeyDelay", 200)
ClipPut($x)
Send("^v")
Send("*")
Send("^v")
Send("=")
Send("^c")
;Send("100000001*100000001=")
$out2 = ClipGet()
WinClose("Calculator")
WinWaitClose("Calculator")
msgbox(0,"Comparison","by array: " & @CRLF &_
" " & $x & "^2=" & $out & @CRLF &_
@CRLF & @CRLF &_
"by calculator: " & @CRLF &_
" " & $x & "^2=" & $out2)