I'm using SDCC V2.5 MCS-51 on win98 platform.
printf_fast_f with floating point functions with 2 exceptions:
1 - printf_fast_f SIGN is incorrect on values
between 0 - ( -1) .
2 - format "%2.2f" not leads numbers less then 10 with
I tried Small and Large model and it was same problem.
I solved this problem by applying float value to int and
checking the sign.
printf_fast_f ( "%2.2f" , (float) f_val );
batch file for build:
redir -e proj.err SDCC --debug --code-loc 0x0000 --stack-
loc 0xA0 --model-large -DUSE_FLOATS=1 --vc %1.c
ren %1.ihx %1.hex
Log in to post a comment.