[Implemented] 64 Bit variable handling

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
MisterDr
User
User
Posts: 41
Joined: Mon Sep 29, 2003 4:14 pm

[Implemented] 64 Bit variable handling

Post by MisterDr »

It will be nice if in PB will exist 64 bit variables (QWORD - 8 byte), and maybe even 10 - byte variables.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

This topic has been posted several times; 64, 80 and 128 bit variables for integers and/or real numbers are wanted, but for the moment you can use some user PB-lib for it, or build your own Structures :)
MisterDr
User
User
Posts: 41
Joined: Mon Sep 29, 2003 4:14 pm

Post by MisterDr »

I didn't see any workaround about that, and even I didn't see that nasm suports QWORD. I would be greatfull if you can show me how to do that, if you know.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Some links:

viewtopic.php?t=8058
viewtopic.php?t=2480
viewtopic.php?t=6496
viewtopic.php?t=6896
viewtopic.php?t=3117
viewtopic.php?t=3078
viewtopic.php?t=3260
viewtopic.php?t=7853


PB uses fasm now.
Nasm and fasm support, of course, QWORD (64bit), TWORD (80bit) and DQWORD (128bit), just because intel processors support it.

There are some user-lib which allow use of big numbers. I use bignum.dll by Rings.
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

Or you use either my F64 or my pbAPM (very, very large numbers ;-) Library, both can be found on http://www.purearea.net
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Huge work.

Having APM, why F64?

However, i've tried this and it hangs!

Code: Select all

gh.l=APM_New()

APM_Val(gh,"3.4345346563090984033467344")
APM_Add(gh,"0.0000000000000000000000001")

Debug APM_StrFixpt(gh)
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

Now, you can't add a string, it has to be another apm value.

As to the question with F64 vs APM. F64 is faster, APM more flexible.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Sorry, freedimension, i read help, but i did't see it :oops:

Code: Select all

gh.l=APM_New() 
gm.l=APM_New()
APM_Val(gh,"3.43453000010000465630909843456323452534536764545735634634264563434563456347033467344") 
APM_Val(gm,"0.00000000000000000000000000000000000000000000000000000000000000000000000000000000001")
APM_Add(gh,gm)

Debug APM_StrFixpt(gh)
I guess PB will never support so big numbers 8O
So your AMP library must be well keeped.

WoWWW, MisterDr, here you have a very accurate real and integer numbers: :!: :!: :!:

Code: Select all

gh.l=APM_New() 
gm.l=APM_New() 
APM_SetPrecision(500)
APM_PI(gh) 

Debug APM_StrFixpt(gh)
MisterDr
User
User
Posts: 41
Joined: Mon Sep 29, 2003 4:14 pm

Post by MisterDr »

Thanx man, Im now porting some applications from 3d state, and it's sucessfull until I received QWORD from 3dstate's Dll, and I stucked.
I tryed with structures but nothing. Received content form state's dll is not formated as I expected, because of values like 788.23267263772 and I canot just catch High or Low dword.
Post Reply