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 math expressions in number inputs #2697

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

RunDevelopment
Copy link
Member

I finally added a feature I wanted for a long time: using math expressions in number inputs. Sometimes I want to input a big number, or a number with many digits that can be easily computed, but I always to enter it digit by digit. Well, not anymore! All number inputs now support math expressions. E.g. 3+5, 32 / 5, 2^10, e ^ (pi i)

Under the hood, math expressions are evaluated by mathjs, so this isn't a simple eval(string). It's safe.

image
image

image
image

image
image

@mrjschulte
Copy link
Contributor

This is great!

Copy link
Member

@joeyballentine joeyballentine left a comment

Choose a reason for hiding this comment

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

This is really cool. Awesome idea

@joeyballentine joeyballentine merged commit c63b74c into chaiNNer-org:main Mar 21, 2024
7 checks passed
@RunDevelopment RunDevelopment deleted the math-input branch March 21, 2024 13:05
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.

3 participants