Negative capture of decimal variables

Hello friends
I had a question. I wanted to know if the float and double variables, which are decimal, also get negative? Because I saw in a tutorial that float takes up to 38 decimal places and double up to 308 digits ... Do we also have negative decimal places?
float/double are always signed (can have positive and negative values). You can't have an unsigned float/double.
Because I saw in a tutorial that float takes up to 38 decimal places and double up to 308 digits ...


One should be careful with the terminology. A float can have an exponent of 38, but is still only 6 or 7 significant figures, depending on the implementation. A double may have an exponent of 308, but is only 15 or 16 significant figures. Note that significant figures is different to decimal places.

But that has nothing to do with the sign of the value, this is accomplished with a sign bit in the mantissa.

Unless you mean negative exponents? Yes floating point can have them too.
Topic archived. No new replies allowed.