I timed my version on an ancient Athlon XP 3200 that I had sitting around in the lab and it did it in about 275ms. Haven't tried on my core 2 Duo, but should be faster, even though the code is not optimized to use more than one core....
A similar version that also outputs all the factors takes about 315ms on the same rig, not a big penalty to carry along all that info. 🙂 (Similar times for all Ramanujan(2) with all factors). Improvements are still possible.
OK, I cleaned up my solution a little bit, here it is (LabVIEW 8.5). I wonder in anyone has any significant improvements (e.g. factors of two or better :D).
Also note that the code is linear and thus not optimized for multiple cores. It's probably not worth doing.
(Warning for users below LabVIEW 8.5: It will be difficult to recreate the code from the image, because the representation of all the blue wires are important (U16, I32, U32, U64) , yet they are not well documented :)).
LabVIEW Puzzle #8 was sent to me by a friend. In keeping with the true nature of breakpoint doesn't require LabVIEW. But if you really really want too I'll understand
I'm going to hold off on providing the source to make it harder for people to figure out (and honestly I don't know where it originated from yet).
There is only one clue and it is the following: One Word.
If you solve it do not post the solution! Simply send a link that represents the word:) We will know you figured it out. "We" being anyone who successfully solves it that is
you gotta give us more infos now Simon. I gave it some thought during my long commutes but I'm not even sure I understand how the LabVIEW code you talked about fits with with the music yet :S
You could use the LabSYTH.vi to play around...note this uses the beep on your computer and may not be muted.
Here is your next hint: Incase you can't read music C C G G A A F F (Note with Labsynth use the C on the left)
Have a fun weekend!
This is a hint from my daughter's new favorite song. I'm hoping someone can put things together now
And if my plan works...you should be singing this song in your head the rest of the day! -SS