DGS Studio

Modulo / Remainder

Modulo / Remainder

Find the nonnegative Euclidean remainder using exact integer arithmetic. Use mod(a,b), a mod b, or a % b.

Modulo / Remainder. The equation to solve is mod(17,5).

Equation

mod(17,5)

How the equation is solved

Solve Equation keeps the algebra steps, not a curve. A linear equation isolates the variable. A polynomial can have several roots. A result is kept exact when it is an integer, a fraction, or a simple radical, and an approximation is added only when that helps.

Some inputs are identities or contradictions. 0·x = 0 is true for every x. 0·x = 5 is true for none. A system followed by 'find' solves the equations first and then evaluates the requested expression. The editor below sends the text you leave in the field.

Reading the input

Other versions of this example

These stay on this page so each version keeps the same explanation. Choose Try example to run a version in its Studio workflow, or copy it into the editable field below.

mod(17,5)

This is a command. The name selects the routine, and the items inside the parentheses are its arguments.

mod(17,5)

mod(100,7)

This is a command. The name selects the routine, and the items inside the parentheses are its arguments.

mod(100,7)

mod(2^10,7)

This is a command. The name selects the routine, and the items inside the parentheses are its arguments.

mod(2^10,7)

mod(105411*87050*467005,9)

This is a command. The name selects the routine, and the items inside the parentheses are its arguments.

mod(105411*87050*467005,9)

mod(-17,5)

This is a command. The name selects the routine, and the items inside the parentheses are its arguments.

mod(-17,5)

Try a change

Solve Equation opens the original input in the equation workspace and displays its symbolic results, conditions, and solution steps.

Edit and generate

Solve Equation opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples