yep, also i think while they could have issues with dataset sizes less than 2^k, it's interesting to note their use in accelerating clustering algos like dbscan. they do make neat visualizations though https://marimo.app/?slug=x5fa0x
The BYTE_STREAM_SPLIT is a Z-order (also known as Morton encoding).
As it is better a preserving locality, it usually performs really well compared to classical "orthogonal" orders.
It also is really simple to implement as it boils down to interleaving bits or bytes.
Draw a line of length 1 which makes an angle of p with the positive x axis. The x and y coordinates of a, the point at the end of the line give cos(p) and sin(p).
Now think about what happens if you increase p by a tiny bit. a moves tangentially. (This works very similar to how the tangent to a curve gives the change in y for a change in x.) So the vector of cos'(p), sin'(p) is given by a vector starting from a, at a right angle to 0a, and pointing in the positive direction.
Since the point a moves through 2pi distance while p goes from 0 to 2pi (the definition of measuring angles in radians) the speed of the point is 1, and so the vector of derivatives has length 1.
You can check easily that this makes cos'(p) = -sin(p) and sin'(p) = cos(p).
(If I were trying to present this stuff in a maximally-elegant order without too much regard for what order human brains like to learn things in, the order of things would be: complex numbers, calculus, trigonometry. Then we define something that we might initially call e(t) to satisfy the differential equation de/dt = ie, and observe that having e and e' at right angles means that |e| remains constant, which means that |e'| also remains constant, so if we start with e(0)=1 then we have a point moving at unit speed around the unit circle, etc. Keep the linkage between the geometrical and formal points of view there at all times. But I suspect this wouldn't be great paedagogically for the majority of students.)
I do not understand this consideration:
> By considering a triangle with hypotenuse 1 and a very small “opposite” side, it’s not hard to see geometrically that sin(x)≈x and cos(h)=x when x is small
I fail to see how you can "see" finer than sin(h) -> 0 & cos(h) -> 1
That one line was the part that stood out to me the most as well, but:
If you zoom in sufficiently at x = 0, f(x) = sin(x) looks indistinguishable from f(x) = x, whereas g(x) = cos(x) looks indistinguishable from g(x) = 1.
(also, sin(x) is negative approaching 0 from the left and positive approaching 0 from the right)
> If you zoom in sufficiently at x = 0, f(x) = sin(x) looks indistinguishable from f(x) = x, whereas g(x) = cos(x) looks indistinguishable from g(x) = 1.
You can't use the plot as you only know the triangle definition yet. (And "looks indistinguidable" is rather handwavy).
> (also, sin(x) is negative approaching 0 from the left and positive approaching 0 from the right)
Your limit definition is the same as the part you quoted, so it's not clear what your question is. I also don't see what you are quoting.
Curvature is inverse of radius.
Decreasing angle is equivalent to increasing radius, and this decreasing curvature.
This, as angle decreases, the curve becomes close to a straight line, and that straight line approaches a vertical line.
I quote the second paragraph of the Derivatives section. (which was edited to a better, but not yet enough, sin(h)≈h and cos(h)≈1 when h is close to zero).
I perfectly understand that around 0, sin(x) ~ x and cos(x) = 1 + o(x) but it isn't obvious geometrically, unlike what the article implies.
From my point of view, increasing radius / decreasing curvature only gets you sin(x) -> 0 ; cos(x) -> 1, but that isn't enough to obtain the derivatives.
I found a geometric proof in [1] but that part is the longest and hardest of the page. I was wondering whether the author found a clearer way to express is.
EDIT: after looking at 3B1B's video, the "small" triangle d(sinΘ) by dΘ figure would be a better way to explain the derivative, rather than an "not hard to see geometrically" approximation that isn't enough to conclude.
Came here to say the same thing. But I suppose if you extend cosine into negative values you'll see it has a maximum at zero so its derivative must be zero. Don't know about sin'(0) offhand but you'd think it wouldn't be hard.