Skip to content

Improve ufloat_fromstr documentation and parsing #287

@Cs137

Description

@Cs137

The ufloat_fromstr documentation does not mention how the function generates an uncertainty if the string representation does not contain one. Is it always 1 to the last significant digit? Also, I doubt that it makes sense to assign an uncertainty to a NaN value.

Examples:

  • ufloat_fromstr("123") -> 123.0+/-1.0
  • ufloat_fromstr("987") -> 987.0+/-1.0
  • ufloat_fromstr("0.9999") -> 0.9999+/-0.0001
  • ufloat_fromstr("nan") -> nan+/-1.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions