|
-
May 6th, 2000, 05:36 AM
#1
Thread Starter
Addicted Member
Im making a lander game..
And Theres a Line..
Private Fuel as Double
Why isnt it a integer??
Whats a double??
thanks!
-
May 6th, 2000, 05:40 AM
#2
Addicted Member
double is for numbers with floating decimal point. it's even more precise than single
the max value range of integer is -32768 to 32767 while the single's is -3.402823E38 to -1.401298E-45 and the double's is -1.79769313486232E308 to 4.94065645841247E-657 (negative) and 4.94065645841247E-324 to 1.79769313426232E308 (positive). (single can't be zero but a value very near to zero)
[Edited by Razzle on 05-06-2000 at 06:45 PM]
Razzle
ICQ#: 31429438
What is the difference between a raven?
-The legs. The length is equal, especially the right one. 
-
May 6th, 2000, 07:31 AM
#3
Frenzied Member
just in case you want that in english a double is a variable that can store decimals, integers and longs can only store whole numbers.
-
May 6th, 2000, 07:46 AM
#4
Thread Starter
Addicted Member
Geezs..lol
Thanks Both of you
-
May 6th, 2000, 11:24 AM
#5
????????
your making a game and it was already set as double?
I think you ripped some code off some people 
or you wouldnt have even used double if you didnt know what it is....
-
May 6th, 2000, 11:57 AM
#6
Thread Starter
Addicted Member
hehe,
good thinking..
I was making the game that is on the
front page of this website.. Called
Lander 3.0. Its really neat.. He used
a ddouble so I asked
-
May 6th, 2000, 05:37 PM
#7
razzle...
why can't a Single variable evaluate to 0?
it doesnt seem to protest when I set it to 0!
-
May 6th, 2000, 05:48 PM
#8
Addicted Member
you can set it to zero and if you read it out it's still zero. but the actual value isn't 0 but 0.0000000000...(somewhere at the end there's a number different from zero).
The difference is SO small, you can't see it so easily
Razzle
ICQ#: 31429438
What is the difference between a raven?
-The legs. The length is equal, especially the right one. 
-
May 6th, 2000, 06:32 PM
#9
Frenzied Member
How are they stored if you can't set them to zero, I thought they had an exponent and a mantissa, 00000 for the mantissa would give zero wouldn't it.
-
May 6th, 2000, 06:40 PM
#10
transcendental analytic
I think i had the same problem with double once, multiplying E-12 by 10 up to E0 was differing so little that vb showed 1 but showed x>=1 to be false. So I don't use double for delicate things
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|