Post Reply 
Plus42 Equations, Preview Release
12-20-2021, 11:10 PM
Post: #161
RE: Plus42 Equations, Preview Release
(12-09-2021 12:03 PM)Gjermund Skailand Wrote:  if you are going to expand the functions for logic or bits it would be nice to have a "find first set bit function". Presently the fastest way I know of is to calculate IP(ln(X)/ln(2)+1) and possibly correct for rounding errors. Is there any faster way?

I was re-reading the thread and just realized I never replied to this. Apologies!

I'll make a note of this in my long-term to-do list. I don't think I'll put this in Plus42 1.0, but I have a bunch of functions that I may add later, and maybe also include in Free42, and these include some advanced binary stuff, like rotations and shifts, and IEEE-754-2008 floating-point conversions. (I don't know how many people want those, but I could put them to good use tracking down errors in the Intel library test suite!) And a find-first-bit would fit right in. Or log2()...
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Plus42 Equations, Preview Release - Thomas Okken - 12-20-2021 11:10 PM



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