07-09-2023, 06:35 AM
also for Windows x64 you can use pari https://staging.qb64phoenix.com/showthread.php?tid=536
Code: (Select All)
_Title "libpari-fib-demo"
$Console:Only
_Dest _Console
Declare Dynamic Library "libpari"
Sub pari_init (ByVal parisize~&&, Byval maxprime~&&)
Sub pari_close ()
Sub pari_print_version ()
Function setdefault~&& (s As String, v As String, Byval flag&&)
Function strtoGENstr~&& (s As String)
Function setrealprecision&& (ByVal n&&, prec&&)
Function GENtostr$ (ByVal x~&&)
Function geval~&& (ByVal x~&&)
Sub outmat (ByVal x~&&)
Function gp_input~&& ()
Function stoi~&& (ByVal x&&)
Function abscmpiu& (ByVal x~&&, Byval y As _Unsigned _Integer64)
Function abscmpui& (ByVal x As _Unsigned _Integer64, Byval y~&&)
Function absequaliu& (ByVal x~&&, Byval y As _Unsigned _Integer64)
Function gequal& (ByVal x~&&, Byval y~&&)
Function gcmp& (ByVal x~&&, Byval y~&&)
End Declare
Dim As _Unsigned _Integer64 a, b, c, d, e, f
Dim As String s1, s2, s3
Dim As _Integer64 flag, prec
pari_init 80000000, 500000
'pari_print_version
Print
s1 = "fibonacci(5000)" + Chr$(0)
a = strtoGENstr(s1) 'convert to GEN string
b = geval(a) 'eval the string in a
'outmat b
s3 = GENtostr(b)
Print "fibonacci(5000) = "; s3
pari_close