Naive: https://godbolt.org/z/Gzf1KM9Tc
Horner's: https://godbolt.org/z/jhvGqcxj1
906 karma · joined October 11, 2022
Naive: https://godbolt.org/z/Gzf1KM9Tc
Horner's: https://godbolt.org/z/jhvGqcxj1
Impressive that an LLM managed to produce the answer from a 7 year old stack overflow answer all on its own! [1] This would have been the first search result for “fast asin” before this article was published.
I don’t like the NPMification of Cargo. Do you really need to pull in a dependency for something like this?
200% is ideal but scaling on Windows has gotten really good. I use 150% on a 4K monitor and it works well.
> [...] the worst case scenario is really mild: A new version of windows comes out, breaking ntdll compatibility. Zig project adds a fix to the std lib. Application developer recompiles their zig project from source, and ships an update to their users.
That assumes the application developer will continue to maintain it until the end of time.
Also "the fix" would mean developers wanting to support earlier Windows versions would need to use an older std library? Or is the library going to have runtime checks to see what Windows build its running on?
> [NtQuerySystemTime may be altered or unavailable in future versions of Windows. Applications should use the GetSystemTimeAsFileTime function.] [0]
So it does seem like a bad idea for a standard library.
[0]: https://learn.microsoft.com/en-us/windows/win32/api/winternl...
“This isn’t just [what the thing literally is]; it’s [hyperbole on what the thing isn’t].”
You’d need several usages of the ISA register without dependencies to run out of physical registers. You’re more likely to be bottlenecked by execution ports or the decoder way before that happens.
Ctrl-V, then move down the lines you want to edit, Shift-I to insert text on multiple lines at once.
Memory: https://uica.uops.info/tmp/f022a3c0a70e4ae5ab3588ebe65fd2a5_...
Register: https://uica.uops.info/tmp/e80e60e0c4914955b11dc6590711c1b8_...
I wonder what is the use case for testing a bit outside of the memory address given.
__asm (
"mulq %[multiplier]\n"
"divq %[divisor]\n"
: "=a"(result)
: "a"(num), [multiplier]"r"(multiplier), [divisor]"r"(divisor)
: "rdx"
);
The intermediate 128bit number is in rdx:rax.I think the AI program is plenty capable of causing bad medical advice on its own without being miscompiled.
Unlike the examples in this post, this dithering is basically invisible at high resolutions, but it’s still very much in use.