Skip to content

Choosing type of quantity value based on type used in construction #65

Description

@gaurav-arya

Arguably, when we do 1.0f0u"m", the floating point backing type should remain Float32 rather than being converted to Float64:

julia> (1.0f0u"m").value
1.0

In general, there's a question of what type we should choose for the quantity value. In theory, we could even keep integers as integers, i.e. 1u"m" would remain 1 m. But perhaps we would want to enforce floating point, in which case something like float(T) might make sense.

Activity

  1. MilesCranmer commented on Oct 15, 2023

    @MilesCranmer
    Member

    I tried doing this with #66 but I'm not sure if it's the right way to go. Wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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