Welcome, Guest. Please login or register.
July 31, 2010, 08:00:03 PM
Home Help Search Login Register
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base

Qbasicnews.com  |  Qbasic "like" compilers/interpreters  |  FB Discussion & Programming Help  |  FB Projects  |  Topic: Math library for Free Basic « previous next »
Pages: [1] 2 3 4 Print
Author Topic: Math library for Free Basic  (Read 15020 times)
jdebord
Member
*
Posts: 60



WWW
Math library for Free Basic
« on: January 19, 2005, 09:40:05 AM »

Hello,

I have begun writing a math library for Free Basic. The first version is available at:

http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbmath.zip

It's quite limited at this time, but it will be updated regularly.

Best regards,

Jean Debord
Limoges, France
Logged

ean Debord
----------------
Math library for FreeBasic:
http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbmath.zip
Antoni Gual
Na_th_an
*****
Posts: 1433



WWW
Math library for Free Basic
« Reply #1 on: January 19, 2005, 09:57:29 AM »

Bienvenu!

The library looks good.  No idea of the application for half of the functions but is good to have them:D

Where did you heard about FreeBasic?  Progboards forum?
Logged

Antoni
jdebord
Member
*
Posts: 60



WWW
Math library for Free Basic
« Reply #2 on: January 19, 2005, 02:05:43 PM »

Quote
No idea of the application for half of the functions but is good to have them


The special functions are used in probability and statistics. I have a probability module in preparation.

Quote
Where did you heard about FreeBasic? Progboards forum?


Yes. I was looking for a free Basic compiler, without the limitations of QB. FreeBasic seemed the best choice  Smiley
Logged

ean Debord
----------------
Math library for FreeBasic:
http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbmath.zip
Antoni Gual
Na_th_an
*****
Posts: 1433



WWW
Math library for Free Basic
« Reply #3 on: January 19, 2005, 02:18:27 PM »

It seems Jark's site has caused another victim....Cheesy

Yes First Basic will be this year's reason for me for not starting  yet to use C seriously...It lacks only a GUI library...
Logged

Antoni
adosorken
*/-\*
*****
Posts: 3654



WWW
Math library for Free Basic
« Reply #4 on: January 19, 2005, 02:52:08 PM »

GUI library for freeBASIC is in the works as we speak. Cheesy
Logged

'd knock on wood, but my desk is particle board.
R@dioman
Ancient QBer
****
Posts: 410



Math library for Free Basic
« Reply #5 on: January 19, 2005, 02:58:26 PM »

Will your library be able to solve calculus equations? That would be very handy.
Logged

jdebord
Member
*
Posts: 60



WWW
Math library for Free Basic
« Reply #6 on: January 19, 2005, 03:39:48 PM »

Quote
It seems Jark's site has caused another victim


If you mean the Mandelbrot dazibao site, yes, it is in my list of favourites  Smiley  But it seems that it has not been updated for a while...

Quote
Will your library be able to solve calculus equations?


This is planned. Look for the updates...

BTW, which type of equations do you wish to have first ? I plan to include linear systems, polynomials, differential equations, minimization...
Logged

ean Debord
----------------
Math library for FreeBasic:
http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbmath.zip
R@dioman
Ancient QBer
****
Posts: 410



Math library for Free Basic
« Reply #7 on: January 19, 2005, 04:08:41 PM »

the more the better. Summations would be nice
Logged

Antoni Gual
Na_th_an
*****
Posts: 1433



WWW
Math library for Free Basic
« Reply #8 on: January 19, 2005, 05:39:08 PM »

Last time we had news from Jark (last summer) he was very busy divorcing  :-?
Logged

Antoni
relsoft
*/-\*
*****
Posts: 3924



WWW
Math library for Free Basic
« Reply #9 on: January 21, 2005, 06:20:47 AM »

Dang!!! I miss Jark.  He should make a ratracer in FB.
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
jdebord
Member
*
Posts: 60



WWW
Math library for Free Basic
« Reply #10 on: January 22, 2005, 07:27:57 AM »

Hello,

I have just added a solver for linear equations (Gauss-Jordan method):
http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbmath.zip

Solvers for non-linear equations (Newton-Raphson) will follow.

Question: is it necessary to add $DYNAMIC in a procedure which uses local dynamic arrays, to ensure that these arrays are correctly deallocated at the end of the procedure?  I have never used this directive in my QB programs, nor in this solver.

Thanks in advance,

Jean Debord
Logged

ean Debord
----------------
Math library for FreeBasic:
http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbmath.zip
na_th_an
*/-\*
*****
Posts: 8238



WWW
Math library for Free Basic
« Reply #11 on: January 22, 2005, 11:24:02 AM »

If you have dynamic arrays, and you allocate them at the beginning of a SUB procedure, you have to deallocate them at the end with ERASE.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
v3cz0r
I hold this place together
*****
Posts: 924



WWW
Math library for Free Basic
« Reply #12 on: January 22, 2005, 11:56:55 AM »

Deallocation is done automatically with local dynamic arrays.

But they don't need to be dynamic, keep using static arrays (DIM'ed), access is much faster, as they are allocated on stack - that is by default 1MB, what can be changed using the command-line option "-t 4096" for a 4MB stack, for example.
Logged

na_th_an
*/-\*
*****
Posts: 8238



WWW
Math library for Free Basic
« Reply #13 on: January 22, 2005, 12:40:57 PM »

Oh, that's cool. QB ran out of memory if you didn't take care of deallocating Dynamic stuff... Not really sure about it, but when I added those ERASEs my games worked Tongue
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
jdebord
Member
*
Posts: 60



WWW
Math library for Free Basic
« Reply #14 on: January 23, 2005, 06:07:07 AM »

Quote
Deallocation is done automatically with local dynamic arrays


Thanks. So, I was right by not using $DYNAMIC  Smiley

Quote
keep using static arrays (DIM'ed), access is much faster


OK. But it is difficult in scientific applications. In most cases the array size is known only at run time.
Logged

ean Debord
----------------
Math library for FreeBasic:
http://www.unilim.fr/pages_perso/jean.debord/tpmath/fbmath.zip
Pages: [1] 2 3 4 Print 
Qbasicnews.com  |  Qbasic "like" compilers/interpreters  |  FB Discussion & Programming Help  |  FB Projects  |  Topic: Math library for Free Basic « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
SMF Theme © Gaia, Hosting by Employers Job Post
Valid XHTML 1.0! Valid CSS!