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)

Pages: 1 2 3 4 5 6


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!