JuliaPhysics / JuliaPhysics/Unitful.jl
printing types of unit quantities loses information
- Dominant language
- Julia
- Stars
- 675
- Forks
- 124
- Avg merge
- 3h 38m
- Merged PRs (30d)
- 1
Description
Example:
```
julia> using Unitful: π,π,L,mg
julia> typeof(1u"mg/L")
Quantity{Int64,π*π^-3,Unitful.FreeUnits{(mg, L^-1),π*π^-3,nothing}}
julia> 1u"mg/L" isa Quantity{Int64,π*π^-3,Unitful.FreeUnits{(mg, L^-1),π*π^-3,nothing}}
false
```
So if I copy and paste the representation of `typeof(1u"mg/L")`, it is not the correct type.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the Julia REPL example using Unitful, typeof, Quantity, and FreeUnits, then trace how the type representation is printed. Done means the displayed type for typeof(1u"mg/L") can be copied and used as the equivalent type expression without losing information.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100