Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
michikawa07 committed Jun 5, 2023
1 parent ac6502e commit b99cfd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "UnitfulParsableString"
uuid = "06c00241-927a-4d5b-bb5e-6b5a2ada3567"
authors = ["michikawa07 <[email protected]> and contributors"]
version = "0.1.4"
version = "0.1.5"

[deps]
Memoization = "6fafb56a-5788-4b4e-91ca-c0cea6611c73"
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ julia> string(1.0u"m*s") |> Unitful.uparse
```

## Expression of Unit
Unitful.string(unit::Unitlike)
Unitful.string(unit::Unitlike)

Values of `Unitful.Unitlike` subtypes are converted to `string` that julia can parse as following rules.

Expand Down Expand Up @@ -53,12 +53,12 @@ julia> string(u"m*s^-2") # positive and negative exponent coexist

When the exponentials are rational, if the velue n//m is strictly same as n/m, it is expressed as "^(n/m)".
```julia
julia> string(u"m^(1//2)" # 1//2 == 1/2
julia> string(u"m^(1//2)") # 1//2 == 1/2
"m^(1/2)"
```
If not the velue n//m is strictly same as n/m, it is expressed as "^(n//m)".
```julia
julia> string(u"m^(1//3)" # 1//3 != 1/3
julia> string(u"m^(1//3)") # 1//3 != 1/3
"m^(1//3)"
```

Expand Down Expand Up @@ -151,7 +151,8 @@ julia> 1.0u"m*s"
```

## Limitation
This package not suppert `Logscaled` units i.e., `Gain` or `Lebel` yet.
This package not support `Logscaled` units i.e., `Gain` or `Lebel` yet.
`Array` of `Quantity` is now supported, but implementation is too rough. Please use at your own risk.

## Related Packages

Expand Down

0 comments on commit b99cfd3

Please sign in to comment.