|
Post by assdgasfgadfgsdfg on Apr 19, 2010 15:01:35 GMT -5
Hello everyone! I'm new in this forum but not at all with Basic4GL.
I am now solving some problems about ProjectEuler (maybe we could open a thread for this) and sometime I get in trouble with numbers that need to be over 2^32. This constrict me to use other means (such as excel or python).
Is there any way to cope this limitation?
Thank you !
|
|
|
Post by shadow008 on Apr 19, 2010 21:14:02 GMT -5
dim variable as double?
|
|
|
Post by matthew on Apr 20, 2010 5:43:22 GMT -5
Basic4GL will still store the number as a Float even if you declare it as a Single or a Double. If you run the following routine & then examine the Virtual Machine you'll see that the numbers are all stored with the same accuracy. dim a#, b as single, c as double
a# = M_PI : b = 3.14159265 : c = atn(1)*4
I suggest you stick to Python or use C with the GMP library.
|
|
|
Post by aphoticgenesis on Apr 20, 2010 5:56:34 GMT -5
Basic4GL will still store the number as a Float even if you declare it as a Single or a Double. If you run the following routine & then examine the Virtual Machine you'll see that the numbers are all stored with the same accuracy. dim a#, b as single, c as double
a# = M_PI : b = 3.14159265 : c = atn(1)*4
I suggest you stick to Python or use C with the GMP library. uh oh tom.....lol
|
|
|
Post by matthew on Apr 20, 2010 6:06:43 GMT -5
LMAO don't worry, tom already knows, take a look in the Basic4GL Source & you'll see why.
|
|
|
Post by assdgasfgadfgsdfg on Apr 21, 2010 8:00:00 GMT -5
ops I forgot to say that i've alredy tried to dim as double...
Thank you the same all =)
|
|
|
Post by chris857 on Aug 6, 2010 21:46:10 GMT -5
|
|