64 Bit's in QB? adosorken Posting Freak Posts: 3,279 Threads: 170 Joined: Nov 2003 02-13-2004, 09:26 PM Correct me if I'm wrong but...isn't a DOUBLE 64 bits? I'd knock on wood, but my desk is particle board. Zack Posting Freak Posts: 3,616 Threads: 287 Joined: Jan 2003 02-13-2004, 09:31 PM In VB...a DECIMAL is 64 bits, right? f only life let you press CTRL-Z. -------------------------------------- Freebasic is like QB, except it doesn't suck. adosorken Posting Freak Posts: 3,279 Threads: 170 Joined: Nov 2003 02-13-2004, 09:42 PM There is no DECIMAL type in VB. I'd knock on wood, but my desk is particle board. TheBigBasicQ Posting Freak Posts: 4,307 Threads: 63 Joined: May 2003 02-14-2004, 12:30 AM Yup double precision is 8bytes or 64Bits =P. Agamemnus Posting Freak Posts: 3,368 Threads: 195 Joined: Jan 2003 02-14-2004, 12:43 AM 2^32000 in 12 seconds. P2 400mhz. Extrapolation from digit-by-digit multiplication with strings. (a 4-bit array is the minimum for this computation) Code:```CLS DIM a%(0 TO 10000) 'should be as large as # of digits base 10 to store answer. t1# = TIMER a%(0) = 1 k% = 0 FOR i% = 0 TO 31999 '2 ^ 32000 j% = 0: DO IF a%(j%) > 4 THEN IF j% = k% THEN k% = k% + 1 a%(j%) = a%(j%) - 5: a%(j%) = a%(j%) * 2 + n%: n% = 1 ELSE a%(j%) = a%(j%) * 2 + n%: n% = 0 END IF IF j% = k% THEN EXIT DO j% = j% + 1 LOOP NEXT i% FOR i% = 0 TO k% a\$ = LTRIM\$(STR\$(a%(i%))) + a\$ NEXT i% t2# = TIMER PRINT a\$ PRINT PRINT t2# - t1#``` Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war." Visit www.neobasic.net to see rubbish in all its finest. TheBigBasicQ Posting Freak Posts: 4,307 Threads: 63 Joined: May 2003 02-14-2004, 01:08 AM Whoa! You made this? Agamemnus Posting Freak Posts: 3,368 Threads: 195 Joined: Jan 2003 02-14-2004, 02:15 AM .............. Yes.. I think I figured out how to extend it: Just change "< 4" to "< 4999" and "- 5" to "- 5000". It's even faster then: 5 seconds. Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war." Visit www.neobasic.net to see rubbish in all its finest. Z!re Posting Freak Posts: 3,522 Threads: 189 Joined: Dec 2003 02-14-2004, 03:04 AM It's very nice, and fast :lol: but it doesent work for anything but 2^x How would you do the 2 longs approach? (I can't get it to work) toonski84 Posting Freak Posts: 2,020 Threads: 24 Joined: Jun 2002 02-14-2004, 03:30 AM a double is 64-bits, but it's floating point. Though you can get numbers up crazy high with the exponential notation it uses. i]"I know what you're thinking. Did he fire six shots or only five? Well, to tell you the truth, in all this excitement, I've kinda lost track myself. But being as this is a .44 Magnum ... you've got to ask yourself one question: 'Do I feel lucky?' Well, do ya punk?"[/i] - Dirty Harry Z!re Posting Freak Posts: 3,522 Threads: 189 Joined: Dec 2003 02-14-2004, 04:06 AM I mean a 64bit Integer type, I think it's called a dword (double word), no decimals. « Next Oldest | Next Newest »