Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64 Phoenix Edition v3.9.0 Released!
#38
This is one of my programs:

Code: (Select All)

'! PROGRAM: GAMMA.BAS
'! This Programm calculates the gammafunction for a specified value.
'! created April 04, 2017 by Bruno Schaefer, Losheim am See, Germany
'! last review: March 28, 2018

Input "Input value: "; value##
result## = gamma##(value##)
Print result##


Function gamma## (x##)
    n = 550
    a## = (x## + n)
    b## = x##
    For I = 1 To (n - 1)
        b## = b## * (x## + I)
    Next I
    Let gamma## = Sqr((2 * _Pi(1)) / a##) * a## ^ a## * Exp(a## * (-1) + (1 / (12 * a##)) - (1 / (360 * a## ^ 3))) / b##
End Function

Input values i.e. :  3  ->   result :  2
                             8  ->   result: 5040

 It worked fine in QBPE64 version 3.8.0 and older versions. 

Since QBPE64 version 3.9.0 the result is: inf

Whats wrong?
Reply


Messages In This Thread
QB64 Phoenix Edition v3.9.0 Released! - by a740g - 10-05-2023, 06:31 AM
_FLOAT problem: What has happend with QB64 - by BSpinoza - 10-07-2023, 03:37 AM



Users browsing this thread: 1 Guest(s)