Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
Ewh! disappointing that QB64pe dies in mid 18,000's BaCon and FreeBasic do way better...
https://rosettacode.org/wiki/Find_limit_...sion#BASIC
Here is code I checked with, maybe there is better?
Code: (Select All)
howRecursive 1
Sub howRecursive (i As _Integer64)
If i < 0 Then Print "_Integer64 turned negative.": End
Print i
_Delay .000000000005
howRecursive i + 1
End Sub
Maybe with manual stack?
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
05-28-2023, 06:10 PM
(This post was last modified: 05-28-2023, 06:24 PM by bplus.)
Oh you guys and gals have been busy!
I was testing other Basics and learned LB could go to 4 million +
Well I doubled that in QB64pe v3.7 with same code tip: use a GoSub!
Code: (Select All)
Dim i As _Integer64
i = 1
GoSub howRecursive
End
howRecursive:
If i < 0 Then Print "_Integer64 turned negative.": End
Print i
_Delay .000000000005
i = i + 1
GoSub howRecursive
Return
I was up past 8 million or was it 81 million? I stopped program to get my computer back to do more stuff.
Oh hey! Works way way way faster w/o delay (the key word = works)
Way past 200 million as I write this.
3 Billion+ whats to stop this? The _Integer64 Type I think.
Oh got over .5 Billion not 3 Billion, misread numbers:
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
05-28-2023, 10:30 PM
(This post was last modified: 05-28-2023, 10:31 PM by bplus.)
Quote:if your program dies you will still have the printout in the cmd window
Clever
@Jack, do you still need delay? I didn't when used the GoSub version.
Quote:with BAM, and it conked out at 536.85 million.
@CharlieJV Looks like we get similar results with GoSub and yeah, it still has some surprises for us
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever
Posts: 4,692
Threads: 222
Joined: Apr 2022
Reputation:
322
05-28-2023, 11:14 PM
(This post was last modified: 05-28-2023, 11:17 PM by bplus.)
@dbox now I see why you wrote the version you did, this is about half an hour in (still running):
But without some delay it wont work at all, or just seems to sit there no error, no printing.
Without the delay QB64pe just does a wait circle and then crashes.
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever