Rewriter · subtraction & division only

SubDiv

Type any expression or equation and SubDiv rewrites it so the only binary operators left are subtraction and division. Parentheses and exponents stay intact.

a + b → a - (0 - b)

addition turns into a subtraction of a negation

a · b → a / (1 / b)

multiplication turns into a division by the reciprocal

Division by zero

Multiplying becomes a / (1 / b), which is undefined when b is 0. The original form may be fine (for example 5 * 0) while the rewritten one is not. The check flags this when it can.

Variables need values to verify

These rewrites are exact for all real values, but a numeric check needs actual numbers. Pick sample values to see the comparison; without them there is no single result to compare.

Signs and powers stay

A leading minus is a sign, not a binary operator, so it stays. Parentheses and exponents are preserved exactly as needed to keep the value unchanged.

Implicit multiplication

4y means 4 * y, and (x + 1)(x - 1) means the two groups are multiplied. Each implicit product is rewritten the same way as an explicit one.

The two rewrites

a + b → a - (0 - b)

Adding b is the same as subtracting its negated form, 0 - b. Subtraction of a negation cancels back to addition.

a · b → a / (1 / b)

Multiplying by b is the same as dividing by its reciprocal, 1 / b. This is where the division-by-zero caveat comes from: b must not be 0.

Everything else falls out: subtraction and division already qualify, unary minus is a sign, and parentheses and exponents are preserved. The converter walks the parse tree applying these rules from the leaves outward.