S.P.A.M.

Where everything ELSE happens.
Forum rules

This week's Header Video was submitted by Raiyuuni! Congrats for getting it featured ^^

You can also submit a video or vote others at Pick Your Own Header Video!
And you can discuss them on the Header Video Discussion

S.P.A.M.

Postby TrappedTime » September 25th, 2009, 1:25 pm

ADDITION

SPAM
Super Pc Algebraic Math

Today we will explore the programming of an algebra problem solver.

This will take some time, since it will be only using words, and nothing else.

So to start off, we will start with addition.
Sounds simple?
Well it’s not.
First we have to decide what numbers are, and how to use them.

Numbers here are called “counts”.
For example, 5 is five counts, and one is only one count.
So let’s say we want 5+2.
It will only give us 7 if:

[1+1=2]
[2+4=6]
[3+9=12]
And so on for all 0-9 adding combinations…

Then it will understand that 5 counts is 5 one counts, and add them to 2 counts.
And it should pop up to be 7.

For anything above nine:

[0+1=1]
[9+1=10]

But we have to make it understand if there was more than one nine, so:

[99+1=[1+9=10; 10+90=100]100]

This gets confusing, so something has to be made to simplify it so we have one rule for higher than ten numbers.

Example:
[for all [1+9] add [1] to the count to the left]

Example:

[1] 3999+1{solve}
[s1]4000

[if no count on the left, then create left count and make it [1]]
So some problems using nine would be:

[1]289+25{solve}
[2]294+45{solve}*
[3]962+58{solve}*
[s1]314
[s2]339*
[s3]1200*

*This function is [MULTI_PROB] which lets the user have more than one problem.*

So as you can see, it is pretty confusing to make an adding machine.
Part 2, Subtraction, is coming next.


SUBTRACTION
This is subtraction.

Pretty easy to explain now.

So what this is supposed to do is tell the program to subtract.
Example:
[18-9=9]
[5-2=3]
[14-8=6]

And so on with all of the 0-9 subtraction combinations.

So how to do #00000-[1-or-9]

[0-9&a count is before the zero-->change the last [0] to [1] and change the rest of the [0] to [9]; subtract one from the LC]

Example:
[1]2000-9{solve}
[s1]1991

And for [#00-1]:

[0-1&a LC is in place{and is not 0}-->change all [0] to nine and subtract [1] from the LC]

So this would be an example:
[1]450-21{solve}
[2] 2040-1{solve}
[3] 347-189{solve}
[s1]429
[s2]2039
[s3]158

Now of course more than just this can’t make a good system, so more work has to be done in order for it to understand re-grouping.

Move on to Multiplication.


MULTIPLICATION
This one is pretty easy.

Just ask it to:
[for LC*RC make LC groups of RC and add]

Example:
[1]3*5{solve}
[s1]15

Move on to Division.

DIVISION
Ok, so the main thing would be fractions, since decimals would be too hard for now.

Let’s say you want:
[1]10/4

[for LC/RC find how many groups of RC makes LC]
.....|_[if RC cannot be grouped evenly, find how many can be grouped, then leave the left over count to be the new LC; turn the LC into the LLC and create [_]]
............|__[if possible, before grouping, find a CC that fits both numbers and find how many [CC] make the LC&RC]

Example(with solution):

[s1](10/4); CC=2; (5/2); 2_1/2

This can be more complicated, but this is just the beginning.



Now move on to Powers.


POWERS
Now this is like Multiplication, but instead of adding the cloned counts, it should multiply it.

Example:
[for LC^RC make RC clones of LC and multiply]

Example:
[1]34
[s1]81

Move on to Roots.



ROOTS
OK, so say you want [[1]4^(1/2)].

[for LC^(1/RC) find what NC can be cloned (RC-1) times and multiply to see if it matches LC]
NC=New Count

So the answer would be:
[s1]2
[2 can be cloned 1 time and multiplied to get 4]

Move on to Variables.


VARIABLES
This is easy too.
[for any non_number count, undo each math step using [M] or [D] first{depending which order they appear(OF)} then undo [A] or [S](OF)]
Example:
[1](m/3*2+1)-5=2
[s1]7

Up to one variable may be processed, unless SOE(Systems Of Equations) is put in.

This so far is only the simple math, for simple problems.

The more complicated stuff will be in my next SPAM report.
Last edited by TrappedTime on September 27th, 2009, 7:19 am, edited 1 time in total.
Gregg Shorthand : http://gregg.angelfishy.net/
(Chapters on the right column)
TrappedTime
The Legacy

 
Posts: 777
Joined: August 6th, 2009, 7:58 pm

Thumbs Up given: 0 times
Thumbs Up received: 1 time

Re: S.P.A.M.

Postby Ridder » September 25th, 2009, 3:01 pm

Do you want only Runouw to respond like LAST time?
Image
THE CREED: Nothing is True. Everything is Permitted.
"...That's rather cynical."

"It would be if it were doctrine, but it is merely an observation of the nature of reality.
To say that Nothing is True is to realize that the foundations of society are fragile, and that we must be the shephards of our own civilization.
To say that Everything is Permitted is to understand that we are the architects of our actions, and that we must live with the consequences, whether glorious...or tragic."
-Ezio Auditore da Firenze explaining the Creed, 1514, Masayaf.
User avatar
Ridder
The Legacy

 
Posts: 909
Joined: July 27th, 2012, 2:01 am
Location: The Aquilla

Cookie
Razputin: "The point of the cookie was for people who are awesome. Why does it not have one?"

Thumbs Up given: 20 times
Thumbs Up received: 36 times

Re: S.P.A.M.

Postby TrappedTime » September 25th, 2009, 5:38 pm

*Face palm*

No......
Anyone can reply, so please don't post downer replies.
Gregg Shorthand : http://gregg.angelfishy.net/
(Chapters on the right column)
TrappedTime
The Legacy

 
Posts: 777
Joined: August 6th, 2009, 7:58 pm

Thumbs Up given: 0 times
Thumbs Up received: 1 time

Re: S.P.A.M.

Postby brandoprojectm » September 29th, 2009, 11:36 am

Hmm, a misleading topic title using the word "spam"....now where have I seen that before...just kidding. Anyway, your topic is too long for me not to lose interest while reading, and even if I did read it, I don't see how this could be very relevant to most people. But it must've taken you quite a while, so....yeah.
Just remember this, when you see her on the street.

I'm the cruelest girl you'll ever meet.
User avatar
brandoprojectm
Prophet of Shadowsquid

Error contacting last.fm
 
Posts: 1467
Joined: August 1st, 2009, 6:44 pm
Location: ...

Thumbs Up given: 12 times
Thumbs Up received: 159 times

Re: S.P.A.M.

Postby TrappedTime » September 29th, 2009, 11:39 am

Actually, only like 5 minutes in all.
Maybe 7...
Gregg Shorthand : http://gregg.angelfishy.net/
(Chapters on the right column)
TrappedTime
The Legacy

 
Posts: 777
Joined: August 6th, 2009, 7:58 pm

Thumbs Up given: 0 times
Thumbs Up received: 1 time


Return to Off-Topic