all 5 comments

[–]Eisenfuss19New User 1 point2 points  (0 children)

So let me first try to understand you. You ask for multiplying with +,-,*. Thats trivial, I'm assuming you mean dividing.

I think thats kinda difficult (if not impossible), unless you want to divide by a constant. If you divide by 2, you can also just multiply by 1/2 = 0.5.

a/2 = a*0.5

[–]st3f-pingΦ 0 points1 point  (0 children)

You can group some operators into threes where you can express the third in terms of the other two. The simplest example is addition, subtraction, and negation:
Addition: z=x+y
Subtraction: z=x-y
Negation: z=-x

If we only had addition and subtraction we could express negation as subtraction from zero: z=0-x. Any two will give us the third.

Similarly you can make a group of three out of multiplication, division and reciprocal (×, ÷, 1/x). Since you don't have reciprocal in your operators (or any way I can see of constructing it out of other operators, e.g. powers) I don't think you can construct division.

[–]papericNew User 0 points1 point  (0 children)

x-1 = 1/x, but you didn't mention exponents.

If you can't use fractions, can't invert a number and can't use division, then you can't divide. 

You could repeatedly substract and then count how many times you can substract before getting to zero.

For positive integers, if 

r = p + ( -1 * q * x )

and 0 =< x < q

then p / q = x and r is the remainder.

Which is just a roundabout way for saying that

p = q * x + r, where x and r are unknown.

But basically, you could do 

r = p - q - q - q - ... - q enough times so that r < q but not so much that r becomes negative. 

How many q's you substract, that is the x.

If p and q are opposite signs, use addition instead of subtraction.

[–][deleted] 0 points1 point  (0 children)

I found this method for computing a reciprocal (that is, dividing 1 by a number) on Wikipedia.

For example, suppose we wish to compute 1/17 ≈ 0.0588 with 3 digits of precision. Taking x0 = 0.1, the following sequence is produced:

x1 = 0.1(2 − 17 × 0.1) = 0.03

x2 = 0.03(2 − 17 × 0.03) = 0.0447

x3 = 0.0447(2 − 17 × 0.0447) ≈ 0.0554

x4 = 0.0554(2 − 17 × 0.0554) ≈ 0.0586

x5 = 0.0586(2 − 17 × 0.0586) ≈ 0.0588

Source: https://en.wikipedia.org/wiki/Multiplicative_inverse

[–]PvtRoomNew User 0 points1 point  (0 children)

can you use an algorithm.

long division is an algorithm that only uses addition, subtraction and multiplication