Gerald's blog

By Gerald, 13 years ago, In Russian
Недавно я узнал, что есть способ перемножить два 64 битных числа по модулю третьего 64 битного числа без применения длинной арифметики. Вроде как такое перемножение можно сделать используя long double в 2 строчки кода. Прилично погуглив, я не обнаружил ничего путного на эту тему, хотя польза от такой операции весьма большая (например не прибегать к длинной арифметике в тесте миллера рабина на простоту большого 64 битного числа). Может кто-то знает как это можно сделать?  Заранее благодарен за помощь.
  • Vote: I like it
  • +12
  • Vote: I do not like it

»
9 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

Ignore this please :)

  • »
    »
    9 years ago, # ^ |
    Rev. 2   Vote: I like it +36 Vote: I do not like it

    Guys I don't know what's happening. When I saw that post, I didn't see any comments. But Gassa send me a link of this post. And I saw that there are already more comments. It's sad but true that I'm kinda fooled. Sorry for the inconvenience guys.

    • »
      »
      »
      9 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      That's because of wrong locale. The original post was written in the Russian version of the site, and all people who written comments were writing in Russian locale. But when you got here by the direct link, you've seen the English version of the thread that doesn't any comments in English, so you didn't see them.

      It's pretty often situtation when Russian version of the thread contains more comments than English version, and by default all those comments are hidden in English version of the site.

  • »
    »
    9 years ago, # ^ |
      Vote: I like it -20 Vote: I do not like it

    Из-за таких вот некропостеров я минуты 3 не мог понять, как красный, к тому же достаточно известный не знает достаточно простого алгоритма :D