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

Automatic simplification #257

Closed
smammy opened this issue Apr 17, 2021 · 3 comments
Closed

Automatic simplification #257

smammy opened this issue Apr 17, 2021 · 3 comments

Comments

@smammy
Copy link

smammy commented Apr 17, 2021

#37 described automatically simplifying units when an entire dimension could be canceled out. I would like to request that this become a little more clever. For example:

Input: 1200 W / 120 V
Expected output: 10 A
Actual output: 10 W/V

If I write 1200 V A / 120 V I get the expected result, so intuitively what I want is for insect to "realize" that watts are volt-amps and then cancel out the volts. I realize it may not be exactly that simple, but that's the idea.

I'm aware that I can write 1200 W / 120 V → A, but that requires me to think about unit conversion upfront. ;-)

This may be related to sharkdp/purescript-quantities#27.

@sharkdp
Copy link
Owner

sharkdp commented May 11, 2021

I agree that this would be nice. And yes, sharkdp/purescript-quantities#27 is related. Also slightly related: #184.

I'll probably not work on this anytime soon, but any help is very much appreciated.

@smammy
Copy link
Author

smammy commented May 11, 2021

Thanks, I'll play around with it if I get some free time.

@sharkdp
Copy link
Owner

sharkdp commented Sep 26, 2023

The follow-up ticket for Numbat is here: sharkdp/numbat#89

Numbat is already better than Insect w.r.t. unit simplifications. But the specific case in this ticket is not yet handled.

@sharkdp sharkdp closed this as completed Sep 26, 2023
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

2 participants