Skip to content

Normalized scientific notation for serialized numbers #245

@nritschel

Description

@nritschel

Currently, when I call ce.box(1/7000000).latex (or generally try to serialize any number that is expressed in scientific notation), the result is 14\,285\,714\,285\,714\,285\cdot10^{-23}. This is technically correct, but not a particularly human-readable way to express this number. The commonly used normalized notation would be 1.428\,571\,428\,571\,428\,5\cdot10^{-7} (i.e., the mantissa is always a single digit and the rest are decimal places).

Personally, I would expect the normalized notation to be the default, but as long as there is some way to customize this, I would not consider this a major issue. However, I have not found any settings (e.g., in SerializeLatexOptions), to change this, or a reliable way to reformat the number in a different way that also works for more complex results that include variables. Maybe there is a way to customize this already, in which case I'd recommend adding some more explicit documentation to help people with the same problem as me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions