Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

is_coprime function

Test whether two whole numbers have no common divisor above 1.

How to write it

is_coprime(a, b)

a
A whole number. Takes a whole number.
b
A whole number. Takes a whole number.

Examples

  • is_coprime⁡(8,15)=true⁡\displaystyle \operatorname{is\_coprime}(8, 15) = \operatorname{true}
    is_coprime(8, 15)

    In the solver, is_coprime(8, 15) gives true.

    Open in the solver