Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Big numbers

Author
Message
the nutty proffesor
19
Years of Service
User Offline
Joined: 4th Jun 2005
Location:
Posted: 23rd Jun 2005 04:59
I just wanted t know what the largest number darkbasic can hold is I am writing a program that uses some pretty big numbers e.g. 75 to the power of 7. I no in other languages you can make a number floating point or sumthing like that but how do i get darkbasic to be capable of holding reely big numbers?

If u cant beat the best give up and go home
Link102
20
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 23rd Jun 2005 06:07
I think infinnitiy is the limmit, I haven't read about a largest number anywhere. (I think it would have been noted in the help file at the explenation of a variable, just a the maximum of objects)

please reply
the nutty proffesor
19
Years of Service
User Offline
Joined: 4th Jun 2005
Location:
Posted: 23rd Jun 2005 07:11
ok its just that when i try and use realy big numbers and then work with them the program sort of crashes and doesnt seem to do anything.

If u cant beat the best give up and go home
Drew Cameron
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: Scotland
Posted: 23rd Jun 2005 07:13
There is a limit, but I'm not sure what it is.

Dumbo and Cool

WIP Board!
P Schnell
20
Years of Service
User Offline
Joined: 13th Feb 2005
Location:
Posted: 23rd Jun 2005 07:32 Edited at: 23rd Jun 2005 07:34
The maximum of a 16-bit integer is somewhere around 65K, and a 32-bit integer is about 4.3B, not sure about the reals though.

the nutty proffesor
19
Years of Service
User Offline
Joined: 4th Jun 2005
Location:
Posted: 23rd Jun 2005 07:43
how do you set what type of integer to use?
isn't there like type of thing you can do that will store large numbers but inaccurately?

If u cant beat the best give up and go home
NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 23rd Jun 2005 10:22
the nutty proffesor,

What type of integer? Integer is a type. The three types of variables in DarkBasic are string$, real# and integer, and can all be used by placing their associative symbols in front of the name of the variable.

What do you mean by inaccurately?


+NanoBrain+
P Schnell
20
Years of Service
User Offline
Joined: 13th Feb 2005
Location:
Posted: 23rd Jun 2005 10:55 Edited at: 23rd Jun 2005 10:57
I think he means using reals, as a large number would be stored like in scientific notation.

A large number would be stored as 1.X to the power of Y.

It can store large values, but loses some accuracy.

the nutty proffesor
19
Years of Service
User Offline
Joined: 4th Jun 2005
Location:
Posted: 24th Jun 2005 01:24
yep i mean like 3.678 * 10to the power of 6 or someting like that

If u cant beat the best give up and go home
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 24th Jun 2005 21:32
There's a DBPro tutorial about those limits.
http://developer.thegamecreators.com/?f=dbpro_tutorials
it's tutorial 4: DATA TYPES.

Immunity and Annihalation makes Immunihalation...
the nutty proffesor
19
Years of Service
User Offline
Joined: 4th Jun 2005
Location:
Posted: 25th Jun 2005 08:04
does it apply to darkbasic classic as well though

If u cant beat the best give up and go home
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 25th Jun 2005 22:33
yes, I think so. Look at this:



I get "1.#INF" as result

Immunity and Annihalation makes Immunihalation...

Login to post a reply

Server time is: 2025-05-22 19:24:50
Your offset time is: 2025-05-22 19:24:50