Skip to navigation


Maths (Arithmetic): logL

[NES version, Bank 7]

Name: logL [Show more] Type: Variable Category: Maths (Arithmetic) Summary: Binary logarithm table (low byte)
Context: See this variable in context in the source code References: This variable is used as follows: * DVID4 uses logL * FMLTU uses logL * LL28 uses logL * LOIN (Part 2 of 7) uses logL * LOIN (Part 5 of 7) uses logL

Byte n contains the low byte of: 32 * log2(n) * 256
.logL SKIP 1 FOR I%, 1, 255 EQUB LO(INT($2000 * LOG(I%) / LOG(2) + 0.5)) NEXT