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

Fractions oh my! #63

Open
abock opened this issue Oct 16, 2020 · 0 comments
Open

Fractions oh my! #63

abock opened this issue Oct 16, 2020 · 0 comments
Assignees

Comments

@abock
Copy link
Contributor

abock commented Oct 16, 2020

I would love to render the unicode equivalent of a fraction. If I enter 1/16 for example, I want to see superscript 1 (¹) over () subscript 16(₁₆) . If I enter a fraction that is available already as a single code point, print that instead (1/8).

For bonus points, reduce the fraction if it can be reduced, and show both the input fraction and the reduced fraction in unicode form.

For even more bonus points, since Quick Info already evaluates expressions, perhaps any result that you are currently showing in decimal notation could also be shown in rational form.

Examples

Input Output Output
1 / 16 ¹⁄₁₆
2/16 ²⁄₁₆
0.125
2 + 1 / 5 2¹⁄₅ ¹¹⁄₅
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