Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lntue
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
3 ms
·
1.
▲
Half precision support in LLVM Libc
(blog.llvm.org)
1 points
by
lntue
2y ago
|
0 comments
2.
▲
LLVM Libc now has all C23 basic math functions for all 5 floating point types
(libc.llvm.org)
12 points
by
lntue
2y ago
|
0 comments
3.
▲
by
lntue
3y ago
So in the implementation of cos_table_*_LERP , you did technically 2 step range reduction: 1. Reduce x = x mod 2*pi 2. Reduce index = floor(x / 10^-n) , and i - index = 10^n * (x mod 10^-n) With limited input range and required p
4.
▲
by
lntue
3y ago
So in the implementation of `cos_table_ _LERP`, you did technically 2 step range reduction: 1. Reduce x = x mod 2 pi 2. Reduce index = 10^n * (x / 10^-n), and i - index = 10^n * (x mod 10^-n) With limited input range and required preci
5.
▲
by
lntue
3y ago
Your intuition is actually proved mathematically for two-player games of perfect information (even for infinite games), in which chess is included, by Wolfgang Schmidt (Theorem 7 in https://www.jstor.org/stable/1994619
6.
▲
by
lntue
4y ago
There are recent efforts to provide a correctly rounded and performant C23 libm, such as https://core-math.gitlabpages.inria.fr/ Maybe correct rounding (and hence consistency) will be made into the standard requirements (at
7.
▲
by
lntue
4y ago
The latest revision IEEE 754-2019 do require correctly rounded for transcendental functions: https://en.wikipedia.org/wiki/IEEE_754#Recommended_operation...
8.
▲
by
lntue
4y ago
I don't know much about numpy.signal package, but there are other python packages that have good implementation for generating polynomial approximation. Among them are pythonsollya (a Python wrapper for Sollya), and SageMath. Other th
9.
▲
by
lntue
4y ago
I think the function inputs are in double-double format, so the assumption is that the magnitude of y is significantly smaller than the magnitude of x, ideally |y| < 2^(-52) |x|. So that 1 is a very good approximation for cos(y), since
10.
▲
by
lntue
4y ago
Some of the more recent implementations of cosine for single precision that are correctly rounded to all rounding modes according to IEEE 754 standard: - The CORE-MATH project: https://gitlab.inria.fr/core-math/core-mat