PDA

View Full Version : Number Types



gnu-ehacks
12-17-2001, 07:56 PM
What is the one that you use most frequently?

mithrandir
12-17-2001, 08:06 PM
Mostly integer I guess. It depends though on what I need the program to do, what it is for, etc. etc. etc.

Yoshi
12-17-2001, 08:07 PM
long double...
80-bit rules!!

gnu-ehacks
12-17-2001, 08:21 PM
Whoops, I meant Double Long, not Double Float. Sorry. Well, I like double long, holds a lot, but doesn't need an F at the end.

DavidP
12-17-2001, 10:44 PM
ints are great.

doubles are used a lot for 3d graphics...which i havent gotten into yet, so i still mostly use the good ol' ints.

Null Shinji
12-18-2001, 02:35 AM
Integers

bart
12-18-2001, 07:30 AM
i hve actualy never had a need for anything besides ints and chars. hey, i just learned how to use char as a number... that might work...

goran
12-18-2001, 07:39 AM
Actually the requirement dictates it for me ... given the choice, i choose int ...

cheers,

doubleanti
12-18-2001, 05:36 PM
>3d graphics

you could use fixed point math... this would rid you of needing to use the FPU excessively and save you a lot of time [run-time, that is...]... eventually the usage of various variable types cannot be generalized such...

oskilian
12-18-2001, 09:33 PM
but in 32-bit compilers such as GCC or Visual C++, an integer is the same thing as a Long, isn't it?

I always do

int i;

wait no, I don't, I use the variable i for for's, maybe something like

int MyIntegerVariableWhichDoesNothingAtAll;

ask Null Shinji, he knows how I name variables and functions :D

Oskilian

SilentStrike
12-18-2001, 09:48 PM
Integers aren't neccesary numeric. Iterating through an array is not really all that mathematical, but ya sure as hell don't want to do it with floats.

doubleanti
12-18-2001, 10:12 PM
double anti;
printf ("%ld", anti);

-----

SIGSEGV..........

oskilian
12-18-2001, 10:52 PM
DA: LOL

Has anyone ever made some bitwise using Long Integer's (128 bit in DJGPP)?

Oskilian

gliptic
12-19-2001, 01:23 AM
128-bit? What do you mean?