|
Post by scalion on Aug 30, 2022 21:21:55 GMT 1
Hello all,
If you want manipulate big integers using string variable i wrote this library :
Example how to use :
$Library "gfawinx" $Library "UpdateRT" UpdateRuntime ' Patches GfaWin23.Ocx
$Library "IntString"
Global String A, B, C
FullW 1 AutoRedraw = True FontName = "Lucida Console" FontSize = 12
A = "200000000000000000000000000000000000000000000000000000000000000" B = "123456789" Print "A = " ; A Print " = " ; IS_FormatGame(A) Print " = " ; IS_FormatScientific(A, 5) Print "B = " ; B Print " = " ; IS_FormatGame(B) Print " = " ; IS_FormatScientific(B, 5) Print "A + B = "; IS_Add(A, B) Print "A - B = "; IS_Sub(A, B) Print "A * B = "; IS_Mul(A, B) Print "A / B = "; IS_Div(A, B) Print "A % B = "; IS_Mod(A, B) Print "SQR(A)= "; IS_Sqr(A) Print "SQR(B)= "; IS_Sqr(B)
Do Sleep Loop Until Me Is Nothing
Have a good day !
|
|
|
Post by dragonjim on Aug 31, 2022 10:53:54 GMT 1
Interesting. I look forward to testing it.
|
|
|
Post by (X) on Feb 4, 2023 16:18:20 GMT 1
Merci Nic! I have been toying around with a Star Trek game and found the universe is a big place! I found I could not store locations for objects at cubic meter precision at the Galactic level, let alone Universe level. Now, with your library, I can!
A quick check shows that a Double typed variables offers up to 15 significant digits, and Large type offers up to 19.
From: GFAHelp
|
|