-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
floating point numbers are not displayed correctly when using printf/sprintf #17
Comments
This problem seems not to occur with older version of the Code Sourcery toolchain (<2008q3) or the self-built tool chain. It seems also be partly fixed in cdad71d for current Codebench toolchain but re-appears when compiling without optimization (-O0). |
Is this problem still existent? |
Yes. |
Can we maybe find a way to omit the usage of printf+float at all? |
Can we maybe live with this issue, as #1352 solves the problem for to my knowledge the only part in RIOT where we depend on printing floats?! |
We print floats in other places too...
|
oh damn, I only looked at core... So I guess this issue it not fixable too easily? |
But it looks that most of these calls can be rather easily replaced. |
I'm with @OlegHahm |
But is there something more elegant than
without using libmath? |
Anyone with a nice idea? |
not really. |
It is still happening with CodeBench Lite 2014.05-28 and GNU Tools for ARM Embedded Processors 4.9.3 20141119. |
Just an idea: try building without nano.specs, i.e. full functionality
|
this issue is quite old, but I came across this link command option several days ago: |
And while testing, do a code size comparison! I guess that would be most interesting here. |
…i_fixes msp430/spi: add USCI SPI implimentation and configure z1 for it
Is this still an issue? |
It is related to #5094 ? |
Does #5094 solve it or only partly? |
I have a printf test improvement in the works which will reveal other missing format identifiers. |
#5094 solves the problem on mulle. (Add |
Good! Can we close this? |
yes, let's close this |
Clean up apt after installation
* periph: change uart pin, add test for uart periph * delete some older tests
example code:
uint32_t value = 4688400; float test_secs = (float)(value); printf("Value: %lu, test_secs: %f, test_secs/1000000: %f\n", value, test_secs, test_secs/1000000.0);
output:
Value: 4688400, test_secs: -593395331576418032070107601347274796814779226477615119074935151325494288374806955180858448199930421815096455549544570545856896334085141326372559621036970412650772246306121905719839090181013742283966753869290184601151471616.000000, test_secs/1000000: 0.000000
The text was updated successfully, but these errors were encountered: