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

Add Probability as a Function #108

Open
saivan opened this issue Jul 30, 2019 · 3 comments
Open

Add Probability as a Function #108

saivan opened this issue Jul 30, 2019 · 3 comments

Comments

@saivan
Copy link

saivan commented Jul 30, 2019

I think probability should be considered a function, at the moment we render:

P(X)/6

as:

image

Which might not be ideal?

@drlippman
Copy link
Contributor

I struggle with this one. Right now f and g are designated as functions. I half wonder whether it'd make sense to make all single-letter characters followed by parens behave like functions.

But then we'd run into problems, like if p was treated as a function, then sqrtp(p+1) would get rendered as sqrt(p(p+1)), which might not be what was intended...

@christianp
Copy link

Another expression that shouldn't be interpreted as function application is x(x+1).

@Tronic
Copy link

Tronic commented Dec 21, 2022

If there ever was a breaking "version 2" syntax, you could require a space between an opening parenthesis and its preceding letter to avoid it becoming a function. Similarly, I am inclined to add spaces between variables being multiplied (and for clarity, also print them with a tiny space between - because often it is useful to use variable names longer than one character, as in programming). But surely there are differing opinions on that...

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

4 participants