-
Notifications
You must be signed in to change notification settings - Fork 2
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
Objects with multiple pieces #6
Labels
Comments
log base function is implemented (cb99669) |
@davidfarmer do you have suggestions on how we can figure out the end of |
We need a name for an expression that naturally exists as
a unit. Generally there is no addition or subtraction
withing the expression, unless wrapped in parentheses.
Maybe space indicates the end of such an expression,
(but implied products are definitely a tricky case) so
maybe this is different that limits (which end on a space).
Here are some test cases (omitting the limits on the sum):
sum 2n^2
sum (2 + n)^3
sum a_n/n^s
sum a_n x^n
sum e^(-n^2)
I am heading toward thinking that for sum/prod/lim , the author
generally intends the "inside" to go until an addition or
subtraction (or end of expression, like an = sign).
But for indicating the limits, a space should indicate the end.
Thus:
sum_(n=1)^3 n^2
means
1^1 + 2^2 + 3^2
But
sum_(n=1)^3 5 n^2
means
3 1^2 + 3 2^2 + 3 3^2
I don't think those are inconsistent interpretations, because
parentheses around the summand persist to the output,
as in
sum (2 + 5 n)
But parentheses around the limits do not.
I am not sure I am taking everything into account, so this
needs more thought.
…On Thu, 25 Apr 2019, Yash Mittal wrote:
@davidfarmer do you have suggestions on how we can figure out the end of sum/prod/limit objects. For
int/oint, we already know that the parsing should stop at the "dee var" (dx, d\theta, etc).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the
thread.[AABTULAW32WA2ROBUQDU4VTPSIORBANCNFSM4HFRNBFA.gif]
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An expression like cos(3 x) has two pieces, and we will need a
way to recognize it as one object with two pieces:
the function cosine and its argument.
int 3 x dx has 3 pieces:
(the integral) (of 3 x) (dx)
[do I mean "the antiderivative"?]
log_10(300) has three pieces:
(the log) (base 10) (of 300)
sum_(n=1)^55 3 n has 4 pieces:
(the sum) (from n=1) (to 55) (of 3n)
int_0^1 3 x dx has 5 pieces:
(the integral) (from 0) (to 1) (of 3 x) (dx)
I'd like to discuss what input we need in order to parse these
properly.
In each case, once you identify the base object,
only a few things can happen, and you have to look past a
predetermined number of other objects to determine what
is going on. Once you have the pieces, you understand the
complete object. Then you are ready to do something with it,
such as output to semantic LaTeX.
The text was updated successfully, but these errors were encountered: