Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

musical /prog/ challange

Name: Anonymous 2010-09-22 14:03

Create an ordered list of fractions which product of the numerator and denominator equals a specific integer n.

ex: n=60
1/60, 2/30, 3/20, 4/15, 5/12, etc....

then do it with a list of integers.

If you are fancy you can also create a scale from the fractions you've got which best matches western tempered tuning (or any you prefer).

Name: Anonymous 2010-09-23 23:11

>>42

fuck, removed the 2/ in ?SIMPLYFY and replaced the 3 in FINDFRACTIONS with 1
nfi why I did that.
[code]
 time gforth-fast musical.fs -e " 27001 fractions bye"
1/27001 13/2077 31/871 67/403 403/67 871/31 2077/13 27001/1
real    0m20.530s
user    0m17.663s
sys     0m0.046s
[code]

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List