yunruse / Noether

Just another units package
MIT License
9 stars 0 forks source link

Numeric display is overprecise and unwieldy #56

Closed yunruse closed 1 year ago

yunruse commented 1 year ago

General info

Python 3.11, Noether 1.0

noether.display.canonical_number needs adjusting for:

(Of course, #45 could reduce this issue, but it is a general nicety)

Actual behaviour

>>> 16 * pixel / mm
406.40000000000003 ppi  # image_quality
>>> mile @ inch
63359.99999999999 in  # length
>>> gibibyte @ bit
8589934592 b  # data

Expected behaviour

>>> 16 * pixel / mm
406.4 ppi  # image_quality
>>> mile @ inch
63360 in  # length
>>> gibibyte @ bit
8.59e9 b  # data
yunruse commented 1 year ago

Fixed in 24197bb35e2914fafefc8c7a7c46679f437934c0