Fungrim home page

Fungrim entry: bf877e

xgcd ⁣(1,b)=(1,sgn ⁣((b1)(b+1)),sgn ⁣(b)(sgn ⁣(b+1)sgn ⁣(b1)))\operatorname{xgcd}\!\left(1, b\right) = \left(1, \left|\operatorname{sgn}\!\left(\left(b - 1\right) \left(b + 1\right)\right)\right|, \operatorname{sgn}\!\left(b\right) \left(\operatorname{sgn}\!\left(b + 1\right) - \operatorname{sgn}\!\left(b - 1\right)\right)\right)
Assumptions:bZb \in \mathbb{Z}
TeX:
\operatorname{xgcd}\!\left(1, b\right) = \left(1, \left|\operatorname{sgn}\!\left(\left(b - 1\right) \left(b + 1\right)\right)\right|, \operatorname{sgn}\!\left(b\right) \left(\operatorname{sgn}\!\left(b + 1\right) - \operatorname{sgn}\!\left(b - 1\right)\right)\right)

b \in \mathbb{Z}
Definitions:
Fungrim symbol Notation Short description
XGCDxgcd ⁣(a,b)\operatorname{xgcd}\!\left(a, b\right) Extended greatest common divisor
Absz\left|z\right| Absolute value
Signsgn ⁣(z)\operatorname{sgn}\!\left(z\right) Sign function
ZZZ\mathbb{Z} Integers
Source code for this entry:
Entry(ID("bf877e"),
    Formula(Equal(XGCD(1, b), Tuple(1, Abs(Sign(Mul(Sub(b, 1), Add(b, 1)))), Mul(Sign(b), Sub(Sign(Add(b, 1)), Sign(Sub(b, 1))))))),
    Variables(b),
    Assumptions(Element(b, ZZ)))

Topics using this entry

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2019-06-18 07:49:59.356594 UTC