OK, sounds good.
Offline
Yay, 9 pages!
Last edited by Hardmath123 (2011-04-20 05:26:15)
Offline
I'm gonna be on a vacation 'till Sunday. Just letting you know. So, scimonster, can you take over my job:
I wrote:
Okay, I'm going to assign a few jobs:
Hardmath123: I'm going to build the string-list setup engine
scimonster: Once I'm done, remove commas (like in 1,000) and replace constant's names with values.
applejack: Make specific error backgrounds
amercbu: Once sci's done, add something to test for mismatched brackets and when you have something like 5√2 or (1)(2) replace them with 5*√2 or (1)*(2)
hpotter134: Once amercbu's done, add something to report the innermost nested bracket set. So 1+(2+3) would report 2+3
Offline
Sci, you have make an engine that:
•Converts the input to a list
~Keeps numbers and operation names like sin and sqrt as 1 item.
~Ex: Converts sqrt 1 + 2 into:
·sqrt
·1
·+
·2
•Ignores anything that isn't a number or an operator's symbol
•Ignores commas in numbers: 1,000 converts to 1000
and
•remove commas (like in 1,000)
•replace constant's names with values: e, π, ϕ, pi, phi, and a few more.
Offline
Yeah. I'll have to look up some of them, but never fear, Wikipedia is here!
I'll get to work on that now!
Offline
Hardmath123 wrote:
Recycle, you're back!
Checkpoint
•Things we accomplished:
~Figured out what setup engine will do
•Things we decided:
~This'll be made in Scratch, not BYOB
•What we need do do:
~Program setup engine:
Ok, progress has been made... What should i do?
Offline
Hardmath123 wrote:
Okay, I'm going to assign a few jobs:
...
hpotter134: Once amercbu's done, add something to report the innermost nested bracket set. So 1+(2+3) would report 2+3
What would expressions such as (1+2)*(3+4) or ((1+2)*(3+(4+5))) report? Or do you want it to report a list of all of the innermost bracketed sets, and maybe their locations?
Last edited by hpotter134 (2011-04-20 20:38:58)
Offline
Another idea: To check if the parenthesis are unmatched, we can have two variables in the list setup engine, one for ( and one for ), and at the end of the setup we can check whether or not there are sufficient parenthesis, ie var(=var)
And after testing some stuff on my graphing calculator, I got an idea: If there are less ) parenthesis than ( parenthesis, we can
Repeat var( - var)
add ) to listThat way, 5(8 = 5(8) = 40
Just an idea, but it might be a nice feature.
Offline
That could just as easily be solved with just one variable, it would start as zero, and for every ( there would be 1 added to the varable, and for every ) 1 would be subtracted from the varable. if at the end the variable was not equal to zero, there would be a syntax error.
hpotter134 wrote:
Another idea: To check if the parenthesis are unmatched, we can have two variables in the list setup engine, one for ( and one for ), and at the end of the setup we can check whether or not there are sufficient parenthesis, ie var(=var)
And after testing some stuff on my graphing calculator, I got an idea: If there are less ) parenthesis than ( parenthesis, we canCode:
Repeat var( - var) add ) to listThat way, 5(8 = 5(8) = 40
Just an idea, but it might be a nice feature.
Offline
hpotter134 wrote:
Another idea: To check if the parenthesis are unmatched, we can have two variables in the list setup engine, one for ( and one for ), and at the end of the setup we can check whether or not there are sufficient parenthesis, ie var(=var)
And after testing some stuff on my graphing calculator, I got an idea: If there are less ) parenthesis than ( parenthesis, we canCode:
Repeat var( - var) add ) to listThat way, 5(8 = 5(8) = 40
Just an idea, but it might be a nice feature.
Hmm, maybe.
hpotter134 wrote:
Hardmath123 wrote:
Okay, I'm going to assign a few jobs:
...
hpotter134: Once amercbu's done, add something to report the innermost nested bracket set. So 1+(2+3) would report 2+3What would expressions such as (1+2)*(3+4) or ((1+2)*(3+(4+5))) report? Or do you want it to report a list of all of the innermost bracketed sets, and maybe their locations?
No, it would find the first ) and then look for the ( before.
For example...
((1+2)*(3+(4+5))) 1+2 3 (3*(3+(4+5))) 4+5 9 (3*(3+9)) 3+9 12 (3*12) 3*12 36
Last edited by scimonster (2011-04-21 13:42:05)
Offline
hpotter134 wrote:
Another idea: To check if the parenthesis are unmatched, we can have two variables in the list setup engine, one for ( and one for ), and at the end of the setup we can check whether or not there are sufficient parenthesis, ie var(=var)
And after testing some stuff on my graphing calculator, I got an idea: If there are less ) parenthesis than ( parenthesis, we canCode:
Repeat var( - var) add ) to listThat way, 5(8 = 5(8) = 40
Just an idea, but it might be a nice feature.
TI 84 graphing calculator? That's what I have. I think that this could be achieved, as applejack said, with one variable. After scanning the list, if the number of leftpar-rightpar is greater than 0, then you add a certain number of rightpar on the end. If the number of leftpar-rightpar is less than 0, you add some leftpar at the beginning.
Offline
I'm rounding constants to 5 decimals.
Offline
TI84? I have one too! I'm making tetris on it.
amcerbu wrote:
hpotter134 wrote:
Another idea: To check if the parenthesis are unmatched, we can have two variables in the list setup engine, one for ( and one for ), and at the end of the setup we can check whether or not there are sufficient parenthesis, ie var(=var)
And after testing some stuff on my graphing calculator, I got an idea: If there are less ) parenthesis than ( parenthesis, we canCode:
Repeat var( - var) add ) to listThat way, 5(8 = 5(8) = 40
Just an idea, but it might be a nice feature.TI 84 graphing calculator? That's what I have. I think that this could be achieved, as applejack said, with one variable. After scanning the list, if the number of leftpar-rightpar is greater than 0, then you add a certain number of rightpar on the end. If the number of leftpar-rightpar is less than 0, you add some leftpar at the beginning.
Offline
[/offtopic]
Offline
Rexpup's suggestion would make this so much easier! It's getting a bit hard remembering where each code is.
Edit: I just counted 8 C blocks nested!
Last edited by scimonster (2011-04-22 01:13:30)
Offline
Should we include a pick random operator? Some calcs use that...
Offline
TRocket wrote:
can i join i can program the brackets (i used them in my programming language in scratch)
Sorry, but I think we have enough members right now. We also have someone who will do brackets (hpotter134). Anyways, it's not me making decisions, it's Hardmath123, and he won't be back for a few days.
------------------
What I've done so far:
Adds numbers into 1 item
Adds ops
Adds brackets
Does the following multiple letter ops:
sqrt
abs (and ||)
mod
round
sin
cos
tan
atan
asin
acos
Last edited by scimonster (2011-04-22 08:11:07)
Offline
Xenon keeps crashing!
Offline
scimonster wrote:
What I've done so far:
Adds numbers into 1 item
Adds ops
Adds brackets
Does the following multiple letter ops:
sqrt
abs (and ||)
mod
round
sin
cos
tan
atan
asin
acos
You may have a TI84 or not, but I think that the multi-letter operations should work only within parentheses. That is, sin(5), not sin 5, sqrt(5), not sqrt 5, etc. That will clear up any unclear operations like sin 5*5: sin(5)*6 or sin(5*6)? The "sin()" part itself will work as a unit, so 5sin(5)+2 will report 5*sin(5)+2.
As far as your list of operations goes, I don't see anything missing.
I think we should also provide support for user defined variables, so an input that reads "define x" will create a variable named x, and setting a variable's value will be achieved by "x=8" (storing values can be handled by two parallel lists, one for names, one for values).
Me- Awaiting deployment.
Offline
hardmath told us not to get ahead of ourselves yet, should we in clude i ?
amcerbu wrote:
scimonster wrote:
What I've done so far:
Adds numbers into 1 item
Adds ops
Adds brackets
Does the following multiple letter ops:
sqrt
abs (and ||)
mod
round
sin
cos
tan
atan
asin
acosYou may have a TI84 or not, but I think that the multi-letter operations should work only within parentheses. That is, sin(5), not sin 5, sqrt(5), not sqrt 5, etc. That will clear up any unclear operations like sin 5*5: sin(5)*6 or sin(5*6)? The "sin()" part itself will work as a unit, so 5sin(5)+2 will report 5*sin(5)+2.
As far as your list of operations goes, I don't see anything missing.
I think we should also provide support for user defined variables, so an input that reads "define x" will create a variable named x, and setting a variable's value will be achieved by "x=8" (storing values can be handled by two parallel lists, one for names, one for values).
Me- Awaiting deployment.
Offline
applejack wrote:
hardmath told us not to get ahead of ourselves yet, should we include i ?
I don't think we should. The calculator would have to express things in terms of i, and it won't want to deal with anything imaginary.
Last edited by amcerbu (2011-04-22 21:38:10)
Offline
Kay.
amcerbu wrote:
applejack wrote:
hardmath told us not to get ahead of ourselves yet, should we include i ?
I don't think we should. The calculator would have to express things in terms of i, and it won't want to deal with anything imaginary.
Offline