[{"name":"Integer","comment":" Compute with the [integers](https://en.wikipedia.org/wiki/Integer), ℤ = { ..., -2, -1, 0, 1, 2, ... }.\n\n\n# Representation\n\n@docs Integer\n\n\n# Constants\n\nThe integers from [`-10`](#negativeTen) to [`10`](#ten) inclusive are named.\n\n@docs zero, one, two, three, four, five, six, seven, eight, nine, ten\n@docs negativeOne, negativeTwo, negativeThree, negativeFour, negativeFive, negativeSix, negativeSeven, negativeEight, negativeNine, negativeTen\n\n\n# Limits\n\nLet `n : Int`. If `minSafeInt <= n <= maxSafeInt` then `n` is called a **safe `Int`**.\n\n@docs maxSafeInt, minSafeInt\n\n\n# Constructors\n\n@docs fromSafeInt, fromInt, fromNatural, fromSafeString, fromString, fromBinaryString, fromOctalString, fromDecimalString, fromHexString, fromBaseBString\n\n\n# Comparison\n\nTo test for equality between two integers you can use `==` and `/=`.\n\n    add negativeFive two == negativeThree\n\n    mul negativeThree negativeThree /= negativeNine\n\nFor all other comparisons you will have to use the functions below.\n\n@docs compare, isLessThan, isLessThanOrEqual, isGreaterThan, isGreaterThanOrEqual, max, min\n\n\n# Predicates\n\n@docs isNegative, isNonNegative, isZero, isNonZero, isPositive, isNonPositive, isEven, isOdd\n\n\n# Arithmetic\n\n@docs abs, negate, add, sub, mul, divModBy, divBy, modBy, quotRemBy, quotBy, remBy, exp\n\n\n# Conversion\n\n@docs toInt, toNatural, toString, toBinaryString, toOctalString, toDecimalString, toHexString, toBaseBString\n\n","unions":[{"name":"Integer","comment":" A representation of the integers.\n\nIf you must know, it uses a **sign-magnitude** representation.\n\n**N.B.** _The size of the numbers you can compute with is only limited by the available memory._\n\n","args":[],"cases":[]}],"aliases":[],"values":[{"name":"abs","comment":" Compute the [absolute value](https://en.wikipedia.org/wiki/Absolute_value) of the given integer.\nIf you want it as a [natural number](https://package.elm-lang.org/packages/dwayne/elm-natural/1.1.1/Natural),\nuse [`toNatural`](#toNatural).\n\nYou can think of the absolute value of an integer as its distance from [`0`](#zero).\n\n    abs zero == zero\n\n    abs five == five\n\n    abs negativeFive = five\n    -- Because 5 and -5 are the same distance away from 0.\n\n","type":"Integer.Integer -> Integer.Integer"},{"name":"add","comment":" Add two integers.\n","type":"Integer.Integer -> Integer.Integer -> Integer.Integer"},{"name":"compare","comment":" Compare any two integers.\n\n    compare negativeFive negativeTwo == LT\n\n    compare two two == EQ\n\n    compare five negativeTen == GT\n\n","type":"Integer.Integer -> Integer.Integer -> Basics.Order"},{"name":"divBy","comment":" Find the quotient when the second integer is divided by the first.\n\n**N.B.** _Please see [`divModBy`](#divModBy) to understand how the quotient is computed._\n\n","type":"Integer.Integer -> Integer.Integer -> Maybe.Maybe Integer.Integer"},{"name":"divModBy","comment":" Find the quotient and remainder when the second integer (the **dividend**) is divided by the first (the **divisor**).\n\n`divModBy d D` of two integers `D` and `d ≠ 0`, is defined as producing\ntwo unique integers `q` (the **quotient**) and `r` (the **remainder**) such that\n\n  - `d * q` is the greatest multiple of `d` less than or equal to `D`, and\n  - `r = D - d * q` such that `0 <= r < |d|` (i.e. `r` is always non-negative).\n\nFor e.g.\n\n    (ten |> divModBy two) == Just ( five, zero )\n\n    (ten |> divModBy negativeTwo) == Just ( negativeFive, zero )\n\n    (negativeTen |> divModBy two) == Just ( negativeFive, zero )\n\n    (negativeTen |> divModBy negativeTwo) == Just ( five, zero )\n\n    (ten |> divModBy three) == Just ( three, one )\n\n    (ten |> divModBy negativeThree) == Just ( negativeThree, one )\n\n    (negativeTen |> divModBy three) == Just ( negativeFour, two )\n\n    (negativeTen |> divModBy negativeThree) == Just ( four, two )\n\nDivision by `0` is not allowed. So, for all `z : Integer`,\n\n    (z |> divModBy zero) == Nothing\n\n**N.B.** _`divModBy` defines [Euclidean division] (or E-division) according to Daan Leijen's paper,\n[Division and Modulus for Computer Scientists]._\n\n[Euclidean division]: https://en.wikipedia.org/wiki/Euclidean_division\n[Division and Modulus for Computer Scientists]: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf\n\n","type":"Integer.Integer -> Integer.Integer -> Maybe.Maybe ( Integer.Integer, Integer.Integer )"},{"name":"eight","comment":" The integer [`8`](https://en.wikipedia.org/wiki/8).\n","type":"Integer.Integer"},{"name":"exp","comment":" Integer exponentiation. Find the power of the integer (the **base**) to the natural number (the **exponent**).\n\nGiven,\n\n    import Natural as N\n\nThen,\n\n    exp two N.three == eight\n\n    exp negativeTwo N.three == negativeEight\n\nFor all `z : Integer`,\n\n    exp z N.zero == one\n\nIn particular,\n\n    exp zero N.zero == one\n\n**N.B.** _You can read \"[What is `0^0`?](https://maa.org/book/export/html/116806)\" to learn more_.\n\nFor all `n : Natural`, where `n` is positive,\n\n    exp zero n == zero\n\n","type":"Integer.Integer -> Natural.Natural -> Integer.Integer"},{"name":"five","comment":" The integer [`5`](https://en.wikipedia.org/wiki/5).\n","type":"Integer.Integer"},{"name":"four","comment":" The integer [`4`](https://en.wikipedia.org/wiki/4).\n","type":"Integer.Integer"},{"name":"fromBaseBString","comment":" Create the integer represented by the given signed base-`b` string.\n\n`b` must be between 2 and 36 inclusive and each character in the string must be a valid base-`b` digit.\n\n\n### About base-`b` digits\n\nA valid base-`b` digit is any digit `d` such that `0 <= d <= b - 1`.\n\nFor bases larger than 10, you can use case-insensitive letters from the [Latin alphabet](https://en.wikipedia.org/wiki/Latin_alphabet)\nto represent the base-`b` digits that are 10 or larger. So,\n\n```txt\nA or a represents 10\nB or b represents 11\nC or c represents 12\n...\nZ or z represents 35\n```\n\nFor e.g.\n\nIf `b = 16` then the valid base-16 digits are `[0-9a-fA-F]`.\n\nIf `b = 36` then the valid base-36 digits are `[0-9a-zA-Z]`.\n\n\n### Syntax for `fromBaseBString` input\n\n```txt\ninput ::= -? [digit]+\ndigit ::= [0-9a-zA-Z]\n```\n\nValid strings when `b = 16`:\n\n`\"0\"`, `\"-0\"`, `\"123\"`, `\"-123\"`, and `\"-Ff\"`.\n\nInvalid strings when `b = 16`:\n\n  - `\"+2\"`, because `'+'` is not part of the allowed syntax,\n  - `\"5g\"`, because `'g'` is not a hexadecimal digit.\n\n\n### Examples\n\n    fromBaseBString 2 \"1010\" == Just ten\n\n    fromBaseBString 2 \"-1010\" == Just negativeTen\n\n    fromBaseBString 16 \"aD\" == fromInt 173\n\n    fromBaseBString 36 \"z\" == fromInt 35\n\n    fromBaseBString 2 \"\" == Nothing\n    -- Because the string is empty.\n\n    fromBaseBString 8 \"-\" == Nothing\n    -- Because there must be at least one octal digit.\n\n    fromBaseBString 10 \"A\" == Nothing\n    -- Because 'A' is not a decimal digit.\n\n","type":"Basics.Int -> String.String -> Maybe.Maybe Integer.Integer"},{"name":"fromBinaryString","comment":" Create the integer represented by the given signed binary string.\n\n```txt\nbinary ::= -? [0-1]+\n```\n\nFor e.g.\n\n    fromBinaryString \"0\" == Just zero\n\n    fromBinaryString \"1010\" == Just ten\n\n    fromBinaryString \"-1010\" == Just negativeTen\n\n    fromBinaryString \"\" == Nothing\n    -- Because the string is empty.\n\n    fromBinaryString \"-\" == Nothing\n    -- Because there must be at least one binary digit.\n\n    fromBinaryString \"2\" == Nothing\n    -- Because '2' is not a binary digit.\n\n","type":"String.String -> Maybe.Maybe Integer.Integer"},{"name":"fromDecimalString","comment":" Create the integer represented by the given signed decimal string.\n\n```txt\ndecimal ::= -? [0-9]+\n```\n\nFor e.g.\n\n    fromDecimalString \"0\" == Just zero\n\n    fromDecimalString \"10\" == Just ten\n\n    fromDecimalString \"-10\" == Just negativeTen\n\n    fromDecimalString \"\" == Nothing\n    -- Because the string is empty.\n\n    fromDecimalString \"-\" == Nothing\n    -- Because there must be at least one decimal digit.\n\n    fromDecimalString \"A\" == Nothing\n    -- Because 'A' is not a decimal digit.\n\n","type":"String.String -> Maybe.Maybe Integer.Integer"},{"name":"fromHexString","comment":" Create the integer represented by the given signed hexadecimal string.\n\n```txt\nhex ::= -? [0-9a-fA-F]+\n```\n\nFor e.g.\n\n    fromHexString \"0\" == Just zero\n\n    fromHexString \"a\" == Just ten\n\n    fromHexString \"-A\" == Just negativeTen\n\n    fromHexString \"\" == Nothing\n    -- Because the string is empty.\n\n    fromHexString \"-\" == Nothing\n    -- Because there must be at least one hexadecimal digit.\n\n    fromHexString \"5g\" == Nothing\n    -- Because 'g' is not a hexadecimal digit.\n\n","type":"String.String -> Maybe.Maybe Integer.Integer"},{"name":"fromInt","comment":" Create the integer that represents the given `Int`.\n\n    fromInt 0 == Just zero\n\n    fromInt 1 == Just one\n\n    fromInt -1 == Just negativeOne\n\n    fromInt maxSafeInt == fromString \"9007199254740991\"\n\n    fromInt minSafeInt == fromString \"-9007199254740991\"\n\nUnless the given `Int` is less than [`minSafeInt`](#minSafeInt) or greater than [`maxSafeInt`](#maxSafeInt).\n\n    fromInt (minSafeInt - 1) == Nothing\n\n    fromInt (maxSafeInt + 1) == Nothing\n\n","type":"Basics.Int -> Maybe.Maybe Integer.Integer"},{"name":"fromNatural","comment":" If you happen to have a [natural number](https://package.elm-lang.org/packages/dwayne/elm-natural/1.1.1/Natural)\nat hand then you can convert it to an integer using this function.\n\nFor all `n : Natural`:\n\n  - `toNatural (fromNatural n) == n`,\n  - `isNonNegative (fromNatural n) == True`.\n\n","type":"Natural.Natural -> Integer.Integer"},{"name":"fromOctalString","comment":" Create the integer represented by the given signed octal string.\n\n```txt\noctal ::= -? [0-7]+\n```\n\nFor e.g.\n\n    fromOctalString \"0\" == Just zero\n\n    fromOctalString \"12\" == Just ten\n\n    fromOctalString \"-12\" == Just negativeTen\n\n    fromOctalString \"\" == Nothing\n    -- Because the string is empty.\n\n    fromOctalString \"-\" == Nothing\n    -- Because there must be at least one octal digit.\n\n    fromOctalString \"8\" == Nothing\n    -- Because '8' is not an octal digit.\n\n","type":"String.String -> Maybe.Maybe Integer.Integer"},{"name":"fromSafeInt","comment":" Use this function when you know the given `Int` is a [safe `Int`](#limits).\n\n    fromSafeInt 0 == zero\n\n    fromSafeInt 1 == one\n\n    fromSafeInt -1 == negativeOne\n\n    fromSafeInt maxSafeInt == fromSafeString \"9007199254740991\"\n\n    fromSafeInt minSafeInt == fromSafeString \"-9007199254740991\"\n\nIf the given `Int` isn't safe then [`zero`](#zero) is returned.\n\n    fromSafeInt (minSafeInt - 1) == zero\n\n    fromSafeInt (maxSafeInt + 1) == zero\n\nThis function is useful for establishing **small constants** in a calculation. For e.g.\nto [compute the first 100 digits of π using John Machin's formula](https://en.wikipedia.org/wiki/Machin-like_formula)\nthe integer 239 is needed.\n\n    twoThirtyNine : Integer\n    twoThirtyNine =\n        fromSafeInt 239\n\n","type":"Basics.Int -> Integer.Integer"},{"name":"fromSafeString","comment":" It's best to use this function when you can guarantee that the string you're dealing with\nis a valid input to the [`fromString`](#fromString) function.\n\nIf the input is invalid then [`zero`](#zero) is returned.\n\n**N.B.** _Read the documentation of [`fromString`](#fromString) to learn what's considered to\nbe valid or invalid input to this function._\n\nThis function is useful for establishing **large constants** in a calculation.\n\n    oneGoogol : Natural\n    oneGoogol =\n        -- 10 ^ 100\n        fromSafeString \"10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\"\n\nLearn more about a [googol](https://en.wikipedia.org/wiki/Googol).\n\n\n### What's considered a large constant?\n\nLet `n : Int`, since `fromSafeInt n` can be used for `minSafeInt <= n <= maxSafeInt` then it makes sense\nto consider any integer smaller than [`minSafeInt`](#minSafeInt) or larger than [`maxSafeInt`](#maxSafeInt),\na large constant.\n\n","type":"String.String -> Integer.Integer"},{"name":"fromString","comment":" Create the integer represented by the given signed string.\n\n\n### Syntax for `fromString` input\n\n```txt\ninput    ::= signed\nsigned   ::= -? unsigned\nunsigned ::= ('0b' | '0B') binary\n           | ('0o' | '0O') octal\n           | ('0x' | '0X') hex\n           | decimal\nbinary   ::= [0-1]+\noctal    ::= [0-7]+\nhex      ::= [0-9a-fA-F]+\ndecimal  ::= [0-9]+\n```\n\nFor e.g.\n\n    fromString \"0b10101101\" == fromInt 173\n\n    fromString \"-0o255\" == fromInt -173\n\n    fromString \"0XaD\" == fromInt 173\n\n    fromString \"173\" == fromInt 173\n\n    fromString \"b10101101\" == Nothing\n    -- Because the leading '0' is missing.\n\n    fromString \"-aD\" == Nothing\n    -- Because 'a' is not a decimal digit.\n\n    fromString \"0x\" == Nothing\n    -- Because there must be at least one hexadecimal digit.\n\n","type":"String.String -> Maybe.Maybe Integer.Integer"},{"name":"isEven","comment":" Determine if the integer is even (i.e. divisible by [`2`](#two)).\n\n    isEven zero == True\n\n    isEven negativeFour == True\n\n    isEven eight == True\n\n    isEven three == False\n\n    isEven negativeNine == False\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"isGreaterThan","comment":" Determine if the second integer is greater than the first.\n\n    (negativeFive |> isGreaterThan negativeTwo) == False\n\n    (two |> isGreaterThan two) == False\n\n    (five |> isGreaterThan negativeTen) == True\n\n","type":"Integer.Integer -> Integer.Integer -> Basics.Bool"},{"name":"isGreaterThanOrEqual","comment":" Determine if the second integer is greater than or equal to the first.\n\n    (negativeFive |> isGreaterThanOrEqual negativeTwo) == False\n\n    (two |> isGreaterThanOrEqual two) == True\n\n    (five |> isGreaterThanOrEqual negativeTen) == True\n\n","type":"Integer.Integer -> Integer.Integer -> Basics.Bool"},{"name":"isLessThan","comment":" Determine if the second integer is less than the first.\n\n    (negativeFive |> isLessThan negativeTwo) == True\n\n    (two |> isLessThan two) == False\n\n    (five |> isLessThan negativeTen) == False\n\n","type":"Integer.Integer -> Integer.Integer -> Basics.Bool"},{"name":"isLessThanOrEqual","comment":" Determine if the second integer is less than or equal to the first.\n\n    (negativeFive |> isLessThanOrEqual negativeTwo) == True\n\n    (two |> isLessThanOrEqual two) == True\n\n    (five |> isLessThanOrEqual negativeTen) == False\n\n","type":"Integer.Integer -> Integer.Integer -> Basics.Bool"},{"name":"isNegative","comment":" Determine if the integer is negative (i.e. less than [`0`](#zero)).\n\n    isNegative negativeTwo == True\n\n    isNegative zero == False\n\n    isNegative two == False\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"isNonNegative","comment":" Determine if the integer is non-negative (i.e. not negative, so greater than or equal to [`0`](#zero)).\n\n    isNonNegative negativeTwo == False\n\n    isNonNegative zero == True\n\n    isNonNegative two == True\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"isNonPositive","comment":" Determine if the integer is non-positive (i.e. not positive, so less than or equal to [`0`](#zero)).\n\n    isNonPositive five == False\n\n    isNonPositive zero == True\n\n    isNonPositive negativeEight == True\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"isNonZero","comment":" Determine if the integer is non-zero (i.e. not [`0`](#zero), so either positive or negative).\n\n    isNonZero zero == False\n\n    isNonZero negativeSeven == True\n\n    isNonZero six == True\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"isOdd","comment":" Determine if the integer is odd (i.e. not even, so not divisible by [`2`](#two)).\n\n    isOdd zero == False\n\n    isOdd negativeFour == False\n\n    isOdd eight == False\n\n    isOdd three == True\n\n    isOdd negativeNine == True\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"isPositive","comment":" Determine if the integer is positive (i.e. greater than [`0`](#zero)).\n\n    isPositive five == True\n\n    isPositive zero == False\n\n    isPositive negativeEight == False\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"isZero","comment":" Determine if the integer is `0`.\n\n    isZero zero == True\n\n    isZero negativeSeven == False\n\n    isZero six == False\n\n","type":"Integer.Integer -> Basics.Bool"},{"name":"max","comment":" Find the larger of two integers.\n\n    max five negativeTen == five\n\n    max negativeFive negativeTwo == negativeTwo\n\n","type":"Integer.Integer -> Integer.Integer -> Integer.Integer"},{"name":"maxSafeInt","comment":" The largest `Int`, currently `2^53 - 1 = 9007199254740991`, which can be given as input to\n[`fromSafeInt`](#fromSafeInt) and [`fromInt`](#fromInt) without causing problems.\n","type":"Basics.Int"},{"name":"min","comment":" Find the smaller of two integers.\n\n    min five negativeTen == negativeTen\n\n    min negativeFive negativeTwo == negativeFive\n\n","type":"Integer.Integer -> Integer.Integer -> Integer.Integer"},{"name":"minSafeInt","comment":" The smallest `Int`, currently `-2^53 + 1 = -9007199254740991`, which can be given as input to\n[`fromSafeInt`](#fromSafeInt) and [`fromInt`](#fromInt) without causing problems.\n","type":"Basics.Int"},{"name":"modBy","comment":" Find the remainder when the second integer is divided by the first.\n\n**N.B.** _Please see [`divModBy`](#divModBy) to understand how the remainder is computed._\n\n","type":"Integer.Integer -> Integer.Integer -> Maybe.Maybe Integer.Integer"},{"name":"mul","comment":" Multiply two integers.\n","type":"Integer.Integer -> Integer.Integer -> Integer.Integer"},{"name":"negate","comment":" Compute the [additive inverse](https://en.wikipedia.org/wiki/Additive_inverse) of the given integer.\n\nThe additive inverse of an integer, `z`, is the integer that, when added to `z`, yields [`0`](#zero).\n\n    negate five == negativeFive\n    -- Because 5 + (-5) = 0.\n\n    negate negativeFive == five\n    -- Because -5 + 5 = 0.\n\n    negate zero == zero\n    -- Becase 0 + 0 = 0.\n\n","type":"Integer.Integer -> Integer.Integer"},{"name":"negativeEight","comment":" The integer `-8`.\n","type":"Integer.Integer"},{"name":"negativeFive","comment":" The integer `-5`.\n","type":"Integer.Integer"},{"name":"negativeFour","comment":" The integer `-4`.\n","type":"Integer.Integer"},{"name":"negativeNine","comment":" The integer `-9`.\n","type":"Integer.Integer"},{"name":"negativeOne","comment":" The integer [`-1`](https://en.wikipedia.org/wiki/-1).\n","type":"Integer.Integer"},{"name":"negativeSeven","comment":" The integer `-7`.\n","type":"Integer.Integer"},{"name":"negativeSix","comment":" The integer `-6`.\n","type":"Integer.Integer"},{"name":"negativeTen","comment":" The integer `-10`.\n","type":"Integer.Integer"},{"name":"negativeThree","comment":" The integer `-3`.\n","type":"Integer.Integer"},{"name":"negativeTwo","comment":" The integer `-2`.\n","type":"Integer.Integer"},{"name":"nine","comment":" The integer [`9`](https://en.wikipedia.org/wiki/9).\n","type":"Integer.Integer"},{"name":"one","comment":" The integer [`1`](https://en.wikipedia.org/wiki/1).\n","type":"Integer.Integer"},{"name":"quotBy","comment":" Find the quotient when the second integer is divided by the first.\n\n**N.B.** _Please see [`quotRemBy`](#quotRemBy) to understand how the quotient is computed._\n\n","type":"Integer.Integer -> Integer.Integer -> Maybe.Maybe Integer.Integer"},{"name":"quotRemBy","comment":" Find the quotient and remainder when the second integer (the **dividend**) is divided by the first (the **divisor**).\n\n`quotRemBy d D` of two integers `D` and `d ≠ 0`, is defined as producing\ntwo unique integers `q` (the **quotient**) and `r` (the **remainder**) such that\n\n  - `|d * q|` is the greatest multiple of `d` less than or equal to `|D|`, and\n  - `r = D - d * q` such that `0 <= |r| < |d|` (i.e. `r` can be negative).\n\nFor e.g.\n\n    (ten |> quotRemBy two) == Just ( five, zero )\n\n    (ten |> quotRemBy negativeTwo) == Just ( negativeFive, zero )\n\n    (negativeTen |> quotRemBy two) == Just ( negativeFive, zero )\n\n    (negativeTen |> quotRemBy negativeTwo) == Just ( five, zero )\n\n    (ten |> quotRemBy three) == Just ( three, one )\n\n    (ten |> quotRemBy negativeThree) == Just ( negativeThree, one )\n\n    (negativeTen |> quotRemBy three) == Just ( negativeThree, negativeOne )\n\n    (negativeTen |> quotRemBy negativeThree) == Just ( three, negativeOne )\n\nDivision by `0` is not allowed. So, for all `z : Integer`,\n\n    (z |> quotRemBy zero) == Nothing\n\n**N.B.** _`quotRemBy` defines truncated division (or T-division) according to Daan Leijen's paper,\n[Division and Modulus for Computer Scientists]._\n\n[Division and Modulus for Computer Scientists]: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/divmodnote-letter.pdf\n\n","type":"Integer.Integer -> Integer.Integer -> Maybe.Maybe ( Integer.Integer, Integer.Integer )"},{"name":"remBy","comment":" Find the remainder when the second integer is divided by the first.\n\n**N.B.** _Please see [`quotRemBy`](#quotRemBy) to understand how the remainder is computed._\n\n","type":"Integer.Integer -> Integer.Integer -> Maybe.Maybe Integer.Integer"},{"name":"seven","comment":" The integer [`7`](https://en.wikipedia.org/wiki/7).\n","type":"Integer.Integer"},{"name":"six","comment":" The integer [`6`](https://en.wikipedia.org/wiki/6).\n","type":"Integer.Integer"},{"name":"sub","comment":" Subtract the second integer from the first.\n\n    sub ten four == six\n    -- 10 - 4 = 6\n\n    sub four ten == negativeSix\n    -- 4 - 10 = -6\n\n","type":"Integer.Integer -> Integer.Integer -> Integer.Integer"},{"name":"ten","comment":" The integer [`10`](https://en.wikipedia.org/wiki/10).\n","type":"Integer.Integer"},{"name":"three","comment":" The integer [`3`](https://en.wikipedia.org/wiki/3).\n","type":"Integer.Integer"},{"name":"toBaseBString","comment":" Convert any integer to its signed base-`b` representation.\n\n`b` must be between 2 and 36 inclusive and each character in the resulting string\nwill be a valid base-`b` digit.\n\nAll [Latin letters](https://en.wikipedia.org/wiki/Latin_alphabet) in the base-`b`\nrepresentation will be uppercased.\n\nFor e.g.\n\n    toBaseBString 2 (fromSafeInt 1729) == Just \"11011000001\"\n\n    toBaseBString 8 (fromSafeInt -1729) == Just \"-3301\"\n\n    toBaseBString 10 (fromSafeInt 1729) == Just \"1729\"\n\n    toBaseBString 16 (fromSafeInt -1729) == Just \"-6C1\"\n\n    toBaseBString 36 (fromSafeInt 1729) == Just \"1C1\"\n\nFor any `k : Int` where `k < 2` or `k > 36`, and any `z : Integer`,\n\n    toBaseBString k z == Nothing\n\n**N.B.** _Please refer to [`fromBaseBString`](#about-base-b-digits) to learn more about base-`b` digits._\n\n","type":"Basics.Int -> Integer.Integer -> Maybe.Maybe String.String"},{"name":"toBinaryString","comment":" Convert any integer to its signed binary (base-2) representation.\n\n    toBinaryString zero == \"0\"\n\n    toBinaryString one == \"1\"\n\n    toBinaryString ten == \"1010\"\n\n    toBinaryString negativeTen == \"-1010\"\n\n    toBinaryString (fromSafeInt -1729) == \"-11011000001\"\n\n    toBinaryString (add (fromSafeInt maxSafeInt) one) == \"100000000000000000000000000000000000000000000000000000\"\n\n    toBinaryString (sub (fromSafeInt minSafeInt) one) == \"-100000000000000000000000000000000000000000000000000000\"\n\n","type":"Integer.Integer -> String.String"},{"name":"toDecimalString","comment":" Convert any integer to its signed decimal (base-10) representation.\n\n    toDecimalString zero == \"0\"\n\n    toDecimalString one == \"1\"\n\n    toDecimalString ten == \"10\"\n\n    toDecimalString negativeTen == \"-10\"\n\n    toDecimalString (fromSafeInt -1729) == \"-1729\"\n\n    toDecimalString (add (fromSafeInt maxSafeInt) one) == \"9007199254740992\"\n\n    toDecimalString (sub (fromSafeInt minSafeInt) one) == \"-9007199254740992\"\n\n","type":"Integer.Integer -> String.String"},{"name":"toHexString","comment":" Convert any integer to its signed hexadecimal (base-16) representation.\n\n    toHexString zero == \"0\"\n\n    toHexString one == \"1\"\n\n    toHexString ten == \"A\"\n\n    toHexString negativeTen == \"-A\"\n\n    toHexString (fromSafeInt -1729) == \"-6C1\"\n\n    toHexString (add (fromSafeInt maxSafeInt) one) == \"20000000000000\"\n\n    toHexString (sub (fromSafeInt minSafeInt) one) == \"-20000000000000\"\n\n","type":"Integer.Integer -> String.String"},{"name":"toInt","comment":" Convert any integer, `z`, to `sign z * (|z| mod (maxSafeInt + 1))`, where\n\n```txt\nsign z =\n    -1 if z < 0\n     0 if z = 0\n     1 if z > 0\n```\n\nFor e.g.\n\n    toInt zero == 0\n\n    toInt ten == 10\n\n    toInt negativeTen == -10\n\n    toInt (fromSafeInt maxSafeInt) == maxSafeInt\n\n    toInt (fromSafeInt minSafeInt) == minSafeInt\n\n    toInt (add (fromSafeInt maxSafeInt) one) == 0\n\n    toInt (add (fromSafeInt maxSafeInt) ten) == 9\n\n    toInt (sub (fromSafeInt minSafeInt) one) == 0\n\n    toInt (sub (fromSafeInt minSafeInt) ten) == -9\n\n","type":"Integer.Integer -> Basics.Int"},{"name":"toNatural","comment":" Compute the [absolute value](https://en.wikipedia.org/wiki/Absolute_value) of the given integer as a\n[natural number](https://package.elm-lang.org/packages/dwayne/elm-natural/1.1.1/Natural#Natural).\nIf you want an [integer](#Integer), use [`abs`](#abs).\n","type":"Integer.Integer -> Natural.Natural"},{"name":"toOctalString","comment":" Convert any integer to its signed octal (base-8) representation.\n\n    toOctalString zero == \"0\"\n\n    toOctalString one == \"1\"\n\n    toOctalString ten == \"12\"\n\n    toOctalString negativeTen == \"-12\"\n\n    toOctalString (fromSafeInt -1729) == \"-3301\"\n\n    toOctalString (add (fromSafeInt maxSafeInt) one) == \"400000000000000000\"\n\n    toOctalString (sub (fromSafeInt minSafeInt) one) == \"-400000000000000000\"\n\n","type":"Integer.Integer -> String.String"},{"name":"toString","comment":" An alias for [`toDecimalString`](#toDecimalString).\n","type":"Integer.Integer -> String.String"},{"name":"two","comment":" The integer [`2`](https://en.wikipedia.org/wiki/2).\n","type":"Integer.Integer"},{"name":"zero","comment":" The integer [`0`](https://en.wikipedia.org/wiki/0).\n\nTo be more precise, it is a representation of the integer `0`. However, I will not\nhave any cause to make that distinction. A similar remark can be made about the\nother constants.\n\n","type":"Integer.Integer"}],"binops":[]}]