double vs float ??

I am using float variable in my code, and I get an error because of exceeding the limit size of code. If I replace the float with double variale the code size reduces to 99% which is capable to execute.
I was expecting the opposite, because double holds 8 bytes and float 4 bytes. Any clues?

Note: I am using GNU 4.1.1

Parents
  • Extra instructions to convert between float and double?

    The traditional math library functions are using double, not float. Depending on supported standard, some compilers has the extra float versions oof the runtime library. However, if you use sqrt() instead of sqrtf(), your float variables will be converted to double before being used.

Reply
  • Extra instructions to convert between float and double?

    The traditional math library functions are using double, not float. Depending on supported standard, some compilers has the extra float versions oof the runtime library. However, if you use sqrt() instead of sqrtf(), your float variables will be converted to double before being used.

Children
More questions in this forum