avr-gcc float

Aug 11, 2010 2 Replies

Witam. Szukam i nie mogê znale¼æ. Jaka mo¿e byæ maksymalna warto¶æ zmiennej typu float i ile ona zajmuje 4 bajty?



Pozdrawiam Pawe³


Float zajmuje 4 bajty, a tu masz liste zmniennych:

(signed/unsigned) char - 1 byte (signed/unsigned) short - 2 bytes (signed/unsigned) int - 2 bytes (signed/unsigned) long - 4 bytes (signed/unsigned) long long - 8 bytes float - 4 bytes (floating point) double - alias to float

pawel pisze:

formatting link
The minimum positive (subnormal) value is 2^−149 ≈ 1.4 × 10^−45. The minimum positive normal value is 2^−126 ≈ 1.18 × 10^−38. The maximum representable value is (2−2^−23) × 2^127 ≈ 3.4 × 10^38.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required