qbs_str my mod
#1
as seen here https://staging.qb64phoenix.com/showthre...114#pid114 I worked on changing the qbs_str function for double and float
I went ahead and incorporated the changes in libqb.cpp and built QB64, here's a sample
Code: (Select All)
$Console:Only
_Dest _Console

Print Factorial_Recursive(1000)

Function Factorial_Recursive## (n As Integer)
    If n = 0 Then Factorial_Recursive## = 1: Exit Function
    Factorial_Recursive## = n * Factorial_Recursive##(n - 1)
End Function
output
Quote:4.02387260077093773F+2567

Press any key to continue
even though I did some testing for bugs some may have slipped trough

looks like I found a bug, not ready for prime-time

it has a strange effect on print using
Code: (Select All)
$Console:Only
_Dest _Console
Dim As _Float f

f = Factorial_Recursive(50)
Print Using "##.##################"; f
Print f

Function Factorial_Recursive## (n As Integer)
    If n = 0 Then Factorial_Recursive## = 1: Exit Function
    Factorial_Recursive## = n * Factorial_Recursive##(n - 1)
End Function
Quote:%30414093201713378039796484017234741538658648106343392576177963008.000000000000000000
3.0414093201713378F+64

Press any key to continue
Reply


Messages In This Thread
qbs_str my mod - by Jack - 04-19-2022, 01:18 AM
RE: qbs_str my mod - by Pete - 04-19-2022, 02:16 AM
RE: qbs_str my mod - by Jack - 04-19-2022, 02:36 AM
RE: qbs_str my mod - by admin - 04-19-2022, 04:03 AM
RE: qbs_str my mod - by Jack - 04-19-2022, 03:57 PM
RE: qbs_str my mod - by Jack - 04-19-2022, 06:57 PM
RE: qbs_str my mod - by Jack - 04-19-2022, 10:21 PM
RE: qbs_str my mod - by Jack - 04-20-2022, 02:34 AM
RE: qbs_str my mod - by Jack - 04-20-2022, 03:08 PM
RE: qbs_str my mod - by admin - 04-20-2022, 03:22 PM



Users browsing this thread: 6 Guest(s)