[Implemented] UDP Network !!!

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by geoff.

Thanks Fred for your commitment on this one, and sorry I am beginning to irritate on this subject.

For those of you who are unaware of the benefit of doubles:

IEEE 64 bit floats (ie doubles) are accurate to 15 decimal places for numbers in the number range 1e-300 to 1e300.
That's accurate enough for most applications and is the basis of most scientific computing, certainly in the scientific modelling community I am familiar with.

Of course there are always exceptions, if you add a very small number to a large number then you are not using the full accuracy of the small number, but in any case your answer will still be accurate to 15 decimal digits or thereabouts.

Anyone who wants to check the accuracy of the algorithms they are using, have a look at the calculator on my web site:

http://www.home52365.fsnet.co.uk/bcalc.htm

This employs large integers for calculating the transcendental functions even when the numbers are actually floating point, as Fred suggests.

But PureBasic users should not worry about these unusual examples. For the vast majority of your computing needs, doubles will give you the accuracy you need.

A question to Fred, will you use the newer and faster SSE2 instructions or the older more accurate 80 bit FPU instructions. Anyone else have an opinion on this?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Danilo.

> will you use the newer and faster SSE2 instructions or the older
> more accurate 80 bit FPU instructions.
> Anyone else have an opinion on this?

For compatibility the old way should be used, IMHO -
so PureBasic can at least be used on Pentium.

One of my wishes since a long time is also to
allow a compiler option to enable MMX, SSE, SSE2
and 3Dnow!.
So the compiler takes the standard libraries and
links to the mycommand. If SSE is turned on for
example, and the compiler can find mycommand_sse,
this faster version is linked into the executable.

Maybe Fred can include this in the 4.0 update...
...would be nice.

cya,
...Danilo
(registered PureBasic user)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by fred.

It's planned and I will do it soon.

Fred - AlphaSND
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by tinman.
Originally posted by geoff

IEEE 64 bit floats (ie doubles) are accurate to 15 decimal places for numbers in the number range 1e-300 to 1e300.
That's accurate enough for most applications and is the basis of most scientific computing, certainly in the scientific modelling community I am familiar with.
I know floats are using in scientific and engineering software (although it depends on the eventual use of your software in some circumstances - military or critical systems may not permit floating point numbers).

Also, I don't want to see Fred go to a lot of trouble to add doubles (which I agree is good to have) only to have people come on these forums and complain that "doubles don't work" when they do not understand how they work. It's a slimmer chance than with floats but you can bet that someone will do it :)



--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Grasy.

Searched for udp.dll too but just found this threat :wink: - if fred have some time to implement this i will vote for this too. UDP looses DATA but that´s really ok - it doesn´t matter in many situations - if you update x,y,z of every player in a Shooter many many times (or a Mousecursor at a Remote-admin-tool) it doesn´t matter if 5 packets of 1000 go to /dev/anynetwork/null if the other 995 get faster to it´s target (because no failure-correction). Important Messages could be sent over TCP (or over UDP with own correction-code). I´m sure it should be possible to use some self-made code here too, however i think UPD is a "must-have" for 3D-Games (which should be possible with PureB. in future i think?).
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by koehler.


Tinman said
I know floats are using in scientific and engineering software (although it depends on the eventual use of your software in some circumstances - military or critical systems may not permit floating point numbers).

Also, I don't want to see Fred go to a lot of trouble to add doubles (which I agree is good to have) only to have people come on these forums and complain that "doubles don't work" when they do not understand how they work. It's a slimmer chance than with floats but you can bet that someone will do it :)


Tinman,
You seem to have found some Big Number alternative math libs that do give insane accuracy.

FWIW, we put men on the moon with accuracy of 3 decimal places.
Military equipment is almost all based on floats, what are you babbling about?

If you you really want to use the Big Number libs, I am sure they could be compiled somehow. However, remember that you will be going from using the cpu's built-in FP hardware, to that using string based integer manipulation.
You wanna talk about a speed hit..... maybe 500-10,000% penalty?

There are very few 'complete' languages out there that do not have doubles.
And fewer still people who need anything with greater precision.
Post Reply