Skip to navigation

BBC Micro Elite

Maths (Arithmetic): antilogODD (6502SP version)

Name: antilogODD [View in context] Type: Variable Category: Maths (Arithmetic) Summary: Binary antilogarithm table
At byte n, the table contains: 2^((n / 2 + 128.25) / 16) / 256 which equals: 2^(n / 32 + 8.015625) / 256 = 2^(n / 32 + 8) * 2^(.015625) / 256 = (2^(n / 32 + 8) + 1) / 256
.antilogODD IF _MATCH_EXTRACTED_BINARIES IF _SNG45 INCBIN "extracted/sng45/workspaces/ICODE-antilogODD.bin" ELIF _SOURCE_DISC INCBIN "extracted/source-disc/workspaces/ICODE-antilogODD.bin" ENDIF ELSE FOR I%, 0, 255 B% = INT(2^((I% / 2 + 128.25) / 16) + 0.5) DIV 256 IF B% = 256 EQUB B%+1 ELSE EQUB B% ENDIF NEXT ENDIF