Skip to content

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

Closed
@AdiGitalEU

Description

@AdiGitalEU

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

Metadata

Metadata

Assignees

Labels

bug 🐛Something isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions