Hi,
I was wondering if the type 'double' is a special type or not, can I use this in my own OS without anything special?
thanks.
double type
Re:double type
you mean hi dd 0?
you can do that if you use a extern long hi; if you use it in C.
you can do that if you use a extern long hi; if you use it in C.
Re:double type
That depends on a) the language you mean, b) the compiler or interpreter you are using, and c) how you've written you OS.Friend wrote:I was wondering if the type 'double' is a special type or not, can I use this in my own OS without anything special?
Assuming you mean the C/C++ 'double' type, and are compiling with gcc or some similar, then there shouldn't be a problem. The double type - usually implemented as 80-bit IEEE double precision floating point, IIRC - is a standard type in C and C++, and the compiler should generate the appropriate FPU code (or floating-point emulation if you aren't using the FPU for whatever reason). You may need to have certain CPU exception handlers in place ahead of time, but aside form that the OS shouldn't need to do much to support it.
For more information, try a few searches on a combination of keywords like
[tt]x86 FPU
double precision floating point
GNU compiler[/tt]
You may want to look up how your compiler actually implements floating point on the PC.
Re:double type
no, the double type is a 64-bit IEEE double-precision float. a long double is the 80-bit IEEE extended-precision float.
sorry to make a harsh correction, i just don't like seeing information misrepresented. ;D
sorry to make a harsh correction, i just don't like seeing information misrepresented. ;D