Test Floats and Doubles:
DBL_DIG
float a.012345 double b.012346
float a.012345 double b.01234572
float a.012345 double b.0123
What is going wrong?
Thanks again in-advance.
Reply by Erich Styger●December 13, 20042004-12-13
Pre-Note: -Cf enables IEEE64 doubles (but I think this is just a typo on
your side?)
- Did you link the correct library using (see as well
\lib\HC12c\readme.txt)?
You need to make sure that you link the support/ansi library as well with
-Cf set.
In your case this would be probably ansibf.lib.
- Turn on compiler option -Wpd (which flags implicit parameter declarations
with an error).
Maybe you use sprintf() without the proper prototype/header file included.
Erich
Reply by codewarr2000●December 13, 20042004-12-13
I require a floating point number with at least 12 decimal places.
Using Codewarrior HCS12, I turn on -Cf for IEEE32 doubles.
I am using Banked memory model.
sprintf(&buffer[0],"blahblah",blah) does not display correctly
any
floats, ints, doubles when used through TERM_WriteString(buffer);
Is it just sprintf() and the internal data is ok, or is the data bad?
Is there something else I need to do?
Is there another library I need to use?