Post Reply 
Plus42 Equations, Preview Release
12-21-2021, 10:26 PM
Post: #166
RE: Plus42 Equations, Preview Release
The integer base-2 logarithm, aka the number of bits required to represent n, can be found by a simple iteration. There is a nice version in One-minute Marvels. This would be fast enough in FOCAL, and virtually instantaneous in C.

Code:

<< 0 1 ROT FOR c 1 + c STEP >>
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42 Equations, Preview Release - John Keith - 12-21-2021 10:26 PM



User(s) browsing this thread: 4 Guest(s)