Another (stupid) question: "find first set" (or "find first zero")

Marco Antoniotti marco.antoniotti at unimib.it
Mon Feb 1 08:45:26 UTC 2021


Duh!

On Mon, Feb 1, 2021 at 9:42 AM dbm at refined-audiometrics.com <
dbm at refined-audiometrics.com> wrote:

> (1- (integer-length x))
>
>
> On Feb 1, 2021, at 1:24 AM, Marco Antoniotti <marco.antoniotti at unimib.it>
> wrote:
>
> Hi
>
> I am wasti....  devoting some time to recreational hacking and I bumped
> into an interesting bit fiddling operation.
>
> I pored over the CLHS, but, while I may have missed something obvious, I
> am not sure what would be the best way to implement such a function using
> the standard operations.
>
> Any ideas?
>
> Note that it appears that most HW does have an instruction to do that
> directly.
> Find first set - Wikipedia <https://en.wikipedia.org/wiki/Find_first_set>
>
> Thanks
> Marco
>
> --
> Marco Antoniotti, Associate Professor         tel. +39 - 02 64 48 79 01
> DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it
> Viale Sarca 336
> I-20126 Milan (MI) ITALY
>
>
>

-- 
Marco Antoniotti, Associate Professor         tel. +39 - 02 64 48 79 01
DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it
Viale Sarca 336
I-20126 Milan (MI) ITALY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/pro/attachments/20210201/5ff9ec36/attachment-0001.html>


More information about the pro mailing list