Goban::ECC::GF
Constants
EXP_TABLE = begin
a = uninitialized ::StaticArray(UInt8, 256)
a[0] = 1
(1..255).each do |i|
v = a[i - 1].to_i * 2
a[i] = (v >= 256 ? (v ^ 285) : v).to_u8
end
a
end
LOG_TABLE = begin
a = uninitialized ::StaticArray(UInt8, 256)
(0..255).each do |i|
a[EXP_TABLE[i]] = i.to_u8
end
a
end
Instance methods
add_or_sub(x : UInt8, y : UInt8)
Sourcediv(x : UInt8, y : UInt8)
Sourceexp(x : UInt8)
Sourceinv(x : UInt8)
Sourcelog(x : UInt8)
Sourcemul(x : UInt8, y : UInt8)
Sourcepow(x : UInt8, pow : UInt8)
Source