Forums - Open Redstone Engineers
From addition to multiplication? - Printable Version

+- Forums - Open Redstone Engineers (https://forum.openredstone.org)
+-- Forum: Off-Topic (https://forum.openredstone.org/forum-4.html)
+--- Forum: Programming (https://forum.openredstone.org/forum-8.html)
+--- Thread: From addition to multiplication? (/thread-3124.html)



From addition to multiplication? - David - 04-15-2014

Is there a way to write a+b without using addition? I mean something like
"a \cdot \frac{a+b}{a}" (Use dis: click).
But there still is an addition sign in there. I'm not sure if you think I'm nuts or something but I was bored, like, reaaaaaaally bored and I just wondered that.

Also, not sure if this is the right subforum, but this seemed like the most logical place. Y'know, math and all.


RE: From addition to multiplication? - greatgamer34 - 04-15-2014

Yeah dummy, do this A-(-B)
Theres your addition!!!


RE: From addition to multiplication? - David - 04-15-2014

(04-15-2014, 03:57 PM)greatgamer34 Wrote: Yeah dummy, do this A-(-B)
Theres your addition!!!

Well, no shit. I was really looking for multiplication.


RE: From addition to multiplication? - greatgamer34 - 04-15-2014

so a multiplication program would use shift and subtract negative, which is the same as shift and add.


RE: From addition to multiplication? - David - 04-15-2014

(04-15-2014, 05:39 PM)greatgamer34 Wrote: so a multiplication program would use shift and subtract negative, which is the same as shift and add.

Yeah, true. But I'm wondering if you can do it without addition or subtraction.


RE: From addition to multiplication? - Iceglade - 04-15-2014

...why?


RE: From addition to multiplication? - David - 04-15-2014

(04-15-2014, 07:51 PM)Iceglade Wrote: ...why?

Can you imagine how bored I was?


RE: From addition to multiplication? - Iceglade - 04-15-2014

Hehe :p I don't THINK it's possible, (unless you wanted to define other operators or use matrices or what-not), but... maybe I'm wrong.


RE: From addition to multiplication? - David - 04-15-2014

(04-15-2014, 08:45 PM)Iceglade Wrote: Hehe :p I don't THINK it's possible, (unless you wanted to define other operators or use matrices or what-not), but... maybe I'm wrong.

Yeah, I don't think it's possible either. But I could always give it a shot.


RE: From addition to multiplication? - greatgamer34 - 04-15-2014

im sure you could use some trickery with factorials to get it to work Tongue


RE: From addition to multiplication? - Chibill - 04-16-2014

Using fractions!


RE: From addition to multiplication? - Iceglade - 04-16-2014

(04-16-2014, 12:15 AM)Chibill Wrote: Using fractions!
Formula? Tongue


RE: From addition to multiplication? - AFtExploision - 04-16-2014

user@pcnameghci: ~$ ghci
Prelude> add 4 3

No '+' signs used
#Haskell
(I'll try to think of a real solution)


RE: From addition to multiplication? - greatgamer34 - 04-16-2014

I think David wants it without addition....


RE: From addition to multiplication? - AFtExploision - 04-17-2014

He wants it without the '+' sign. at least thats what he said. Read the parenthesis


RE: From addition to multiplication? - Iceglade - 04-17-2014

(04-15-2014, 03:53 PM)David Wrote: Is there a way to write a+b without using addition?



RE: From addition to multiplication? - David - 04-17-2014

Yeah, and without subtraction.


RE: From addition to multiplication? - AFtExploision - 04-17-2014

Use rotation!


RE: From addition to multiplication? - David - 04-18-2014

(04-17-2014, 10:15 PM)AFtExploision Wrote: Use rotation!

wut Huh


RE: From addition to multiplication? - AFtExploision - 04-18-2014

I got it. You have two numbers, m and n. You do (10^m * 10^n) [Ten to the m times ten to the n]. Now, log base 10 of the answer to that equation will be m+n. (x^a * x^b = x^a+b), as algebra taught us. The base can be any number, I picked 10 because you could do powers of 10 on paper, and it is simple to tell if a number is a nice log of 10, (a log that returns a whole number), so this method is very friendly to use without a computer. (But on paper, you could draw a line n length, a line m length so that lines n and m form a longer line, and find the length of the longer line to get m + n, but my log way is computer-friendly, you'd have to add to find the endpoints so you could calculate the lines if you tried to implement it in code). IDK why none of us thought of this, its pretty simple actually. Now give me a prize!


RE: From addition to multiplication? - greatgamer34 - 04-18-2014

Why, just why,,,,,, didnt i think of that?!!!


NICE JOB AFTYPOO!


RE: From addition to multiplication? - Iceglade - 04-18-2014

(04-18-2014, 10:45 PM)AFtExploision Wrote: I got it. You have two numbers, m and n. You do (10^m * 10^n) [Ten to the m times ten to the n]. Now, log base 10 of the answer to that equation will be m+n. (x^a * x^b = x^a+b), as algebra taught us. The base can be any number, I picked 10 because you could do powers of 10 on paper, and it is simple to tell if a number is a nice log of 10, (a log that returns a whole number), so this method is very friendly to use without a computer. (But on paper, you could draw a line n length, a line m length so that lines n and m form a longer line, and find the length of the longer line to get m + n, but my log way is computer-friendly, you'd have to add to find the endpoints so you could calculate the lines if you tried to implement it in code). IDK why none of us thought of this, its pretty simple actually. Now give me a prize!

...so much for vector rotation :p


RE: From addition to multiplication? - AFtExploision - 04-18-2014

(04-18-2014, 11:02 PM)Iceglade Wrote:
(04-18-2014, 10:45 PM)AFtExploision Wrote: I got it. You have two numbers, m and n. You do (10^m * 10^n) [Ten to the m times ten to the n]. Now, log base 10 of the answer to that equation will be m+n. (x^a * x^b = x^a+b), as algebra taught us. The base can be any number, I picked 10 because you could do powers of 10 on paper, and it is simple to tell if a number is a nice log of 10, (a log that returns a whole number), so this method is very friendly to use without a computer. (But on paper, you could draw a line n length, a line m length so that lines n and m form a longer line, and find the length of the longer line to get m + n, but my log way is computer-friendly, you'd have to add to find the endpoints so you could calculate the lines if you tried to implement it in code). IDK why none of us thought of this, its pretty simple actually. Now give me a prize!

...so much for vector rotation :p
[17:00:49] Aft-pan: I wrote like 500 words on using vector rotation to figure it out
[17:01:00] Aft-pan: then I realized that vector rotation uses addition
[17:01:08] Alex Jarvis: Haha!
[17:01:17] Aft-pan: Then I tried cross-products
[17:01:21] Aft-pan: Couldnt get it to work
[17:01:35] Aft-pan: tried translation, realised pc's used addition to translate


RE: From addition to multiplication? - David - 04-19-2014

Whay didn't I think of that? What's your adress aft? I'll send you a cake.


RE: From addition to multiplication? - AFtExploision - 04-19-2014

Your closet


RE: From addition to multiplication? - David - 04-19-2014

(04-19-2014, 04:32 PM)AFtExploision Wrote: Your closet

Couldn't find you. I left the cake there, though.


RE: From addition to multiplication? - greatgamer34 - 04-19-2014

When I checked my closet.... There was a cake in there.... Creepy. I'll send it to Aft!


RE: From addition to multiplication? - Konstacon - 04-20-2014

Oh, you can be cheap and do the determinant of:
|m -n|
|1 1|
which is equal to m-(-n) or m+n... pretty cheap i guess.


RE: From addition to multiplication? - Iceglade - 04-20-2014

(04-20-2014, 12:43 AM)snugglycreeper9 Wrote: Oh, you can be cheap and do the determinant of:
|m -n|
|1 1|
which is equal to m-(-n) or m+n... pretty cheap i guess.

I don't think you can calculate a determinant without addition/subtraction.


RE: From addition to multiplication? - AFtExploision - 04-20-2014

(04-20-2014, 01:03 AM)Iceglade Wrote:
(04-20-2014, 12:43 AM)snugglycreeper9 Wrote: Oh, you can be cheap and do the determinant of:
|m -n|
|1 1|
which is equal to m-(-n) or m+n... pretty cheap i guess.

I don't think you can calculate a determinant without addition/subtraction.

Which is why I ditched the vector rotation, as far as I know to calculate the coordinates after rotation you need to add / subtract sines and cosines


RE: From addition to multiplication? - Iceglade - 04-20-2014

Yeah, you'd have to evaluate the dot products after multiplying.


RE: From addition to multiplication? - AFtExploision - 04-20-2014

Is there a way with compex numbers in the form r*e^(pheta * i)?!


RE: From addition to multiplication? - David - 04-20-2014

(04-20-2014, 03:01 AM)AFtExploision Wrote: Is there a way with compex numbers in the form r*e^(pheta * i)?!

*cough* maybe, umm, give me some time. I'll figure it out! *cough cough* *sniffle*


RE: From addition to multiplication? - Iceglade - 04-20-2014

(04-20-2014, 03:01 AM)AFtExploision Wrote: Is there a way with compex numbers in the form r*e^(pheta * i)?!

Hmm... r(cos(pheta)+i*sin(pheta))... you might even call that addition.


RE: From addition to multiplication? - David - 04-20-2014

(04-20-2014, 10:57 AM)Iceglade Wrote:
(04-20-2014, 03:01 AM)AFtExploision Wrote: Is there a way with compex numbers in the form r*e^(pheta * i)?!

Hmm... r(cos(pheta)+i*sin(pheta))... you might even call that addition.

What the actual f is pheta?


RE: From addition to multiplication? - Iceglade - 04-20-2014

(04-20-2014, 11:46 AM)David Wrote:
(04-20-2014, 10:57 AM)Iceglade Wrote:
(04-20-2014, 03:01 AM)AFtExploision Wrote: Is there a way with compex numbers in the form r*e^(pheta * i)?!

Hmm... r(cos(pheta)+i*sin(pheta))... you might even call that addition.

What the actual f is pheta?

I would assume that it is a misspelling of theta... I was just making fun of the error when I used it Tongue


RE: From addition to multiplication? - AFtExploision - 04-20-2014

Ice, no. You are using a + b*i in that. The form r*e^(theta*i) is a different form. Basically, it makes the complex number into a vector, the r is the length, the theta is the angle.


RE: From addition to multiplication? - Iceglade - 04-20-2014

Ohhhhhhhhh, polar form. I see.


RE: From addition to multiplication? - David - 04-21-2014

I love how my question causes discussions that I don't understand anymore...


RE: From addition to multiplication? - Dcentrics - 04-23-2014

Abandon Thread!


RE: From addition to multiplication? - AFtExploision - 04-23-2014

Abandon dcents!


RE: From addition to multiplication? - David - 04-24-2014

(04-23-2014, 09:57 PM)AFtExploision Wrote: Abandon dcents!

That's a better idea.


RE: From addition to multiplication? - greatgamer34 - 04-24-2014

Abandon hope ;-;*


RE: From addition to multiplication? - Konstacon - 04-26-2014

I found a way. As an exit slip of ORE, here is my way. First, let function f map a factorial to its number, like f(120) = 5. If I use normal math terms it'd be f: x! → x. Now, the binomial coeffecient of n and k is n!/k!(n-k)!. This can be represented differently, but let's use this definition because it has (n-k)!. In order to remove that ugly n! numerator we multiply the coeffecient by 1/n!. To remove the k! at the bottom, we multiply everything by k!. Now we have k!/n! * binom(n,k) = 1/(n-k)!, so let's do 1/binom(n,k) to get (n-k)!. Now we have n!/k! * 1/binom(n,k) = (n-k)!. To simplify this, we can remember reciprocals from pre-algebra (did that two months ago, fuck prealgebra) and we know a * 1/b = a/b, so we'd get (n!/k!)/binom(n,k) = (n-k)!. Now, remember our function f? To map (n-k)! without using subtraction, we do f((n!/k!)/binom(n,k)) = n-k. Now to transform n-k to n+k? Simple; take the conjugate of this. Writing this in equation form makes:
Well I'm lazy, go onto http://www.codecogs.com/latex/eqneditor.php and type in f\overline{\left (\frac{n!/k!}{\binom{n}{k}}\right )}=n+k in the thing. The line over everything is the conjugate symbol. Take that aft!

Fuck... nobody will understand my post I just realized.


RE: From addition to multiplication? - Konstacon - 04-27-2014

fuck.


RE: From addition to multiplication? - Iceglade - 04-27-2014

[Image: gif.latex?%5Cint%5Climits_a%5Eb%20dx%20%...20%28-a%29]

(04-15-2014, 03:53 PM)David Wrote: Is there a way to write a+b without using addition?

Notice he didn't say anything about method of evaluation :3


RE: From addition to multiplication? - David - 04-27-2014

Huh?.


RE: From addition to multiplication? - Konstacon - 04-27-2014

(04-27-2014, 08:55 PM)David Wrote: Huh?.

He's saying the area under the curve f(x) = 1 from a to b, which is b-a, or b+(-a)


RE: From addition to multiplication? - Iceglade - 04-28-2014

Obviously if you were to evaluate it you would have to use the fundamental theorem of calculus and subtract anyway (and you subtract in some quantity in all the numerical methods too), but the general presentation doesn't imply any kind of additive relationship. (Since it's a rectangle, it almost feels more like multiplication).


RE: From addition to multiplication? - David - 04-28-2014

I'll just let you two figure it out, I'm outta here.


RE: From addition to multiplication? - AFtExploision - 04-28-2014

Oh, then if thats the case, we can do vector rotation!


RE: From addition to multiplication? - Iceglade - 04-29-2014

Oh true, that was slightly hypocritical Tongue


RE: From addition to multiplication? - Iceglade - 05-08-2014

[Image: gif.latex?%3Ca%2C1%3E%20%5Ccdot%20%3C1%2...+%20b]

Dot product!

Actually, this is perfect since it's literally a multiplication Smile


RE: From addition to multiplication? - AFtExploision - 05-09-2014

That is what I did but your rules didn't allow me. NOW YOU TAKE MY IDEA AND CHANGE THE RULES TO ALLOW YOU TO DO IT. You'll be a fine politician.


RE: From addition to multiplication? - Iceglade - 05-09-2014

(05-09-2014, 12:01 AM)AFtExploision Wrote: That is what I did but your rules didn't allow me. NOW YOU TAKE MY IDEA AND CHANGE THE RULES TO ALLOW YOU TO DO IT. You'll be a fine politician.

all ur moniez is belongz to me

Also I never set rules, look in the thread


RE: From addition to multiplication? - Guy1234567890 - 04-25-2015

$a+b=\log{e^{a+b}}=\log{e^{a}e^{b}}$

(how do I use latex in this thing?!)


RE: From addition to multiplication? - Iceglade - 04-25-2015

That solution was posted in base 10 a while ago I think


RE: From addition to multiplication? - Guy1234567890 - 04-25-2015

Oh yeah, i just read the first page of this thread lol