64bit precision floats

Just starting out? Need help? Post your questions and find answers here.
^OO^
User
User
Posts: 27
Joined: Mon Apr 28, 2003 5:58 am
Location: United Kingdom
Contact:

64bit precision floats

Post by ^OO^ »

Hi everyone :-)

A year ago I set out to write a novel calculator but could not get the precision I needed because the floating point values are only 32 bits and I need to use variables of at least 64bits, preferably 80bits. So I dropped PB.
Blitz has the same restriction.

The new IBasic Pro, on ther other hand, CAN do doubles.
But, before I commit to learning IBasic, can you tell me whether PB's math precision has been upgraded yet? (my search failed to turn up any mention of such an upgrade)

Thank you for you kind attention.

Julian
Last edited by ^OO^ on Wed Jun 23, 2004 12:54 pm, edited 1 time in total.
BF 1942, BF Desert Combat, BF The Road To Rome, BF Secret Weapons, BF Vietnam.
Half-Life - The Awakening.
UT1998, UT2003, UT2004.
X2 - The Threat.
Far Cry.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

nope, not yet

there is a lib that does it, however
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

one thing:

Floats (and doubles) are not exact values. A PC can't convert a .4 in binary-system. But we have the same with problem with 1/3.

When you need really exact result: Don't use floats and doubles!
Froggerprogger
Enthusiast
Enthusiast
Posts: 423
Joined: Fri Apr 25, 2003 5:22 pm
Contact:

Post by Froggerprogger »

As a further alternative you might try calculating with fractional digits. See here for the procedures:
viewtopic.php?p=44599#44599
%1>>1+1*1/1-1!1|1&1<<$1=1
^OO^
User
User
Posts: 27
Joined: Mon Apr 28, 2003 5:58 am
Location: United Kingdom
Contact:

64bit precision floats

Post by ^OO^ »

Thank you for your responses ^_^

There would be lots of high-value variables to process and wrestling with library bodges does not appeal to me. PureBasic's weakness is in the very area where I need it to be strong.

I imagine that the original motive for an all-low-precision-math language was to make it go fast?

FPUs are now optimized for 64bit FLOPS and these are now faster than 32bit FLOPS. There is no reason to retain 32bit floats except that you can't be bothered to update them.

I put in feature requests for better precision. I read responses from other users pointing out that I don't need precision or, if I do, I should make library files.

I waited a year to see if PB would recognize the NEED to provide 64bit doubles. It hasn't happened. I guess that nobody else lobbied for the upgrade so it got no priority. Does this mean I'm the only user that needs real-world math?

Such a shame: PB seems destined to remain a TOY, not a TOOL. I'll look in again next year with my fingers crossed.

I'm sorry if I seem a little acerbic - it's the disappointment.

So then, it's decided: I'm going with IBASIC.

Good bye.

Julian
BF 1942, BF Desert Combat, BF The Road To Rome, BF Secret Weapons, BF Vietnam.
Half-Life - The Awakening.
UT1998, UT2003, UT2004.
X2 - The Threat.
Far Cry.
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

I knew that avatar looked familiar. Anyways, agreed. IBasic you say? Now I have to look. Thanks.
PolyVector
Enthusiast
Enthusiast
Posts: 499
Joined: Wed Sep 17, 2003 9:17 pm
Location: Southern California
Contact:

Post by PolyVector »

@^OO^

Purebasic is by no means a "TOY", and to say so based on one missing feature is laughable...

So the only language that meets your expectations came out, when was it? This month? I hope you enjoy posting bugs and requesting features much more in the IBasic forums...

Good Luck! :roll:
Last edited by PolyVector on Tue Jun 15, 2004 9:12 am, edited 1 time in total.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: 64bit precision floats

Post by PB »

> Such a shame: PB seems destined to remain a TOY, not a TOOL

It's planned for the future, possibly with v4.00 from what Fred has hinted
at in the past. If that's too far away for you (which it appears to be) then
by all means use IBASIC instead if it suits your immediate needs. But it
by no means that PureBasic is a "toy" language -- there are dozens of
professional apps and games written in it.
^OO^
User
User
Posts: 27
Joined: Mon Apr 28, 2003 5:58 am
Location: United Kingdom
Contact:

64bit precision floats

Post by ^OO^ »

Nice to hear that their is hope for the future.
Press on, Fred - - - 8)

Julian
BF 1942, BF Desert Combat, BF The Road To Rome, BF Secret Weapons, BF Vietnam.
Half-Life - The Awakening.
UT1998, UT2003, UT2004.
X2 - The Threat.
Far Cry.
User avatar
geoff
Enthusiast
Enthusiast
Posts: 128
Joined: Sun Apr 27, 2003 12:01 am
Location: Cornwall UK
Contact:

Post by geoff »

Maybe not a TOY, but very restricted in serious application.

For example, you cannot calculate a GPS position, predict an eclipse or even do many financial calculations. We are not talking rocket science here, just mainstream applications.

I could go on, but I have said enough on this topic already.

I cannot understand why Fred has given this such a low priority. He could make the language suitable for the majority of applications with this single addition.
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

I cannot understand why Fred has given this such a low priority. He could make the language suitable for the majority of applications with this single addition.
I would very much like to see this too as soon as poss, it would even make calculating disk sizes (yes even that simple task) so much easier.
Image
--Kale

Image
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

^00^: dude.. you need to change your avatar.. I'm barely able to read the posts!!! 8O

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
^OO^
User
User
Posts: 27
Joined: Mon Apr 28, 2003 5:58 am
Location: United Kingdom
Contact:

Post by ^OO^ »

LarsG wrote:^00^: dude.. you need to change your avatar.. I'm barely able to read the posts!!! 8O
OK - Done!

I hope you copied it first - - - :oops:
BF 1942, BF Desert Combat, BF The Road To Rome, BF Secret Weapons, BF Vietnam.
Half-Life - The Awakening.
UT1998, UT2003, UT2004.
X2 - The Threat.
Far Cry.
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

^OO^ wrote:
LarsG wrote:^00^: dude.. you need to change your avatar.. I'm barely able to read the posts!!! 8O
OK - Done!

I hope you copied it first - - - :oops:
:lol:
darn, I knew I forgot something... :wink:

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

LarsG wrote:
^OO^ wrote:
LarsG wrote:^00^: dude.. you need to change your avatar.. I'm barely able to read the posts!!! 8O
OK - Done!

I hope you copied it first - - - :oops:
:lol:
darn, I knew I forgot something... :wink:
of course, i saved it to use later for the lesbian amazon chatroom :)
SPAMINATOR NR.1
Post Reply