I need to use unsigned double in C structure, but i can't compile.
An error says: short, signed or unsigned invalid for `myvar'
this is my code:
unsigned char a;
unsigned short int b;
unsigned double myvar;
You can not have unisgned floating point types. Therefore no unsigned double or unsigned float. unsigned can only be applied to integer types like char short int and long. The reason we have unsigned integers is that they can store numbers twice as large, and can be better suited for handling binary data. I can't really think of much of an advantage to using unsigned floating point types. You could get a little more precision but this is probably not worth the effort of implementing it in hardware and software.