# Generate a sequence of exposure time options mathematically [duplicate]

Is there a way to generate a sequence of usual/standard exposure time options mathematically? Something like 1/5000, 1/2500, 1/1500, 1/1000...1/500, 1/250/ 1/125...1/60...1/30...1/8, 1/4, 1/2, 1, 2, 3, 4...8, 16, 32 (all in seconds).

Note that the sequence above is just an example to describe what I mean. The gap between different options does not have to be the same as above, nor the actual values.

Also, the sequence might be a combination of different sequences generated differently.

• I'm not quite sure what you're asking. Mathematically, the algorithm is "make each exposure time twice as long as the previous, rounding to some nice (customary) fraction". Dec 20 '19 at 13:23
• Do you only want an Excel formula? Or, a method to automatically control your camera with these sequences? Dec 20 '19 at 13:33
• @Mattman944 I want the formula itself, which I will then use in my Android camera application Dec 20 '19 at 14:03

The values you quote are Nominal values, approximate values not necessarily actually existing, historically stated by humans to be sort of nice rounded numbers. As such, the nominal values are somewhat arbitrary, but convention over 100 years has standardized them to be your list. But the cameras actually use more precise goal values, powers of 2.

Shutter speeds necessarily have to actually be powers of 2, each full stop being 2x intervals. So the precise values the camera actually uses are 1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512, 1/1024, etc. Humans just sort of instead call them rounded approximate names. But math and calculation must use the precise values.

Your camera might have a 15 or 30 second shutter speed (nominal), but if you time it, it will be 16 or 32 seconds (precise). If it were only 15 or 30 seconds, it would NOT be a precise 2x stop, and the plan would go astray.

These actual precise values are generated by 2 to power of stop number (0, 1, 2, 3, 4, etc), with all fractional values being a negative exponent. Fstops are a positive exponent of square root of 2.

Third stops are the sequence of stop numbers 0, 0.3333, 0.6667, 1, 1.3333, 1.6667, 2, etc.

``````for (i = 5; i > -10; i -= 1/3) {   // thirds for 32 second to 1/1024 second
value = Math.pow(2, i);
}
``````

These are the precise goals actually used, not the approximate nominal numbers as we imagine them.