Welcome to MSDN Blogs Sign in | Join | Help

Browse by Tags

All Tags » Math   (RSS)
Last time I talked about how to calculate a sine sweep mathematically. There's a closed-form solution which is quite elegant but, alas, useless in a practical computer implementation due to the very bug numbers that are being fed to the sin(...) function. A computer implementation will care only about the discrete samples that need to be generated. The integral in the previous post turns out to be counterproductive - we're much more interested in the infinite sequence of φi, and more particularly in their residue mod 2π. Read More...
Suppose you want to generate a continuous sine-sweep from time tstart to time tend. You want the starting frequency to be ωstart, and the ending frequency to be ωend; you want the sweep to be logarithmic, so that octaves are swept out in equal times. Read More...
In a recent post I sung the praises of square waves as a way to get a heckuva lot of power (3 dB more power than a sine wave) into a sample-range-limited signal. It's time to take them down a notch now. A problem with square waves is they're impossible Read More...
Raymond Chen explains some common terms for blood relatives of varying distance across cultures in his blog post "What kind of uncle am I?" He links to a diagram on genealogy.com that I felt was lacking something... so here's my version, with consanguinary colors. Red means "marriage is almost certainly legally prohibited." Yellow means "marriage may be legally prohibited - check your region's laws." Green means "marriage is amost certainly legal." Read More...
A full-scale sine wave has an intensity of -3 dB FS. Read More...
If you want to rotate a matrix, matrix multiplication won't help. Read More...
I reveal GIMPS' unpublished "largest prime ever found". Read More...
Solution to interview question - find x, y, z such that x! + y! + z! = x * y * z Read More...
Write a program to find the unique solution to "x! + y! + z! = x * y * z" with x, y, and z integers between 0 and 9. Read More...
"Theorem": there are no triangular primes. Exercise: find a triangular prime. Read More...
Well, I mused, the "greatest possible order" state in a Rubik's Cube is achieved by bringing all the orange squares together... and all the blue squares together... and, in general, all the squares of any given color together. How homogenous... or xenophobic. Ew. Read More...
In a previous post I posed several mathematical problems... I'd like to go back and give some answers to them. To reiterate, we take a sine wave period and wrap it around a cylinder... Read More...
The integral of x^2 is (x^3)/3. ... /plus a constant./ Pi is a constant. Read More...
Do the first exercise above - print out the original image, cut it out along the lines, and make a cylinder by connecting the short ends together. Rotate the cylinder through various orientations, paying particular attention to the location of the sine wave at all times. Read More...
w(i) = a sin(2πfi / s + ϕ) + c ...you'll burn through 2^32 samples in three hours, six minutes, twenty-five seconds. This is uncomfortably close to reasonable. So I fixed it - almost. Now we use a UINT64 for the sample offset. Well, it turns out that fixing that bug uncovered another bug. Exercise... what is the bug? Read More...
More Posts Next page »
 
Page view tracker