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.

Newcomers DBPro Corner / Can anyone explain what a FLOAT is?

Author
Message
dlefik 2008
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location: Spencerville, OH
Posted: 9th May 2005 16:00
I've heard this word used but not sure exactly what it is. Anyone think they can explain this to me? Thanks in advance.
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 9th May 2005 16:36 Edited at: 9th May 2005 16:37
Clickable SMiley,

FLOAT stands for floating-point number, I believe. A floating-point number is a, in DarkBasic Classic terms, real number. A real number is a value that has numbers to the right side of the decimal point(ex:450.23). Floating-point stands for the decimal point, as if it is moving throughout the numbers.


+NanoBrain+
Ace Of Spades
19
Years of Service
User Offline
Joined: 6th Mar 2005
Location: Across the ocean
Posted: 9th May 2005 21:02
A real number is simply any non-imaginary number(unlike i)

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 9th May 2005 22:25
Think of it as a decimal, with a decimal point. Wherever you need a decimal number with a decimal point, use a float, or a double float.

For most calculations the accuracy is fine. If you get weird results, then consider that they become less accurate, the bigger the numbers you use, and for certain decimal representations.

I would leave it at that, unless you have problems. If you have problems, ask again. It gets very confusing if you've never investigated them before.

BatVink

Login to post a reply

Server time is: 2024-09-23 19:24:13
Your offset time is: 2024-09-23 19:24:13