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

Implement a "preferred type" scheme for Formula parameters, where the infrastructure does the conversion for you and warns in the UI if not possible. #534

Open
gwhitney opened this issue Feb 8, 2025 · 0 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@gwhitney
Copy link
Collaborator

gwhitney commented Feb 8, 2025

The idea is that for parameters of ParamType.Formula, they should have an optional returnType parameter defaulting to bigint. The parameter/MathFormula infrastructure will attempt to take the result of the formula that the sequence explorer entered and convert it to the desired returnType. If that succeeds, it will return to the client code with the converted value of the proper type. If the conversion fails, it will add an error to the supplied status and return the zero of the requested returnType to the client code.

Since this feature requires an upgraded mathjs, this issue should be dealt with in a PR that updates mathjs to the latest version, or thereafter.

Originally posted by @gwhitney in #530 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

1 participant