10000 Strange float serialization · Issue #506 · bblanchon/ArduinoJson · GitHub
[go: up one dir, main page]

Skip to content
Strange float serialization #506
@anisimovsergey

Description

@anisimovsergey

I looked at FAQ and Pitfalls and couldn't find the answer. Please take a look at the following tests, I find it rather strange that OneFloatDefaultDigits3 passes successfully, does it exhibit expected behavior?

  SECTION("OneFloatDefaultDigits2") {
    array.add(0.01f);
    check(array, "[0.01]");
  }

  SECTION("OneFloatDefaultDigits3") {
    array.add(0.001f);
    check(array, "[0.00]");
  }

  SECTION("OneFloatDefaultDigits4") {
    array.add(0.0001f);
    check(array, "[10.00e-5]");
  }

I'm using Microsoft Visual Studio Enterprise 2015 Version 14.0.25123.00 Update 2

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0