Search found 2215 matches

by srvaldez
Apr 05, 2020 3:06
Forum: General
Topic: using gcc quadmath
Replies: 53
Views: 3458

Re: using gcc quadmath

hello codelab I can't reproduce the error the code you posted -- reproduced below -- gives -443815497.152174 I don't have the build script anymore, it's been a long time, I tried the Windows cmd prompt but it won't accept wildcards when invoking gcc, so this won't work gcc -O2 -shared -static -o lib...
by srvaldez
Apr 01, 2020 14:03
Forum: General
Topic: using gcc quadmath
Replies: 53
Views: 3458

Re: using gcc quadmath

Hi codelab, welcome to the FreeBasic Forum
I think that this is the latest QuadMath
I don't know what error you are getting, could it it be a duplicated definition?
what are your goals?
by srvaldez
Mar 24, 2020 12:01
Forum: General
Topic: Corona virus simulator
Replies: 41
Views: 1378

Re: Corona virus simulator

see https://www.washingtonpost.com/graphics ... simulator/
Richard Russel author of bbc Basic wrote a nice version in bbc Basic, but their Forum is down so I can't post a link
by srvaldez
Mar 16, 2020 10:57
Forum: Community Discussion
Topic: BASIC(modified B++ complier) + wxWidgets
Replies: 38
Views: 2338

Re: BASIC(modified B++ complier) + wxWidgets

I agree, the whole thread should be deleted.
by srvaldez
Mar 09, 2020 13:46
Forum: Windows
Topic: Epoch time.
Replies: 30
Views: 962

Re: Epoch time.

thanks deltarho[1859]
time and date are interesting contraptions.
by srvaldez
Mar 08, 2020 16:43
Forum: Windows
Topic: Epoch time.
Replies: 30
Views: 962

Re: Epoch time.

@deltarho[1859]
in addition to the lines of code you mention, you also need to add
dim as SystemTime stUTCTime
after that, it gives the expected result
by srvaldez
Mar 08, 2020 13:25
Forum: Windows
Topic: Epoch time.
Replies: 30
Views: 962

Re: Epoch time.

there's probably some kind time-zone adjustment made which throws off the date and time
if I change the base-year to 1800 then the following input
TestTime = Type(1809, 2, 0, 12, 0 ,0 ,0 ,0)
gives
287625600000
Saturday, 11 February 1809 18:00:00:000
by srvaldez
Mar 08, 2020 10:50
Forum: Windows
Topic: Epoch time.
Replies: 30
Views: 962

Re: Epoch time.

Hello deltarho[1859] good job, but for fun try February 12, 1809 SystemTimeToEpochTime fails, however, if I get the Epochtime from https://www.epochconverter.com/ -> -5077000999000 and plug that value in EpochTimeToSystemTime( Epochtime, True ) it correctly prints the date Sunday, 12 February 1809 i...
by srvaldez
Mar 05, 2020 12:10
Forum: General
Topic: windows include files are broken
Replies: 7
Views: 343

Re: windows include files are broken

so if I find a snippet in MS help on the web that has an example like #include <winbase.h> #include <winnt.h> #include <time.h> void UnixTimeToFileTime(time_t t, LPFILETIME pft) { // Note that LONGLONG is a 64-bit value LONGLONG ll; ll = Int32x32To64(t, 10000000) + 116444736000000000; pft->dwLowDate...
by srvaldez
Mar 05, 2020 10:39
Forum: General
Topic: windows include files are broken
Replies: 7
Views: 343

Re: crt.bi is broken

A small example, please. sorry for being so late, at the time I couldn't come up with a simple and short example, but today I came across some problems, try to compile the following #include once "win/winbase.bi" #include once "win/winnt.bi" #include once "crt/time.bi"...
by srvaldez
Mar 04, 2020 14:43
Forum: General
Topic: constant e calculation, how does it work?
Replies: 2
Views: 139

Re: constant e calculation, how does it work?

small modification const M=10000 'power of 10 dim as long L=len(trim(str(M-1))) dim as string s dim as longint N=9009\L+M, n_=N, a(N-1), x=0 n_-=1 while n_>0 a(n_)=1+1\n_ n_-=1 wend N-=1 while N>(M-1) for n_=N to 1 step -1 a(n_)=x mod n_ x=M*a(n_-1)+x\n_ next s=trim(str(x)) if len(s)<L then s=string...
by srvaldez
Mar 04, 2020 14:05
Forum: General
Topic: constant e calculation, how does it work?
Replies: 2
Views: 139

constant e calculation, how does it work?

I found this little C snippet that calculates the constant e http://numbers.computation.free.fr/Constants/TinyPrograms/tinycodes.html item 2 main(){int N=9009,n=N,a[9009],x;while(--n)a[n]=1+1/n; for(;N>9;printf("%d",x)) for(n=N--;--n;a[n]=x%n,x=10*a[n-1]+x/n);} I tranlated it to FB dim as ...
by srvaldez
Mar 03, 2020 11:48
Forum: Windows
Topic: New tool for WinFBE
Replies: 2
Views: 226

Re: New tool for WinFBE

hi deltarho[1859] what would also be handy is a list of register usage on Windows and Linux, I mean the registers used as parameters to functions. for example, x64 Windows uses rcx, rdx, r8 and r9 while Linux uses rdi, rsi, rdx and rcx the list is probably not complete but gives an idea it would be ...
by srvaldez
Mar 02, 2020 21:58
Forum: General
Topic: gcc compiler's performance
Replies: 16
Views: 374

Re: gcc compiler's performance

interesting and informative, thank you deltarho[1859] :-)
by srvaldez
Mar 02, 2020 3:51
Forum: General
Topic: biorhythm
Replies: 1
Views: 159

biorhythm

silly biorhythm dim as integer bday, bmonth, d, f, by, bd, j, bm, pm, pd, py, k, ph, byear, em, pmonth, pday, pyear, in, s #macro af(b) int(17 - 16 * sin (6.283185307179586 * d / (b))) #endmacro cls input "please enter your birth date (m,d,yyyy) ";bmonth,bday,byear print input "please...

Go to advanced search