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

How to add pi , e and factorial to the expression? #26

Open
mishatron opened this issue Jun 16, 2020 · 10 comments
Open

How to add pi , e and factorial to the expression? #26

mishatron opened this issue Jun 16, 2020 · 10 comments
Labels
enhancement Indicates new feature requests good first issue Indicates a good issue for first-time contributors

Comments

@mishatron
Copy link

every calculator has pi, e and factorial methods. but how to parse them using your library?

@fkleon
Copy link
Owner

fkleon commented Jun 16, 2020

Hi

Thanks for raising those. As mentioned in other issues, the parser is currently pretty limited.

  • Pi (and many other constants) are not supported in the parser
  • The exponential function can be parsed as follows: e(2) for the expression e2
  • The factorial function is not implemented in the parser or the library

It would be relatively easy to add support for Pi and the factorial function.
Have a look at lib/src/parser.dart and lib/src/functions.dart if you're interested in contributing.

@mishatron
Copy link
Author

I am interested, but currently have no time for this. Also about linitations - how to select radians and degrees for trigonometry?!

@fkleon
Copy link
Owner

fkleon commented Jun 16, 2020

That's currently not supported either, sorry.

@Divyanshu-S
Copy link

When are you planning to add the above-specified features ??

@fkleon
Copy link
Owner

fkleon commented Jul 24, 2020

Hi @Divyanshu-S, sorry I don't currently have a timeline for this. As mentioned above, this should be fairly easy to add, and I'm welcoming contributions.

@fkleon fkleon added enhancement Indicates new feature requests good first issue Indicates a good issue for first-time contributors labels Jul 24, 2020
@Friendly-Banana
Copy link
Contributor

It seems no one has done this yet, so I would like to implement this.

@Friendly-Banana
Copy link
Contributor

Ok, I got a running version. Where should I push to / post my code?

@fkleon
Copy link
Owner

fkleon commented Dec 15, 2021

@Just-Learned-It Great! You should first fork the repository, and then follow the GitHub flow to make a pull request.

@youngunand
Copy link

youngunand commented May 17, 2022

Hi @fkleon, has parsing pi also been added?

@fkleon
Copy link
Owner

fkleon commented May 18, 2022

Hi @youngunand. Support for parsing Pi has not been added yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Indicates new feature requests good first issue Indicates a good issue for first-time contributors
Projects
None yet
Development

No branches or pull requests

5 participants