A simple number cruncher?
July 10, 2008 10:25 PM
Subscribe
Is there an online or otherwise calculator utility that can produce a multiplication column to the nearest integer if I need to (and I do need to) multiply a given integer (specifically, 8.57143) by all the integers from 1 to about 600, displayed in a list so that I don't have to multiply it each time? I may need to do other 600-deep columns with other decimally numbers, a few at most. I need to see the result, better yet print it.
For even reasonably numerate folks, this is probably cake. But my brain has long since dealt with anything besides simple ratios, and I can't remember how this sort of thing is done.
If anyone's curious, it's so that I can split up a 24 fps film into a 168 bpm click track. Each beat is 1/2.8 second. 24 / 2.8 = 8.57143... And I think I need to use as many places on that as I can so as not to throw off the tempo later in the film. It's only a 3 1/2 minute-r, but that's almost 600 beats!
posted by gorgor_balabala to science & nature (18 comments total)
2 users marked this as a favorite
bashand have GNUcalcinstalled:frameIndex=1; while [ "$frameIndex" -le 600 ]; do calc $frameIndex*8.57143; frameIndex =$(($frameIndex +1)); doneIf you want to do this all on one line and send it to a file:
frameIndex=1; while [ "$frameIndex" -le 600 ]; do calc $frameIndex*8.57143; frameIndex =$(($frameIndex +1)); done > output.txtIf you want to do this all on one line and print it:
frameIndex=1; while [ "$frameIndex" -le 600 ]; do calc $frameIndex*8.57143; frameIndex =$(($frameIndex +1)); done | lprposted by Blazecock Pileon at 10:35 PM on July 10, 2008