Skip to content

String with scientific notation can't be converted to double #176

@adazem009

Description

@adazem009
Value v = "9432.4e-12";
v.toString(); // returns "0" instead of "9.4324e-9"

The Value class currently uses std::stod() to convert strings to double, but it doesn't work with scientific notation.
atof() can probably be used (it doesn't provide any error handling, but it isn't needed because when the conversion fails, the result should be 0 which is exactly what atof() does).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Priority: MediumbugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions