News for hackers. Stuff that matters.
Re:Did any processor implement an integer square root instru... by retrac on Sunday April 07, 2024 @11:40AM (#39961490)
Yes. In theory, any pure function can be turned into a lookup table. And any lookup table that isn't just random numbers can be turned into a more compact algorithm that spends compute to save space.

Such tables may be infeasible, though. While a int8 -> int8 table only needs 256 bytes, an int32 -> int32 needs 16 gigabytes.

Re:Did any processor implement an integer square root instru... by DaiPlusPlus on Sunday April 07, 2024 @01:20PM (#39962202)
Fractal functions are pure, but don’t lend themselves well to memoization nor lookup tables.
Re:Did any processor implement an integer square root instru... by meindnoch on Monday April 08, 2024 @09:49AM (#39969701)
What does this statement even mean? Every function from a finite domain is just a lookup table, period.
Re:Did any processor implement an integer square root instru... by DaiPlusPlus on Monday April 08, 2024 @12:32PM (#39971357)
Who said anything about finite-domains?
Re:Did any processor implement an integer square root instru... by meindnoch on Tuesday April 09, 2024 @09:55AM (#39979471)
Every function has finite domain on a computer.
Re:Did any processor implement an integer square root instru... by DaiPlusPlus on Tuesday April 09, 2024 @01:54PM (#39982144)
Arbitrary-precision real-number libraries would disagree with you there.
Re:Did any processor implement an integer square root instru... by meindnoch on Wednesday April 10, 2024 @06:15AM (#39989008)
False. A computer always has a finite amount of memory.