Skip to content

Power dropped in format of user defined unit #467

Description

@jl-wynen

Given the unit Å^2/barn^2, to_string correctly formats this as "1/am^2". However, when defining custom units for "Å" and "barn", Å^2/barn^2 is rendered as "Å/barn^2". That is, the square on Å is lost.

Also, am is now incorrectly rendered as "1/Å/barn".

The custom units are defined as

units::addUserDefinedUnit("Å", units::unit_from_string("Å", units::strict_si));
units::addUserDefinedUnit("barn", units::unit_from_string("barn", units::strict_si));

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