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

Brackets around complex numbers with units #491

Closed
jmollera opened this issue Jun 20, 2021 · 1 comment
Closed

Brackets around complex numbers with units #491

jmollera opened this issue Jun 20, 2021 · 1 comment
Assignees
Labels
bug Something isn't working hotfix A change that will be addressed in a hotfix

Comments

@jmollera
Copy link

In version 2, the command \SI{2+j3}{\ohm} printed: (2 + j3) Ω
While in version 3, the equivalent command \qty{2+j3}{\ohm} prints: 2 + j3 Ω

This looks OK when the quantity is isolated, but when the quantity is part of an equation, the new way of printing might be confusing. For example:

The v 2 command \SI{2+j3}{\ohm} \times \SI{5+j4}{\volt} printed: (2 + j3) Ω × (5 + j4) V
The v 3 command \qty{2+j3}{\ohm} \times \qty{5+j4}{\volt} prints: 2 + j3 Ω × 5 + j4 V

I think that the version with brackets is more clear. Without brackets, you don't know whether the volt unit applies to 5 + j4, or applies only to j4 and 5 is a unitless number that multiplies j3 Ω . Of course, you always can write \(qty{2+j3}{\ohm}) \times (\qty{5+j4}{\volt}), that prints:
(2 + j3 Ω) × (5 + j4 V), improving the output.

Was this removal of brackets in version 3 something intended?

@josephwright josephwright self-assigned this Jun 20, 2021
@josephwright josephwright added the bug Something isn't working label Jun 20, 2021
@josephwright
Copy link
Owner

Must have missed that one - I'll look at it.

@josephwright josephwright added the hotfix A change that will be addressed in a hotfix label Jun 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hotfix A change that will be addressed in a hotfix
Projects
None yet
Development

No branches or pull requests

2 participants