Logo Logo en
  • iRidi Pro
    Основные компоненты
    • Приложение i3 Pro
    • iRidi Pro Server
    • iRidi Studio
    • iRidium studio v. 1.3.8 (устаревшая версия)
    Java Script в iRidi
    • Руководство
    • Справочник
    • Примеры
    • JS драйвера
    другие
    • Личный Кабинет
    • iRidium Cloud
    • iRidium Transfer
    • Push-уведомления
    • Лучшая практика
    Лицензирование
    • Лицензирование и передача проекта
    • Оффлайн-лицензирование
    • Активация iRidi Pro Server
  • Продукты
    i3 lite
    • Приложение i3 lite
    • Регистрация и лицензирование
    • Сервер
    • Модули
    KNX Home Server
    • Приложение i3 KNX
    • KNX Home Server
    BUS77 HOME SERVER
    • Приложения Bus77 Home и Bus77 Lite
    • Bus77 Home Server
    Решения
    • BYOD - решение для гостиниц
    • Портал жителя - решение для МКД
    iRidi SCADA
    • iRidi SCADA
  • Bus77
    НАСТРОЙКА BUS77
    • Основы Bus77
    • Приложения Bus77 Home и Bus77 Lite
    • Работа с драйвером Bus77 в iRidi Studio
    • Настройка шины Bus77 в iRidi Studio
    ПРОТОКОЛ BUS77
    • Характеристики CAN (Bus77)
    • Описание протокола
    • Исходники на GitHub
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
  • Поддерживаемое оборудование
    Драйверы
    • Список драйверов
    • ProAV драйвера
    • AV & Custom Systems
    • JS драйвера
    • Сторонние драйвера и фриланс
    Протоколы и интерфейсы
    • Голосовое управление
    • 1-Wire
    • BACnet IP
    • Bus77
    • KNX
    • KNX IP BAOS
    • Weinzierl kBerry
    • Microsoft Exchange
    • Modbus
    • MQTT
    • NFC
    • ODBC
    • Onvif
    • SIP
    • SNMP
    • Wake On Lan
    • Z-Wave
    • ZigBee
    Производители
    • AMX
    • AVCiT
    • Beckhoff ADS
    • Biamp Tesira
    • Bluesound
    • Casambi
    • BSS Harman
    • Clipsal
    • ControlArt 7Port
    • Crestron
    • DigiBird
    • Domintell
    • Duotecno
    • EIDE
    • EPSNET
    • Global Cache
    • HDL Buspro
    • Helvar
    • IEAST
    • INELS BUS
    • INELS Wireless
    • Intesis
    • Kleger
    • Kramer VIA
    • Kramer 3000
    • Larnitech
    • Legrand Netatmo
    • LG TV
    • Lutron
    • Lutron Homeworks QS
    • MyHome
    • Nest
    • Novastar
    • Panasоnic PTZ
    • Philips Dynalite
    • PJLink
    • Satel
    • SamsungTV
    • Sonos
    • Somfy
    • SpinetiX
    • Televic Conference
    • TIS
    • Tion
    • URRI
    • Velbus
    • Velocio
    • Vinteo
    • WyreStorm
    • WiiM
    • Xicato
    • Yamaha
    • ZONT
    • Z-Wave.me
    Протестированное оборудование
    • Панель HDL S57
    • Панель HDL S10
    • SIP-домофон
    • Akuvox
    • Arlight
    • Divus
    • QBic TD-1050 PRO
    • QBic TD-1060 Slim
    • QBic TD-1070
    • Sigur
    • Uni-Ubi
    • Velocio
  • Оборудование iRidi

    Серверы
    • HS Сервер
    • ProAV Control Processor Basic
    • ProAV Control Processor Advanced
    • Спецификация контроллеров UMC
    • Настройка контроллера UMC C2
    • Настройка контроллера UMC C3
    • Настройка контроллера HDL IntelliCenter 2 (UMC C4)
    Модули расширения
    • I-PX-RS1
    • I-PX-RS4
    • I-PX-IR3
    KNX
    • KNX Home Server
    • KNX IP Interface
    Панели управления
    • iRidium Panel 7
    • Touch Panel P3
    • Touch Panel P6
    • Touch Panel P8
    • Touch Panel P10
    • Tabletop Touch Panel 10
    • AV Remote Control
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
    • Differences
iRidium mobile web-site
Содержание
    Инструменты‌
    • Сведения о странице
    • Постоянная ссылка
    • Версия для печати
    • Спецстраницы
    • Связанные правки
    • Ссылки сюда
    Login / Create Account
    Материал из for iRidium developers
    Перейти к: навигация, поиск
    Эта страница является переводом страницы CreateBigIntContext. Перевод выполнен на 100%.

    Содержание

    • 1 IR.CreateBigIntContext()
      • 1.1 .Add
      • 1.2 .Exp
      • 1.3 .ModExp
      • 1.4 .Sub
      • 1.5 .Mul
      • 1.6 .Sqr
      • 1.7 .Gcd
      • 1.8 .Div
      • 1.9 .HexToDec
      • 1.10 .DecToHex

    IR.CreateBigIntContext()

    Method to create a large number.

    Syntax

    IR.CreateBigIntContext(bool)

    input value description
    bool false type: Boolean
    format of a number:
    true - number in hex format;
    false - number in decimal format.
    output
    result 11111111111111... type: number
    large number.


    Sample

    var DBigNum = IR.CreateBigIntContext(false)
    var DValue1 = "11111111111111111111111111111111111111111111111111111111"
    var DValue2 = "11111111111111111111111111111111111111111111111111111111"
    IR.Log(DBigNum.Add(DValue1, DValue2))




    Futher on you'll find description of methods that can be used with large numbers.

    .Add

    Addition of large numbers (r = a + b).

    Syntax

    HBigNum.Add(a, b)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r 1E type: number
    result of addition of large numbers.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.Add("F", "F"))





    .Exp

    Exponent (r = a ^ p).

    Syntax

    HBigNum.Exp(a, b)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r 03E8 type: number
    result of exponentation.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.Exp("A", "3"))





    .ModExp

    Getting the remainder of an exponential number divided by m (r = a ^ p % m).

    Syntax

    HBigNum.ModExp(a, p, m)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r 08 type: number
    result of exponential operation and getting the remainder from dividing large numbers.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.ModExp("2", "3", "A"))





    .Sub

    Substraction of large numbers (r = a - b).

    Syntax

    HBigNum.Sub(a, b)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r F5 type: number
    result of substracting large numbers.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.Sub("FF",  "A"))





    .Mul

    Multiplication oof large numbers (r = a * b).

    Syntax

    HBigNum.Mul(a, b)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r D2 type: number
    result of substraction of large numbers.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.Mul("F",  "E"))





    .Sqr

    Squaring large numbers (r = a ^ 2).

    Syntax

    HBigNum.Sqr(a)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r 64 type: number
    result of squaring large numbers.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.Sqr("A"))





    .Gcd

    Calculation of the greater common divisor (r = (a, b)).

    Syntax

    HBigNum.Gcd(a, b)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r 05 type: number
    the greater common divisor of a and b.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.Gcd("FF", "AF"))





    .Div

    Wholenumber division of large numbers (r = a / b).

    Syntax

    HBigNum.Div(a, b)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    output
    r 0199 type: number
    result of wholenumber division.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.Gcd("FFF", "A"))





    .HexToDec

    Conversion of a hex number into a decimal one.

    Syntax

    HBigNum.HexToDec(a)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    a "C" type: number
    number in the hex system.
    output
    result 12 type: number
    result of number conversion into a decimal one.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.HexToDec("С"))





    .DecToHex

    Conversion of a large decimal number into a hex one.

    Syntax

    HBigNum.DecToHex(a)

    input value description
    HBigNum IR.CreateBigIntContext(true) type: object
    pointer to a large number.
    a "10" type: number
    number in the decimal system.
    output
    result 0A type: number
    result of number conversion into a hex one.


    Sample

    var HBigNum = IR.CreateBigIntContext(true)
    IR.Log(HBigNum.DecToHex("10")) // result: 0A




    Источник — «https://dev.iridi.com/index.php?title=CreateBigIntContext/en&oldid=101316»
    About us
    Company
    Team
    History
    Philosophy
    Rewards
    Partnership
    Our partner
    Partnership Programs
    Apply for partnership
    products
    iRidium pro
    iRidium lite
    iRidium gate
    iRidium server
    Loads
    iRidium pro
    iRidium lite
    Other version
    Marketing materials
    Support
    On-line courses/Video
    Recommended equipment
    Other version
    iRidium pro
    Documentation
    FAQ
    Forum
    iRidium lite
    Documentation
    Forum
    Projects
    Standart projects
    Smart buildings
    Smart house
    Special solution
    Find a dealer
    News
    Youtube
    Twitter
    VK
    Logo
    contact@iridi.com
    +7 (499) 322-73-29

    Privacy policy