For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
Int precent
-
Age
- OldUnreal Member
- Posts: 848
- Joined: Sat Dec 29, 2007 5:25 pm
Int precent
How to count precent (%) with two ints (integer)?
For example: 56 to 4082
For me it return always 0.
precent=float(56/4082)*100 returns 0 too.
For example: 56 to 4082
For me it return always 0.
precent=float(56/4082)*100 returns 0 too.
Last edited by Age on Sun Nov 02, 2008 11:27 am, edited 1 time in total.
-
Chaos13
- OldUnreal Member
- Posts: 951
- Joined: Sat Feb 16, 2008 10:24 am
-
Bane
- OldUnreal Member
- Posts: 493
- Joined: Sun Mar 03, 2002 6:32 pm
Re: Int precent
If you want to avoid floating point math, do (int1*100)/int2.
float(56/4082)*100 is 0 because 56/4082 is evaluated first, and that's 0. Converting that to a float and multiplying by 100 doesn't change anything.
float(56/4082)*100 is 0 because 56/4082 is evaluated first, and that's 0. Converting that to a float and multiplying by 100 doesn't change anything.
Author of Hide and Seek mod, and the NALIBALL mod
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
-
Bane
- OldUnreal Member
- Posts: 493
- Joined: Sun Mar 03, 2002 6:32 pm
Re: Int precent
Precision. I'm not going to bother going into details, but a double has more storage and therefore can represent larger values and be more accurate.
Author of Hide and Seek mod, and the NALIBALL mod
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
-
Chaos13
- OldUnreal Member
- Posts: 951
- Joined: Sat Feb 16, 2008 10:24 am
Re: Int precent
Single precision, called "float" in the C language family, and "real" or "real*4" in Fortran. This is a binary format that occupies 32 bits (4 bytes) and its significand has a precision of 24 bits (about 7 decimal digits).
Double precision, called "double" in the C language family, and "double precision" or "real*8" in Fortran. This is a binary format that occupies 64 bits (8 bytes) and its significand has a precision of 53 bits (about 16 decimal digits).
Double precision, called "double" in the C language family, and "double precision" or "real*8" in Fortran. This is a binary format that occupies 64 bits (8 bytes) and its significand has a precision of 53 bits (about 16 decimal digits).
Skydev = Chaos13 = Dimension4
-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Int precent
Hmm, and in Pascal they are Real and Real64 IIRC.
Last edited by GreatEmerald on Wed Nov 05, 2008 9:08 pm, edited 1 time in total.
-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
Re: Int precent
I call them "float" and "double" because that's how it's called in Java and I know Java probably the most of all except VB and those simple languages. ^_^
☆
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Int precent
Oops, I meant Real, what was I thinking lol. Fixed 
-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Int precent
Yeap. Three times.How to count precent (%) with two ints (integer)?
For example: 56 to 4082
For me it return always 0.
precent=float(56/4082)*100 returns 0 too.
-
Chaos13
- OldUnreal Member
- Posts: 951
- Joined: Sat Feb 16, 2008 10:24 am
Re: Int precent
How to count precent (%) with two ints (integer)?
For example: 56 to 4082
For me it return always 0.
precent=float(56/4082)*100 returns 0 too.
Well i think that if you could be a little more imaginative you could try moving the stuff and typecasts yourself in order to find a way that actually works. Lol
Skydev = Chaos13 = Dimension4
