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

Allow units with rational exponents #614

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Allow units with rational exponents #614

merged 1 commit into from
Oct 11, 2024

Conversation

sharkdp
Copy link
Owner

@sharkdp sharkdp commented Oct 11, 2024

closes #561

@sharkdp sharkdp merged commit 66cbea5 into master Oct 11, 2024
15 checks passed
@sharkdp sharkdp deleted the fix-561 branch October 11, 2024 11:23
@@ -131,7 +131,7 @@ impl UnitIdentifier {

// Multiply by the product of all divisors to make all exponents
// integers. This is needed for the next step.
let factor: i128 = key.iter().map(|p| p.1.numer()).product();
let factor: i128 = key.iter().map(|p| p.1.denom()).product();
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea (comment above) was correct, the execution was not 😄

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

Successfully merging this pull request may close these issues.

Error on unit definition using square roots
1 participant