| General > General Technical Chat |
| Integers, Pi, and Number Lines. |
| << < (8/14) > >> |
| Nominal Animal:
If you believe only integers exist, you're welcome to proverbially blow your mind by the fact that there exist several simple algorithms of extracting digits of Pi –– in hexadecimal, base 16. For example, David H. Bailey and Helaman Ferguson discovered in 1997 a formula they called PSLQ: $$\pi = \sum_{k=0}^{\infty} \frac{1}{16^k} \left( \frac{4}{8 k + 1} - \frac{2}{8 k + 4} - \frac{1}{8 k + 5} - \frac{1}{8 k + 6} \right)$$ where each term \$k\$ defines exactly one hexadecimal digit of \$\pi\$. In general, this subfield is described as "finding integer relations among more than two numbers". In the physical sense, more than 52 or so hex digits is unnecessary precision, because the diameter of the universe is about 5.4×1061 Planck length units, and there is nothing physically larger nor more precisely measurable. For computation, especially for intermediate results, more precision is often useful, of course. The key realization is that just because you cannot write the exact value down in any base, does not mean it isn't a specific value: it is only unwritable, but not unexpressible. It is perfectly acceptable to define say \$x = \sqrt{5}\$, because there are many formulae where you only ever need \$x^2 = 5\$. A particular example is Euclidean distances. In \$N\$ dimensions, the distance \$d\$ from origin to point \$(x_1, x_2, \dots, x_{N-1}, x_N)\$ is \$d = \sqrt{x_1^2 + x_2^2 + \dots + x_{N-1}^2 + x_{N}^2} = \sqrt{\sum_{i=1}^{N} x_i^2}\$. In many subfields of physics, especially those dealing with lattices, we can determine certain useful properties of materials by just examining the various possible distances between lattice points. Numerically, it is preferable to do this using functions that return the distance squared, which in a lattice is an integer, because that way we avoid rounding errors. (Essentially, if you examine a \$(2 L)^N\$ cuboid of points, or rather an \$1/2^N\$ positive cuboid of that with \$L^N\$ lattice points, you get the lattice point distance distribution for distances not exceeding \$L\$, and the points above that distance are discarded. You save potentially a lot of time (when \$N\$ is large) by only doing the square root operation for display purposes, i.e. when showing the distance histogram.) Same applies to many cases in 3D computer graphics, especially raycasting and raytracing. For example, if you're interested in ray-cylinder (right circular cylinder) intersections, check out the formulae at my Wikipedia user page (from 2010); in many cases the square root operation can be omitted. Note that these formulae are so simple only because the origin of the ray (ie. the focal point of the camera or the eye of the viewer) is at origin! Because square root is a monotonically increasing function for nonnegative distances, one can use a z-buffer containing squared distances instead of distances themselves, without any effect on the resulting visuals. |
| SiliconWizard:
Well, there is something philosophical (probably a bit too much) about the OP's questioning, and it's not completely irrelevant. It's been a very common consideration for centuries. It's not really anymore, but hey. Why not. The problem with the OP's approach is that it looks more like certainties than questioning. But on a deeper level, we can still fundamentally question whether the "universe" is really "continuous" or whether it's kind of discrete. It's all a complex matter. No pun intended. We can think of the Planck constant, and stuff. And if it's really discrete, all that would be needed would be integers. Somehow. But as I hinted earlier, as long as you consider "infinity" to be part of your "number line", then it opens a whole world of peculiarities that bridge the gap between rational and irrational numbers. So, does the OP consider infinity? But here again, since we still don't know for sure whether the universe is infinite or not, if we can't get infinitely small or infinitely big, then what is infinity really? While this can be all fun as a late-night, drunk discussion, mastering basic mathematics would still be a useful skill here. Beyond the lunacy, there is something in this topic that kind of reminds me of the topic about electrons. |
| eugene:
|
| magic:
Two pages and still no one has pointed out OP's fundamental error: Almost all real numbers cannot be described as a solution to any equation, and yet mathematicians will insist that they are there >:D |
| nigelwright7557:
I have used Fourier transforms in a scope I designed. It simply outputs buckets of numbers representing frequency and amplitude. I didn't need to understand how it worked just what needed to be input and what the outputs meant. Interestingly when I looked online for FFT code the first three examples didn't work right. It was only fourth that gave good results. |
| Navigation |
| Message Index |
| Next page |
| Previous page |