Skip to content

String(double, decimals) / dtostrf - decimal part looses leading zeros #427

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

Closed
AdiGitalEU opened this issue Feb 5, 2019 · 1 comment
Closed
Assignees
Labels
bug 🐛 Something isn't working
Milestone

Comments

@AdiGitalEU
Copy link

Any leading zeros in decimal part of a float/double are removed after the conversion.

Example for f = 2.005

Serial.print( f, 4 ) => 2.0050
Serial.print( f ) = 2.01
Serial.print( String( f, 4 ) => 2.50
dtostrf( f, ..., 4, ... ) => 2.50

  • OS: Windows

  • Arduino IDE version: 1.8.8

  • STM32 core version: 1.4.0

  • Tools menu settings if not the default: default

  • Upload method: STLink

  • Name: STM32F1C8T6 BluePill clone

@fpistm fpistm added the bug 🐛 Something isn't working label Feb 12, 2019
@fpistm fpistm self-assigned this Feb 12, 2019
@fpistm fpistm added this to the 1.5.0 milestone Feb 12, 2019
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Feb 12, 2019
@fpistm
Copy link
Member

fpistm commented Feb 12, 2019

Thanks @AdiGitalEU for report.
This is now fix in #435

fpistm added a commit that referenced this issue Feb 12, 2019
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this issue Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants