0

In Atmelstudio 6.1 I debug my AVR 328 When opening Quickwatch I tried to analyze a problem and due to unexected problems I stripped down the problem to this:
Entered expression is (float)(1000), also tried with .0F

(float)(1000)   1148846080  float
(float)(1000.0F)    1148846080  float

What the heck is going wrong ?

John
  • 7,507
  • 3
  • 52
  • 52
  • aww damn it, a bug in Atmel studio. How can they have SUCH a bug. Their debugger does not understand float and displays it as decimal unsigned 32. open Project|Properties|Advanced, change the 'Use GDB flag' – John Oct 09 '14 at 16:06
  • `1148846080` = `0x447a0000` = `1000.0f` – Paul R Oct 09 '14 at 16:08
  • yep but in float presentation it has to show 1000.0f and not the binary value. It is a bug in 6.1 and 6.2 of Atmel Studio and solved by my comment above. – John Oct 09 '14 at 16:17

1 Answers1

0

This was a known bug in 6.1 and some of the 6.2 versions (fixed at least in the latest SP of 6.2). The number is the integer representation of the IEEE floating point number (showing the mantissa and exponent bitfields as a int).