Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoscale=: metric may not give desired results when exponent is negative and not a multiple of 3 #89

Open
klaff opened this issue Oct 30, 2024 · 0 comments

Comments

@klaff
Copy link

klaff commented Oct 30, 2024

Example:

julia> format.(logrange(1.2e-12, 1.2e12, 25); autoscale=:metric)
25-element Vector{String}:
 "1.2p"
 "0.012n"
 "0.12n"
 "1.2n"
 "0.012μ"
 "0.12μ"
 "1.2μ"
 "0.012m"
 "0.12m"
 "1.2m"
 "0.012"
 "0.12"
 "1.2"
 "12"
 "120"
 "1.2k"
 "12k"
 "120k"
 "1.2M"
 "12M"
 "120M"
 "1.2G"
 "12G"
 "120G"
 "1.2T"

Specifically, instead of results like "0.012n" and "0.12n" I expected "12p" and "120p".

Test coverage only hits exponents which are multiple of 3. I don't know what the intended behavior is. My expectation is from using the ENG mode of HP RPN calculators.

Is this a bug or am I applying the wrong prior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant