Yeah i like math, can i join?
Offline
scimonster wrote:
Hardmath123 wrote:
Here are the features we need in the setup engine:
•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
•Replaces (a+b)(a-b) with (a+b)*(a-b)
•Ignores commas in numbers: 1,000 converts to 1000
•Checks for mismatched brackets
Let's add to this list, then start on the setup engine—we ought to finish it by next week.OK, I'm a bit busy but I'll try to start that soon.
![]()
Don't start yet—let's first complete this list.
Offline
Hardmath123 wrote:
scimonster wrote:
Hardmath123 wrote:
Here are the features we need in the setup engine:
•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
•Replaces (a+b)(a-b) with (a+b)*(a-b)
•Ignores commas in numbers: 1,000 converts to 1000
•Checks for mismatched brackets
Let's add to this list, then start on the setup engine—we ought to finish it by next week.OK, I'm a bit busy but I'll try to start that soon.
![]()
Don't start yet—let's first complete this list.
I didn't. What else is there to add?
Offline
That's what I'm asking in that post
Offline
Hey guys! I decided to try and go through with the postfix and see how far that took me. Here is the result of that. But since the general public is against that approach, you need only to take a look at the "tokenisation" aspect. It separates the problem into numbers, decimals, operators and IBFs (in-built functions) It also tells apart strings and gives NUL for unrecognized symbols.
I think this is what you guys were talking about.
Correct me if I'm wrong.
Offline
hpotter134 wrote:
Hey guys! I decided to try and go through with the postfix and see how far that took me. Here is the result of that. But since the general public is against that approach, you need only to take a look at the "tokenisation" aspect. It separates the problem into numbers, decimals, operators and IBFs (in-built functions) It also tells apart strings and gives NUL for unrecognized symbols.
I think this is what you guys were talking about.Correct me if I'm wrong.
At this point it looks like the project is done. Now we call on applejack to make some awesome graphics, and we're set? I still think it would look nicest 0s1s..
Offline
Offline
amcerbu wrote:
hpotter134 wrote:
Hey guys! I decided to try and go through with the postfix and see how far that took me. Here is the result of that. But since the general public is against that approach, you need only to take a look at the "tokenisation" aspect. It separates the problem into numbers, decimals, operators and IBFs (in-built functions) It also tells apart strings and gives NUL for unrecognized symbols.
I think this is what you guys were talking about.Correct me if I'm wrong.
At this point it looks like the project is done. Now we call on applejack to make some awesome graphics, and we're set? I still think it would look nicest 0s1s..
No way. We're a team. It's not a collaboration if one person makes the whole thing.
Offline
Hardmath123 wrote:
Here are the features we need in the setup engine:
•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
•Replaces (a+b)(a-b) with (a+b)*(a-b)
•Ignores commas in numbers: 1,000 converts to 1000
•Checks for mismatched brackets
•Replaces constants' names or symbols wiht values:
pi => 3.141592653
π => 3.141592653
Let's add to this list, then start on the setup engine—we ought to finish it by next week.
Somebody make an engine to do the only the above, please.
Offline
Hardmath123 wrote:
Hardmath123 wrote:
Here are the features we need in the setup engine:
•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
•Replaces (a+b)(a-b) with (a+b)*(a-b)
•Ignores commas in numbers: 1,000 converts to 1000
•Checks for mismatched brackets
•Replaces constants' names or symbols with values:
pi => 3.141592653
π => 3.141592653
Let's add to this list, then start on the setup engine—we ought to finish it by next week.Somebody make an engine to do only the above, please.
I'm sorry. I'm new to this whole collaboration thing. Here is an engine that I think does what you want, and only what you want. Please download it or view it in Flash player, for I don't think it works in the Java player.
Offline
Interesting.... Xenon is also the name of one of Intel's processors.
Offline
hpotter134 wrote:
Hardmath123 wrote:
Hardmath123 wrote:
Here are the features we need in the setup engine:
•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
•Replaces (a+b)(a-b) with (a+b)*(a-b)
•Ignores commas in numbers: 1,000 converts to 1000
•Checks for mismatched brackets
•Replaces constants' names or symbols with values:
pi => 3.141592653
π => 3.141592653
Let's add to this list, then start on the setup engine—we ought to finish it by next week.Somebody make an engine to do only the above, please.
I'm sorry. I'm new to this whole collaboration thing. Here is an engine that I think does what you want, and only what you want. Please download it or view it in Flash player, for I don't think it works in the Java player.
Ok, but it needs work. And it doesn't need tokenization (can we delete that bit?).
Offline
What about fractional exponents? radicals can have more than one solution, should it support all?
Hardmath123 wrote:
Here are the features we need in the setup engine:
•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
•Replaces (a+b)(a-b) with (a+b)*(a-b)
•Ignores commas in numbers: 1,000 converts to 1000
•Checks for mismatched brackets
•Replaces constants' names or symbols wiht values:
pi => 3.141592653
π => 3.141592653
Let's add to this list, then start on the setup engine—we ought to finish it by next week.
Offline
There's more backgronds now!
applejack wrote:
here's the startup.
Offline
Tell me what to do.
Offline
ProgrammingFreak wrote:
Tell me what to do.
You can
a) Contribute ideas
b) Expand on other's ideas
Choice a would involve making suggestions here on the forum, and making projects to display your ideas.
Choice b would involve any of the following
- brainstorming here on the forum
- testing/debugging other's contributions
- building on other's contributions
Currently we have my not-perfect list engine, you can test that and improve on that. If you go back a few pages you'll also find scimonster's setup engine; use that if you want.
is that specific enough for instructions?
Offline
Okay, thanks.
How bout they choose a mode (+, -, *, /) and then pick numbers. each time a button is clicked it adds/subtracts/multiplies/divides a 'answer' variable.
Last edited by ProgrammingFreak (2011-04-18 16:07:21)
Offline
That's a nice idea, but it wouldn't be helpful in many circumstances, like a programming language within scratch.
ProgrammingFreak wrote:
Okay, thanks.
How bout they choose a mode (+, -, *, /) and then pick numbers. each time a button is clicked it adds/subtracts/multiplies/divides a 'answer' variable.
Offline
ProgrammingFreak wrote:
Okay, thanks.
How bout they choose a mode (+, -, *, /) and then pick numbers. each time a button is clicked it adds/subtracts/multiplies/divides a 'answer' variable.
Actually, the whole point of this project is in creating a program that evaluates an expression. For example, the user puts in 3+4*2/(1−5)^2 and the program returns a value (in this case, 3.5), using order of operations, etc. There are many projects on Scratch that use the "choose a mode" method, but this is easier for the user and can support more complex problems.
Last edited by amcerbu (2011-04-18 23:46:46)
Offline
Necromaster wrote:
scimonster wrote:
Necromaster wrote:
Ok
It has so many more functions though![]()
I know. I have it. If you want, we can make a prototype in Panther or BYOB (preferably BYOB) then make procedures in scratch.
I'm having trouble with Scratch, it keeps crashing.![]()
BYOB then.
![]()
Some people might not understand the new concept of byob, iv done it befre but ill need to refresh on my skills in it
Offline
scimonster wrote:
Hardmath123 wrote:
scimonster wrote:
OK, I'm a bit busy but I'll try to start that soon.![]()
Don't start yet—let's first complete this list.
I didn't. What else is there to add?
Well couldn't we add functions like negatives and things in the order of mean, median,mode
Offline
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:
Last edited by Hardmath123 (2011-04-19 10:38:54)
Offline
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
Last edited by Hardmath123 (2011-04-20 05:13:31)
Offline