2012-11-22 08:08 PM
Or, in general, how to printf() numbers with decimal point?
Thanks #floating-point---just-say-no2012-11-22 08:37 PM
Pretty much the same as any other C compiler. With IAR you'd need to link against a suitable library with the level of support you need.
''Choosing formatters for printf and scanf'' might be worth a reviewhttp://supp.iar.com/FilesPublic/UPDINFO/004916/arm/doc/EWARM_DevelopmentGuide.ENU.pdf
2012-11-23 12:54 AM
''With IAR you'd need to link against a suitable library with the level of support you need''
And similarly for other embedded toolsets. Using floating-point brings very large burdens in terms of execution speed and code size - which is why most embedded toolsets will not enable floating-point support unless you specifically request it. Many (most?) calculations in embedded systems can be done perfectly well - and at vastly reduced overhead - with integer arithmetic and a little thought. Or, perhaps, with fixed-point. So a more fundamental question migth be: why do you feel the need for floating point...?