dkh.int128

64bit op 64bit -> 128bit, library(mul, div, divmod)

Members

Functions

div128
ulong div128(ulong[2] a, ulong b)

[a[1], a[0]] / b = return, 答えが64bitに収まらないとヤバイ

mod128
ulong mod128(ulong[2] a, ulong b)

[a[1], a[0]] % b = return, 答えが64bitに収まらないとヤバイ

mul128
ulong[2] mul128(ulong a, ulong b)

a * b = (return[1]<<64) + return[0]

Meta