Search found 2220 matches

by srvaldez
Apr 07, 2020 0:15
Forum: General
Topic: using gcc quadmath
Replies: 61
Views: 3618

Re: using gcc quadmath

Hi codelab
I updated the include file to include formatted output viewtopic.php?p=270387#p270387
see updated example viewtopic.php?p=270388#p270388
by srvaldez
Apr 06, 2020 20:25
Forum: General
Topic: using gcc quadmath
Replies: 61
Views: 3618

Re: using gcc quadmath

simple example #include "quadmath.bi" dim as float128 x, y, z x=7 : Print "x = ";x y=9 : Print "y = ";y 'if the values are fractional then quote the values, otherwise you will loose precision 'example: pi="3.1415926535897932384626433832795029" 'without the Q '...
by srvaldez
Apr 06, 2020 20:24
Forum: General
Topic: using gcc quadmath
Replies: 61
Views: 3618

Re: using gcc quadmath

the latest QuadMath dll, use the bi posted here here's quadmath.bi with overloaded operators and functions quadmath.bi /' GCC Quad-Precision Math Library Copyright (C) 2010, 2011 Free Software Foundation, Inc. Written by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> This file is part of the libqua...
by srvaldez
Apr 06, 2020 15:17
Forum: General
Topic: using gcc quadmath
Replies: 61
Views: 3618

Re: using gcc quadmath

here's how I would write them in Basic, unfortunately no unsigned integer comparison, but most unsigned integers will fit in a signed integer, so this should work OK #include "quadmath.bi" function cmp_128_128(byref x as float128, byref y as float128) as long dim as float128 r r=subq(x, y)...
by srvaldez
Apr 06, 2020 14:25
Forum: General
Topic: using gcc quadmath
Replies: 61
Views: 3618

Re: using gcc quadmath

Hi codelab after posting the suggestion to you about overloading the operators, I noticed that there were no comparison functions in the src folder, comparison operators are essential, so you would need to write them in C and then rebuild the dll or perhaps write them using Basic. here's how I would...
by srvaldez
Apr 05, 2020 3:06
Forum: General
Topic: using gcc quadmath
Replies: 61
Views: 3618

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: 61
Views: 3618

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: 1381

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: 2341

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: 964

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: 964

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: 964

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: 964

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"...

Go to advanced search