Skip to navigation

Elite on the BBC Micro and NES

Version analysis of logL

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: logL Type: Variable Category: Maths (Arithmetic) Summary: Binary logarithm table (low byte)
Byte n contains the low byte of: 32 * log2(n) * 256
.logL SKIP 1 FOR I%, 1, 255 B% = INT(&2000 * LOG(I%) / LOG(2) + 0.5) EQUB B% MOD 256 NEXT