This page is Not likely of interest to those just wanting to take a picture. But if interested in computing with the camera exposure settings, here’s a few details which may be of interest. I try to keep the math isolated here, but the math relates to several calculators on the local site pages. Related pages are: EV and EV Chart on page evchart.html, and also the charts of camera nominal and precise setting values for page fstop2.html. Several of the calculators here use these same basics.
It's a big page with several subjects that you might at least skim if the math is your interest. Here's some of the links to areas below:
First Quick Summary of the Exposure Computing
Photo Formulas, including Shutter Speed and F/stop values
ISO Conversion, including Light Value
EV and Logarithms, for the math
Exposure Calculations, Log2 calculator and programming languages
Calculating Precise Shutter Speed and f/stops
An Alternative method of determining stops
If these first basics are not clearly obvious, a longer version follows below.
Value of f/Stop NumberS are necessarily squared first in exposure calculations (because f/Stop NumberS are powers of √2 but exposure stops are powers of 2).
And EV ratios of f/Stop Numbers are reversed in the division for proper sign, and squared (because f/Stop Numbers increase exposure running in the opposite direction toward lower numbers). If you get the wrong sign, you need to reverse the division.
Guide Number calculation is an exception, when f/stop is not squared, because Inverse Square Law of distance is also a √2 factor. Which is what makes Guide Numbers so handy, automatically compensating for the Inverse Square Law. Optional instead of log2 being log(X)/log(2), Javascript has a Math.log2() function.
To compare f/11 to f/2.8 (which we know f/11 is -4 EV from f/2.8)
(f/stop ratios are reversed division due to f/Stop Numbers running backwards)
n = 2.828/11.314 = 0.25 (with precise goal values of f/stops)
EV = log10(n²) / log10(2) = -4 EV difference (log of fractions are negative)
Or n = 11.314/2.828 = 4 f/2.8 compared to f/11
EV = log10(n²) / log10(2) = +4 EV difference
But shutter speed and ISO are powers of 2, and run forward, so :
To compare 1/30 to 1/125 (which we know 1/30 is +4 EV from 1/125)
n = (1/32) / (1/128) = 128 / 32 = 4 (with precise goal values of shutter speeds)
EV = log10(n) / Log10(2) = 4 EV difference.
Shutter speed and ISO numbers and ratios are Not reversed or squared, only f/stops
The EV formula: See Wikipedia EV
N is f/Stop Number, t is duration Time of shutter speed — the camera settings.
EV is this value as a power of 2, and inversely, EV is the Log₂ of the value.
The reflected light meter Exposure formula:
See Wikipedia light meter calibration
where L is the scene luminance, S is the ISO sensitivity, and K is a constant typically 12.5.
The only purpose here is to just show there is a formula where ISO adjusts the scene luminance to match a proper exposure with the camera settings expressed as EV. We don't have to know it, but it is how light meters work. Meter results show one of the setting combinations, or some meters can show the EV number too.
The formula in the second box at right is how light meter design computes exposure settings. N² / t reflects the camera settings, which appropriate exposure matches to the LS / K values. The meter knows ISO and meters the light and computes EV for the settings to match it. ISO matches the reflected scene luminance to the camera exposure settings of shutter speed and aperture.
For incident-light meters,
N² / t = ES / C
where
E is the illuminance (total luminous flux incident on a surface, per unit area)
C is the incident-light meter calibration constant (typically 340 with dome)
The Calibration Constant specification is shown in all Sekonic meter manuals as K = 12.5 for reflected meters, or as C = 340 for incident meters with domes. Nikon and Canon camera reflected meters are also said to use K = 12.5.
The calibration constants are a bit arbitrary, but the ISO specifications specifically say the calibration constant should be determined by analysis by large numbers of observers of a large number of photos of known exposure in various conditions. Meaning a visual consensus, since exact exposure is pretty hard to judge critically.
Other than knowing the idea, I imagine most of us have little need for the light meter formula, and the main math thing computing EV needs to know is log₂(value) is EV of the value (both are the exponent of 2):
N is f/Stop Number and t is shutter speed duration Time. Note f/Stop NumberS are always squared in exposure calculations, as above, to convert their √2 names into 2x exposure steps.
Log2(value) computes the exponent of 2 that is equivalent to the value. The method to compute log₂ is defined below. Exponents and Logarithms are simply "reverse" operations, in the same way multiply and divide or add and subtract are reverse operations ("undoing" each other, so to speak).
Example: If f/16 and 1/4 second, then this is:
(N² / t) = (16 × 16 ÷ 1/4) = (16 × 16 × 4) = 1024.
Log₂(1024) is EV 10. Meaning, 210 = 1024.
EV is the exponent of 2 that computes the value, again meaning 210 = 1024 value. I don’t know the units of this exposure 1024, if it has any, but it represents the settings combination of (N² / t) and corresponds to proper exposure of the ISO and the light level, in terms of camera settings.
Important: Note that f/stop values must first be squared to be used exposure calculations, see squaring just below.
But several other combinations of (N² / t) numbers could also compute 1024 (Equivalent Exposures). The purpose is that EV is an exposure scale in exact steps of 2x photo stops, which are seen in a EV Chart , where a row lists the Equivalent Exposures for that exposure (of ISO and light level). Meaning, for any ISO used, if you meter the light as EV 10 at that ISO, then the correct exposures are in the EV chart row for EV 10.
The basis of EV = log₂(N² / t) is that 2EV = N²/t. EV is the exponent to compute the steps of powers of 2, and Log₂(value) is value expressed as a power of 2. EV is that exponent of 2. The 2 means that one EV is 2x more light which requires 1/2 the exposure. Clearly greater f/Stop Number, or decreased time is less exposure and greater EV number, and 21 measures steps 2x or 1/2x. Full stops of shutter speed or aperture affect exposure in powers of two. The precise 2x steps are the entire purpose of EV.
The starting point of the EV numbering is that f/1 at 1 second is EV 0. This is only because 1² / 1 = 1, so that log₂(1) is 0 EV, and also 20 = 1 EV. It is math, and not some human notion of convenience (as are the Nominal value markings). However, the camera goal is to instead use the precise goal values so that every EV step is exactly 2x exposure.
Necessary details to know first: Both shutter speed and f/stop are marked with nominal approximate values established by about 100 years of convention (Nominal just being rounded approximations). Back then, the binary numbering sequence of 1, 2, 4, 8, 16, 32, 64, etc. was not as mainstream as today. Modern cameras are computers that instead actually strive to use the specific and precise binary numbering goals (exact powers of 2) to ensure precise 2x exposure steps called EV. For example, the value f/5.6 is just a nominal approximate number used for simpler camera marking. Its precise goal value in math is f/5.65685 (because it is the 5th power of √2). And 1/250 second is actually 1/256 second. No claim is made here about actual camera mechanical accuracy (which is quite good today), but these are instead the exact PRECISE GOALS of design, the sequential binary powers of two. They are the intended numbers computing should use for precision. And accuracy is expected to be quite good today, compared to the early past.
If any doubts, time your camera’s 30 second shutter speed, and you will see it takes exactly 32 seconds (or 15 seconds takes 16). Those are the exact numbers of the powers of 2.
A very important quirk is that most further calculation of exposure (like EV) must first square f/Stop Numbers (or the ratio of f/Stop Numbers are reversed and squared) to represent exposure (except NOT for Guide Number, which already takes this into account). Because the equations want values of exposure which is powers of 2, but f/Stop Numbering steps are powers of √2. But squaring the f/Stop Number becomes the necessary steps of powers of 2. Shutter speeds and ISO are already powers of 2 and are Not squared.
The precise goal value for shutter speed is 2Stop Number seconds (which steps are the powers of 2).
Example: 2-7 = 1/128 second
Shutter Speed (duration, seconds) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Nominals | 30 | 15 | 8 | 4 | 2 | 1 | 1/2 | 1/4 | 1/8 | 1/15 | 1/30 | 1/60 | 1/125 | 1/250 | 1/500 | 1/1000 |
Precise Goal | 32 | 16 | 8 | 4 | 2 | 1 | 1/2 | 1/4 | 1/8 | 1/16 | 1/32 | 1/64 | 1/128 | 1/256 | 1/512 | 1/1024 |
Stop Number | 5 | 4 | 3 | 2 | 1 | 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -10 |
f/stop (aperture) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Nominals | f/0.5 | f/0.7 | f/1 | f/1.4 | f/2 | f/2.8 | f/4 | f/5.6 | f/8 | f/11 | f/16 | f/22 |
Precise Goal | 0.5 | 0.707 | 1 | 1.4142 | 2 | 2.8284 | 4 | 5.6568 | 8 | 11.3137 | 16 | 22.627 |
Stop Number | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
Why √2 for f/stops?
Precise Shutter speed goal values are computed as 2Stop Number, computing seconds.
Precise f/stop goal values are computed as √2Stop Number, computing f/Stop Numbers
The reason for √2 is that the aperture is a circle and the Area of a circle is Pi × r²
Doubled aperture area (for 2x exposure) is 2 × Pi × r² = Pi × (√2 × r)²
Increasing the aperture radius by √2 doubles its area which doubles its exposure which is 1 EV. The f/Stop Numbers themselves (of full stops) also increase in √2 steps, so that each area step is a 2x exposure of 1 EV.
So doubled aperture areas increment exposure in steps of 1 EV (2x), but the f/Stop Number does those exposure 2x increments in aperture steps of √2. Stop Number is the exponent of √2, and f/Stop Number increments as √2 × previous Stop Number.
The beginning point is √20 = f/1. √2 and √21 are 1.4142, so each full f/Stop Number is 1.4142 x the previous f/Stop Number, each of which is a 2x stop of 1 EV exposure change.
The approximated Nominal values are close enough for human thinking, but are not precise enough for computing. Nominal values are just various arbitrary approximations established by years of convention, and so their values cannot be computed. Therefore the precise values cannot be computed from the Nominals. Nominals are the name we call them, but the Precise values are the actual exact precise design goal, computed to be exact powers of 2 from the Stop Number sequential order, and are the goal targets that the cameras strive to achieve. The f/stops are mechanical mechanisms, but today, camera shutter speeds are controlled by a digital computer chip and a quartz crystal chip, like a digital watch. Which also keeps time and date for your digital camera.
The full f/stops of f/1, 2, 4, 8, 16, etc are actually the precise goals (actual powers of 2), and the shutter speed full stops from 1/8 second to 8 seconds are also the precise goal values. The rest of the nominals are approximations, more or less rounded some way for humans, but the camera still does it right regardless of the Nominal value that the dial setting calls it. Whenever I say "precise value" here, I of course mean the precise design goal, which the camera mechanism tries to do.
Each of the full f/Stop Numbers (1, 1.414, 2, 2.828, 4, etc) is a √2 multiple, which when squared (N²) is a sequential power of two, which is why the EV formula uses N². Shutter speeds are similar Stop Number calculations, but already using powers of 2 instead of √2. And negative Stop Number exponents compute fractional values (1/2 second or f/0.5 for example).
See charts of these setting values at precise goal values.
For any fractional stop (third, half, or tenth stops), just add the fraction to the base Stop Number. One example third stop is nominal f/5.6 + 2/3 EV, which for Stop Number 5 is (√2)(5 + 2/3) = 1.414215.66667 = f/7.1272. A couple of extra significant digits are good for precision for exponents (Wikipedia Significant digits). So for exponents, let it compute the 2/3 or use 0.66667 instead of 0.67. Especially for exponent math — note that 1.45 = 5.38, but 1.41425 = 5.656, so for base and exponent, I suggest using another significant digit or two more than you want to see as desired precision (Integers like 2 or 1/2 are OK as is, already precise.)
The log₂ in the EV formula says that the EV increments in powers of 2 which is steps of 2x exposure. It can be about relative changes in exposure, or any absolute light level relates to a metered light level and ISO (in days of film, that ISO was a constant until we loaded different film). EV is simply a method of counting stops of change of exposure. But once associated with a proper metered exposure with ISO, EV can also become a meaningful absolute number of exposure.
The EV Chart has already have done the math, and the camera automation does it for us. However, some want to know details.
EV = log₂ (fstop² / shutter time)
Points about photographic EV ratios:
To compare f/11 to f/2.8 (which we know f/11 is -4 EV from f/2.8)
(f/stop ratios are reversed division due to f/Stop Numbers running backwards)
n = 2.828/11.314 = 0.25 (with precise values of f/stops)
EV = log10(n²) / log10(2) = -4 EV difference (log of fractions are negative)
Or n = 11.314/2.828 = 4 f/2.8 compared to f/11
EV = log10(n²) / log10(2) = +4 EV difference
But shutter speed and ISO are powers of 2, and run forward, so :
To compare 1/30 to 1/125 (which we know 1/30 is +4 EV from 1/125)
n = (1/32) / (1/128) = 128 / 32 = 4 (with precise values of shutter speeds)
EV = log10(n) / Log10(2) = 4 EV difference.
Shutter speed and ISO numbers and ratios are Not reversed or squared, only f/stops.
Nominal f/5.6 is actually f/5.657 and nominal f/11 is actually f/11.314. Repeating with the difference of these approximate ratios is:
Nominals: n = 11 / 5.6 = 1.964 (not 2.0)
Squared is 3.858 (not 4.0)
EV = log10(n²) / log10(2) = 1.94 EV from nominals.
But these nominal values don’t actually exist — the camera uses the precise numbers.
Precise: n = 11.314 / 5.657 = 2 (precisely 2x for 2 stops, and 2² is 4)
EV = log10(n²) / log10(2) = 2 EV precise value — This is log₂ (n²)
EV is the exposure effect of the light that the camera settings see. Then ISO is a sensitivity which matches those camera settings to the scene light level, which makes ISO also be pretty important. The EV formula does not use ISO directly, however the camera settings that we choose and put into the formula definitely do depend on ISO. EV is the light level matched by the ISO in the camera settings we choose.
Mathematically, the EV values are exact only if computed with the actual precise theoretical settings that the camera uses, as opposed to the camera’s nominal marked values. The EV calculator converts nominals to the precise values. For example of the nominal marked numbers vs the precise theoretical numbers, f/11 at 1/60 computes EV 12.826. However using the actual real values of f/11.314 at 1/64 computes exactly EV 13.00 (the correct value). Techie details maybe, but that's how it works.
EV is the power of 2 that equals N²/t. N is f/Stop Number, t is time duration. Then ISO shifts that value appropriately.
Relative EV: A dim exposure of half the sufficient amount needs +1 EV more of settings or ISO to correct it.
Absolute EV: Twice the light intensity or twice the ISO meters +1 EV higher, and requires half the exposure.
EV might seem reversed relative to exposure settings, because metered higher EV is brighter light or greater ISO, which requires settings for less exposure.
EVS = EV100 + log₂ (S / 100) where S (speed) is the new ISO value (converted FROM EV100, this from Wikipedia).
A light meter will do it this way to convert the reading to the ISO value you use. ISO 100 is not required by EV, the only thing special about ISO 100 is that it is a familiar conventional value. It could be any numbers, for example conversion TO EVS at ISO S FROM EV800 at ISO 800:
EV800 converted to a New ISO S = EV800 + log₂ (S / 800) = EVS
Tricky part: Converting from higher ISO to lower, or from lower ISO to higher, cannot both add the difference, one must subtract. But if the ratio of the Numerator/Denominator fraction is less than 1, the log becomes negative, so the formula's final ± sign is determined by the log of ISO2/ISO1. One of ISO2/ISO1 or ISO1/ISO2 will be a fraction less than 1 (Or else if equal, log(1) = 0). So this is saying that the NEW ISO must be the numerator (on top).
If S is to be ISO 1600, then 1600/800 is 2, and log₂(2) is +1, so it adds 1 EV.
If S is to be ISO 400, then 400/800 is 0.5, and log₂(0.5) is -1, so it adds -1 EV.
There is a logarithm section just below.
EV100 is the Conventional Definition of Light Value. Light Value is absolute EV converted to ISO 100, used as a standard comparison of exposures of actual scene light values. The convention is that EV at ISO 100 can be numerically compared for exposure difference or scene brightness. ISO 100 is never a special magic number, it is just one of many values. Any number could work as a standard, but ISO 100 is just a popular familiar number, convenient to use.
The Wikipedia link above doesn’t concede the convention of the term Light Value being ISO 100. However, I believe it obviously is the common convention. For example, ISO 100 is what they use in their page’s Lighting Condition chart, and ISO 100 is also used in ExifTool Light Value. Light Value of ISO 100 may not be a rule or law, but it is the common convention. However, Wikipedia does conclude by showing this final version of EV100 from EVS, which common convention that I name to be used for Light Value:
EV100 = EVS - log₂(S/100)
It is just a regular ISO conversion, in this case TO ISO 100. If using Minus, the NEW ISO has to now be the denominator (on bottom), for subtracting. Or alternatively, instead reverse the numerator/denominator and the fraction will reverse the sign, but DO NOT do both). The EV calculator and the one on the Exposure Comparison page compute Light Value by converting **TO** 100, which does use minus, like this:
Light Value (as converted to ISO 100) = EV100 = EVISO - log₂ (ISO / 100)
The term Light Value arbitrarily uses EV at ISO 100 to specify the scene light level, as a comparison standard of scene light value, but ISO 100 itself might not always allow usable (selectable or desirable) camera settings for that exposure. But it is still an Equivalent Exposure that can compare exposure EV levels.
The purpose of Light Value is that comparing two exposures as both using the same ISO (and ISO 100 is very familiar and conventional) allows a standard comparison of the two light values. Any value of EV requires asking “at what ISO?”, and ISO 100 is very familiar. This standard convention of converting to ISO 100 is called Light Value (LV), using this additional factor to change to EV for ISO 100.
So Light Value as commonly seen is the convention that means conversion to EV at ISO 100. ISO 100 is not a magic number, and is not necessarily the ISO or settings that the camera actually used. The number 100 is just another number, and is an arbitrary choice, and other than convention, 100 is NOT special here. It might sometimes seem special only because the formula arbitrarily chose to use 100. We do commonly use ISO 100, but as Light Value, it is just an arbitrary ISO reference for comparison, and is not trying to imply the settings at ISO 100 are somehow more meaningful than the ISO the camera actually used to get the picture. We can only directly compare absolute EV values if at the same ISO. Which might as well be ISO 100 because we are familiar with it.
Note that Light Value might make it seem like the EV chart must represent ISO 100 because they seem to match, but only because we arbitrarily chose ISO 100 as a reference (and the EV chart matches any ISO actually used). But to make meaning of Light Value, the convention is that “Light Value” does represent ISO 100. Light Value is only used to compare two exposures. The exposure calculator at this site uses Light Value of EV at ISO 100 to compare exposures at the same ISO. Any ISO number would do the same comparison job, so ISO 100 is not a magic number, only a very familiar comfortable number.
Light Value (LV) is the same number as EV at ISO 100, which can make the EV chart seem to be for ISO 100 (because the EV chart agrees with LV at ISO 100). But we are fooling ourself, this is Only because we arbitrarily specifically referenced LV to ISO 100. LV formula could have used any number (but 100 does seem convenient). The EV chart in fact matches whatever ISO we may be using at the time. EV is computed from the camera settings, which are chosen for the ISO we actually are using.
EV is important because a one stop change, which is 2x intensity, is called 1 EV (Exposure Value, more here). Or also a 1/2× intensity relationship, which is -1 EV. EV is the powers of 2 relationship of a light intensity ratio.
EV involves logarithms. We have seen logarithms in high school math. Logarithms were an extremely important tool in history before computers, because manual multiplication and division of big difficult numbers could be instead done by adding or subtracting logarithms (which is also the basis of slide rules, which are fast, but slide rules typically only offer maybe 3 significant digits). Logarithm tables are just lists of numbers with their exponents of the base which correspond to the value. The same log table is also used for look up of antilogs (the values corresponding to the logs). Calculators do this job today (not the basic 4 function models, but the "scientific" models do, and also the Windows CALC app and Javascript, etc).
The definition of logarithm is that it is the exponent representing the power to which a fixed number (the base, like 10 or 2 or e) must be raised to produce a given number.
log10(8) = 0.90309 the logarithm of 8, base 10
100.90309 = 8 baseexponent is the value again, called antilog of the logarithm
In base 10, 101 = 10, 102 = 100, 103 = 1000 (each step 10x value)
log2(8) = 3 the logarithm ( log2(X) = log10(X) / log10(2) )
23 = 8 baseexponent is the value again, called antilog of the logarithm
In base 2, 21 = 2, 22 = 4, 23 = 8 (each step 2x value, important in cameras)
Logarithm and exponent are just reverse operations, opposites. We know that addition/subtraction and multiply/divide are also reverse or opposite or inverse operations. Meaning, one can be used to "undo" the other, so to speak.
Log and exponent are also the similar inverse relationship.
So 23 = 8, and log₂(8) = 3 are inverse operations.
So log₂ of X just gives the exponent of 2 (which here we call EV) that will give X (as powers of 2). So regarding photographic exposure calculations, our exposure in powers of 2 = X are just log₂(X) values. And the log₂ of ratio of two values is also the EV difference. Example ratio 16/2 = 8. log₂(8) = 3, meaning 23 = 8;
Let's say this last 8 represents the power of a flash, or the intensity of any light. The 8 means relatively, the light is 8x brighter than some other light level that we call 1.
Relative to the other light, 23 = 8, means in 2x steps, our light is doubled 3 times, or 8 times more light or power, because 23 = 8.
So log2(8) = 3, which is that exponent of the base 2. And photo EV is about these 2x steps of intensity. 1 EV is 2x value, 2 EV is 4x, 3 EV is 8x. EV is computed as EV = log2(intensity ratio).
From the 1600s until the later parts of the 1900s (before computers, the time basically from John Napier and Newton until after Einstein), complex math was done manually with logarithms that provided adding and subtracting log values, instead of tedious long multiplication/division of big numbers. The logarithm values were looked up in log tables (a book of log values), typically from 4 to 8 significant digits, which showed the precomputed logarithm values. Calculators do it today. John Napier (1550-1617, Scotland) was not the actual inventor of logarithms, but he named and popularized the use of them as computing tools, and he is who we give credit for logarithms.
Just for fun, a simple problem to make the point about the forgotten usefulness of logarithms before calculators:
The value of Pi is 3.14159 (and this log10 is 0.4971495)
If the radius of a circle is 122.125 (and that log10 is 2.0868046)
then the area of the circle is Pi r² = 3.14159 × 122.125² = 46855.3 (log10 is 4.6707587)
Using the logs, this is 0.4971495 + (2 × 2.0868046) = 4.6707587
(multiply logs by the exponent, which if complex, that multiply could be yet another log addition)
Inverse Log(4.6707587) = 46855.3 area of the circle. The data had 6 significant digits.
If that might seem a complication, then to appreciate it, try doing Pi r² = 3.14159 × 122.125² by multiplying with only a pencil. And then contemplate some bigger problem. 😊 The log just came from a table lookup, and then adding or subtracting many digits is much easier than multiplying or dividing them. Then early on (17th century) the slide rule put the logarithms on a sliding stick (adding or subtracting length from another marked stick), which was easy to use, but was only precise to perhaps about 3 significant digits (maybe 4 digits at the 1 end and 2 digits at the 10 end, but often adequate, except for banking). But yes, today we sure can appreciate our calculators.
So log2 computes the exponent of 2 of the exposure setting math (which exponent of 2 is EV, which appears in the EV chart for those settings). EV is that exponent of 2 for those settings. This is how When EV is doubled (2x), the exposure is 2x.
A. Value (not as a ratio)
B. f/stop ratio ( / )2
C. shutter ratio /
D. EV: f/2 / sec
Aperture Shutter
EV = log₂ (fstop² / shutter time) (Using precise goal values of settings, nominals are Not precise)
log₂(X) is log10(X)/log10(2) or loge(X)/loge(2) (can use any log base, so long as consistent.)
Or simpler, Javascript has a Math.log2() function.
Caution: F/Stop Numbers increase towards less exposure, so to show proper EV ± sign, f/stop ratios must be reversed: Ratio of f/8 to f/4 is less exposure (-). But 8/4 increases (+) instead of 4/8 which decreases (-). In this calculator, this ratio is reversed in the math for B. instead of in the input fields (where it is how humans think of it).
Initial data in calculator at D. is f/5.65682 at 1/32 second (the precise goal values), which is EV 10 in the EV Chart.
Meaning, 210 = 1024.0 but the initial data only has 5 significant digits
log₂(X) is log10(X) / log10(2)
and log10(2) = 0.30103, so we might see shortcuts just using 0.3
log₂(X) is log10(X) / 0.3, or
log₂(X) is 3.3 × log10(X) (because 3.3 = 1/0.3)
which are fine approximations for log10, but … you should know that the log() function in Excel and Javascript and C and Python and other programming languages use Natural log base e instead of Common log base 10. Which normally doesn't matter at all, the results are the same if consistently using same base. However these numerical constants (of 0.3 and 3.3) will give the wrong answer unless using log10 (only due to the constants, because log10(2) = 0.30103 but loge(2) = 0.693147). So using 0.3 for loge(2) is simply wrong. So, in the programming languages (which all use loge), just use the log(X)/log(2) instead of 0.3. Or Javascript has Math.LN2 that returns loge(2), or also has a Math.log2 function or also a Math.log10 function. Just don't use 0.3 as loge(2) because that's wrong.
Also important, note that these programming languages will also expect trig angles to be radians instead of degrees. Radians = Degrees x Pi/180.
Handheld calculators normally offer log10 processing at button log, and loge at button ln or lnx (the n meaning Natural and loge). To compute log₂(X) in base10 is log(X) / log(2). Or in ln mode, it is just ln(X).
On a Texas Instruments calculator, this key stroke sequence for log₂(X) is: (the value of X) log ÷ 2 log =
Examples of log bases:
log10(2) = 0.30103
log₂(2) = 1
loge(2) = ln(2) = 0.69315 (JavaScript returns this constant with Math.LN2 (so can use that for loge(2), but NOT 0.30102 in Javascript). But even better, Javascript also has a function Math.log2(x) that already does log2.
Using any log base computes correctly if you are consistent, but NOT if you specify a wrong constant assumed incorrectly for the log base used.
Handheld scientific calculators (and the Windows Calc program) have both modes, and likely have one key called lnx or ln which is Natural loge, and another key called log which is Common log10, which simply does that conversion. Using either log system works if consistent, but my point here is that in programming languages, loge(2) is NOT 0.30103.
Again, here's the necessary trick about computing EV ratios of values. Stops of shutter speed or ISO are 2x steps of intensity, but the literal f/Stop Numbers are √2 steps. We know their meaning, but the actual f/Stop Numbers must be squared to be proportional to 2x steps of Exposure. Squaring converts the √2 factor to a power of 2, necessary for EV and any other exposure calculation. Most exposure calculations (Except Not for Guide Number) simply must first square f/Stop Numbers or f/stop Ratios (to become powers of 2 instead of powers or √2 Squaring is NOT done for shutter speed or ISO intensity ratios. And ratios of f/Stop Numbers are reversed for proper sign, and squared. Squaring f/Stop NumberS was said several times now, I hope it is clear.
Examples of ratios:
The difference in ISO 400 from ISO 100 is log₂(400 / 100) = 2 EV (± result is the first relative to the second).
The difference in 1/4 second from 1/16 second is log₂(0.25 / 0.0625) = 2 EV.
The difference in f/8 from f/4 is log₂( (4 / 8)²) = -2 EV. (f/stop ratios must be squared first)
The difference in f/11 from f/5.6 is log₂( (5.657 / 11.314)²) = -2 EV.
(precise values compute precise results, but Nominal log₂((8 / 11)²) = -0.919 (11 is an approximation)
Or the ratio of 8 seconds vs. 1/8 second: Logs of fractions less than one are negative (because negative exponents create fractions), so log₂(8) = 3, and log₂(1/8) = -3. In APEX terms (subtraction of exponents is same as division of the values), so this ratio difference is EV = 3 - (-3) = (3 + 3) = 6 EV. Or EV is log₂ of the ratio of two intensity values, log₂(8 seconds ÷ 1/8 second) = 6 EV difference (and 26 = 64 exposure difference factor).
Smaller numbers are less time exposure or less ISO exposure, but are greater f/stop exposure (running opposite directions). To handle that, I simply reverse the division order for f/stops, as shown. Fractional ratios are negative logs. You will compute precise results (for example, for compensations or EV values or Guide Number values) if you use the precise values instead of the approximate nominals.
EV is the power of 2 that gives this intensity ratio, 2x multiples, of 1, 2, 4, 8, 16, 32 ... values of intensity. Log₂ computes that exponent of that 2.
EV sign of ratios of values is negative if ratio is a fraction less than one.
And the EV result is an exact precise value if you use the exact precise setting values.
Logarithms are used for many common purposes (described as powers of 2 or 10 or e, etc):
There were several scales on the slide rule, like for trig functions and square and cubes or roots, and more, but the main ones for multiplication and division were the C scale (top below) and the D scale (bottom below) Numbers had to be scaled to be between 1 and 10, and decimal points readjusted by hand afterwards, with additional rules.
Slide rule example: 5.5 ÷ 2 = 2.75 (same method if 5,500,000 / 0.0275)
which is log(5.5) - log(2) = log(2.75), or if instead done on paper (with log tables),
then is 0.74036 - 0.30103 = 0.43933, which antilog(0.43933) can be looked up in log tables, or antilog is 100.43933 = 2.75
On the slide rule shown below, Log(5.5) - log(2) is 2 on the top C scale aligned with 5.5 on lower D scale, and the subtraction result is at 2.75 on D (at the 1 on the end of the C scale). For readability, you could move a line on a clear window cursor over the 5.5, which then also was over the 2 mark on the C scale.
Or a multiplication addition result is shown on the current slide rule position as 2.75 x 2 = 5.5.
Some numbers like 2 x 9 would not line up as shown, so the top C scale had to extend out of the left end, and the right hand 1 index (10) was used. That indicated 1.8.
Precision is harder to read precisely at the right end (more than 2 significant digits was arguable), so results were reasonable approximations, not exact.
An Introduction to the “Precise goal” calculations is above.
The number of significant digits (of every factor) is important in computing. Modern cameras are pretty accurate, but my using many digits in the chart results does NOT imply mechanical hardware accuracy is always quite that precise. But the target goal is very precise. The charts above may "show" Stop Number here with fewer digits (shown with minimum of four here), but it is an exponent (has large effect), so Stop Number is always used as its full actual precise fractional values (used as like 2 + 1/3, which computes as Stop Number 2.333333) for adequate precision of the exponent math. More significant digits of Stop Number to needed to compute and round accurate large full numbers for 1/16384 second, or ISO 1032127 (which require more than 2 significant digits). Saying, if your own calculation wants to see five accurate significant digits, then all the numbers you use to compute it must have at least five accurate significant digits too. (I find one additional digit works well). But a value like integer 3 if like in "3 dogs" is of course a fully precise value called an Exact Number, see Wikipedia Significant digits.
So the way to compute the precise powers of 2 is to simply number the nominal setting values consecutively, as 0, 1, 2, 3, 4, 5, 6 ... called Stop Number (if that consecutive numbering is not clear here, see the larger example above). These will be the exponents of 2 or √2 computing the precise powers of 2 (to ensure each step is exactly 2x exposure).
Shutter speed is computed as base 2 to exponent Stop Number. But the nominals in the text can appear their nominal way.
f/stop is computed as base √2 = 1.4142 to exponent Stop Number.
Stop Number 0 computes the value 1 (as f/1 or 1 second) because any number to power 0 is 1.
Fractional stops are computed with exponent (Stop Number + fraction).
Example: f/5.6 + 2/3 EV = (√2)(5 + 0.666667) = f/7.12719
The precise goal value for shutter speed is 2Stop Number seconds (which steps are the powers of 2).
Example: 2-7 = 1/128 second
Shutter Speed (duration, seconds) | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Nominals | 30 | 15 | 8 | 4 | 2 | 1 | 1/2 | 1/4 | 1/8 | 1/15 | 1/30 | 1/60 | 1/125 | 1/250 | 1/500 | 1/1000 |
Precise Goal | 32 | 16 | 8 | 4 | 2 | 1 | 1/2 | 1/4 | 1/8 | 1/16 | 1/32 | 1/64 | 1/128 | 1/256 | 1/512 | 1/1024 |
Stop Number | 5 | 4 | 3 | 2 | 1 | 0 | -1 | -2 | -3 | -4 | -5 | -6 | -7 | -8 | -9 | -10 |
f/stop (aperture) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Nominals | f/0.5 | f/0.7 | f/1 | f/1.4 | f/2 | f/2.8 | f/4 | f/5.6 | f/8 | f/11 | f/16 | f/22 |
Precise Goal | 0.5 | 0.707 | 1 | 1.4142 | 2 | 2.8284 | 4 | 5.6568 | 8 | 11.3137 | 16 | 22.627 |
Stop Number | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
The exponents in the EV calculations require logarithm math detailed above.
The precise goal value is this small formula to calculate the precise value:
Value = BaseStop Number
A Few Examples | |||
---|---|---|---|
Stop Num | f/stop | Shutter Speed | |
Precise | Nominal | ||
-2 | f/0.5 | f/0.5 | 1/4 sec |
-1 | f/0.707 | f/0.7 | 1/2 sec |
0 | f/1 | f/1 | 1 second |
1 | f/1.414 | f/1.4 | 2 secs |
1 1/3 | f/1.587 | f/1.6 | 1.5 secs |
1 2/3 | f/1.782 | f/1.8 | 3.2 secs |
2 | f/2 | f/2 | 4 secs |
3 | f/2.828 | f/2.8 | 8 secs |
4 | f/4 | f/4 | 16 secs |
5 | f/5.657 | f/5.6 | 32 secs |
5 1/3 | f/6.35 | f/6.3 | 40 secs |
5 2/3 | f/7.127 | f/7.1 | 51 secs |
6 | f/8 | f/8 | 64 secs |
7 | f/11.314 | f/11 | 128 secs |
2StopNum is shutter speed
23 is 8 seconds 2-3 is 1/8 or 0.125 seconds | |||
(√2)StopNum is f/Stop Number
1.4143 is f/2.828 (nominal f/2.8) |
For shutter speed and ISO, the base is 2, to match the 2x stops of EV values. But due to the √2 steps of f/stop being 2x stops, f/stop alone uses base of √2.
The concept is there are "Stop Numbers", simply numbered 0, 1, 2, 3, 4, 5... starting at Stop Number 0 which calculates a value of 1. We did not just arbitrarily number them, but instead these are the math exponents, to create powers of 2. Any base number to these exponents creates intervals of the exact powers of that base, and base 2 gives powers of 2 used for Shutter Speed and ISO. 2Stop Number is an exact power multiple of Base 2.
Stop Number 0 is the starting point, because any non-zero number to the power of 0 is value 1 (00 is not defined). Stop Number 0 starts the all-important value sequence 1, 2, 4, 8, 16, 32, etc. (a base of 2 computes powers of two). Photography is concerned with 2x exposure steps, so our base is 2 (except f/Stop Numbers use a base of √2, because our lenses do). So starting points are that 20 is 1 second, and (√2)0 is f/1.
Fractional partial stops (like third or half or tenth stops) simply add the fraction to the Stop Number to compute the value of Value = Base(Stop Number + fraction).
Note that "Stop Number" is the simple numbering of "stops", 0,1,2,3,4, etc. When used as the exponent of the base, it computes the "f/Stop Number" or the shutter speed values. Negative exponents create fractions, for example 2-2 = 1/4 second, or (√2)-2 = f/0.5. The numbers are necessarily what they are because of this math of the powers of two.
A few examples of concept are shown at right, but Stop Number is also shown in the long charts just above. The Stop Numbers are not shown in the camera, but they are used to compute the camera setting goal targets that are used. The Stop Number as an exponent for thirds may need 4 or 5 significant digits in your calculator (I use 1/3 in programs, don't use just 0.33) to compute a value this close, and then you can round it as desired.
Shutter Speed Exponent is Stop Num | |
---|---|
2N | Duration |
25 | 32 sec. |
24 | 16 sec. |
23 | 8 sec. |
22 | 4 sec. |
21 | 2 sec. |
20 | 1 sec. |
2-1 | 1/2 sec. |
2-2 | 1/4 |
2-3 | 1/8 |
2-4 | 1/16 |
2-5 | 1/32 |
2-6 | 1/64 |
2-7 | 1/128 |
2-8 | 1/256 |
2-9 | 1/512 |
2-10 | 1/1024 |
2-11 | 1/2048 |
2-12 | 1/4096 |
Shutter speed values are base 2 to power of Stop Number — numbering is the powers of 2 so their exposures are exactly 2.0x apart (1 EV). Third stops are cube root of 2 apart, and three thirds add to 1.0 EV. Base 2 to power of Stop Number 3 is value 8 (seconds). Base 2 to power of Stop Number -3 is value 1/8 (seconds).
All full stops are precisely 1.0 EV apart (2.0x intensity). This is a sacred rule, and powers of 2 ensure this precise goal. Doubling shutter time duration or the ISO value is 1.0 EV (powers of 2). However doubling any f/Stop Number is -2 EV (which is sometimes a handy thing to know), due to being powers of √2 (next below).
This method computes the theoretical "precise" goals actually used, which are often slightly different than the nominal numbers we see marked. The nominal marked numbers are just a convenient rounded guide for humans, but the digital camera design always uses the precise values. The mechanical result could still vary slightly, but modern digital camera timing is much more accurate than in the past (before digital).
Stop Number creates full stops (of base 2) in a binary 1, 2, 4, 8, 16, 32 ... sequence. The need for 2x exposure steps seems obvious. Stop Number itself is 0, 1, 2, 3, 4, 5 ... for full stops (Stop Number is the exponent calculating either powers of 2 for shutter speed, or powers of √2 for f/stop). Any number (except 0) to exponent 0 is 1.
The value 2Stop Number computes the 1, 2, 4, 8, 16, 32 ... shutter speed full stops. 2x shutter speed duration is 2x exposure (linear), which is one stop. The base is 20 = 1 second.
Negative Stop Numbers will compute fractional numbers (less than one, like 1/4 second).
For fractional stops (like third or half stops), add the fraction (0.333333, 0.666667, or 0.5) to the Stop Number.
f/stop = focal length / aperture diameter, so aperture diameter = focal length / f/Stop Number. Aperture is not the actual physical diameter, but is instead the effective diameter as seen though the magnification of the lens front element (see Wikipedia - Entrance Pupil). This definition causes the same f/Stop Number to be the same exposure on any lens of any focal length (so light meters read the same f/stop regardless of which lens).
Aperture Exponent is Stop Num | |
---|---|
(√2)N | f/Number |
1.4140 | 1 |
1.4141 | 1.414 |
1.4142 | 2 |
1.4143 | 2.828 |
1.4144 | 4 |
1.4145 | 5.657 |
1.4146 | 8 |
1.4147 | 11.314 |
1.4148 | 16 |
1.4149 | 22.627 |
1.41410 | 32 |
Aperture f/stop values are base √2 to power of Stop Number (numbering is the powers of √2, so full stop values are 1, 1.414, 2, 2.828, 4, 5.657, 8, etc.) Each full stop value number is exactly √2 apart (1.4142x apart), so that their exposures are exactly 2.0x apart (1 EV). As mentioned before, a handy thing to know is that doubling the actual f/Stop Number is -2 EV of exposure. Third stops are cube root of √2 apart, and three thirds add to 1.0 EV. Base √2 to power of Stop Number 3 is value 2.828.
For fractional stops (like third or half or tenth stops), add the fraction (0.333333, 0.666667, 0.5, or 0.1) to the Stop Number.
Negative Stop Numbers will compute fractional numbers (less than one, like f/0.5).
We can compute Stop Number -3 to be f/0.35, but -2 for f/0.5 is considered a physical limit for a lens to be able to focus well. But f/1.4 or f/2.8 are often a reasonable practical limit (due to diameter, affecting size, weight, quality and cost).
There is a choice for computing f/stop that you might occasionally see. Due to the actual f/Stop Numbers being multiples of √2, f/stop can optionally be computed as (√2)Stop Number, or as: sqrt(2Stop Number) (same math). In math, when the 2 is moved outside the sqrt radical, it must become √2 out there. Same math, same everything. So FWIW, (√2)3 = 2.828 is the same as sqrt(23) = 2.828 (seen sometimes).
f/stop: Full stop = 1.41421356× intervals ( √2)
third = 1.122462× intervals (is cube root of √2)
half = 1.189207× intervals (is square root of √2)
Example: f/8 - 1/3 EV = 8 × 1.122462 = f/8.979696
Going the other way would divide instead:
f/8 + 1/3 EV = 8 / 1.122462 = f/7.12719 (these values are in the chart above)
But value 8 is the Stop Number 6 (from index of 1, 1.4, 2, 2.8, 4, 5.6, 8, etc.), so standard way is (√2)(6 + 0.3333333) = f/8.979696
Shutter Speed: Full stop = 2× intervals
third = 1.25992105× intervals (is cube root of 2)
half = 1.41421356× intervals (is square root of 2)
Example: 8 sec + 1/3 EV = 8 × 1.25992105 = 10.079368 sec
or, 8 sec - 1/3 EV = 8 / 1.25992105 = 6.349604 sec
But it seems simpler that if 8 seconds is the S.S. Stop Number 3 (from index of 1, 2, 4, 8, etc), the standard way to add ⅓ EV is 2(3 + 0.3333333) = 10.079368 seconds
Or subtracting 2 ⅔ from f/8 (stop 6) is √2(6 - 2.6666667) = √23.3333333 = f/3.174802 (nominal f/3.2)
StopNum + offset | ISO 2^SN | Old ISO SN 2^SN | |
---|---|---|---|
1.643856 | 3.125 | 0 | 1 |
2.643856 | 6.25 | 1 | 2 |
3.643856 | 12.5 | 2 | 4 |
4.643856 | 25 | 3 | 8 |
5.643856 | 50 | 4 | 16 |
6.643856 | 100 | 5 | 32 |
7.643856 | 200 | 6 | 64 |
8.643856 | 400 | 7 | 128 |
9.643856 | 800 | 8 | 256 |
10.643856 | 1600 | 9 | 512 |
11.643856 | 3200 | 10 | 1024 |
12.643856 | 6400 | 11 | 2048 |
The ISO system was changed around 1960, when light meters first started being added into cameras. Internally, ISO is not quite the same system as f/stop or shutter speed. Before, if Stop Number 0 is conventionally to be value 1 (like for f/1 f/stops and 1 second shutter speeds), then in that old system starting at ISO 1, nominal ISO 100 is Stop Number 6.6667, which is precise value ISO 101.6, which was the 2/3 stop between full stops 64 and 128.
But now ISO 100 is made to be a full stop. Now an offset (like 1.643586) is added to each Stop Number 0, 1, 2, 3, 4, etc, for the purpose to make ISO 100 be exactly a full stop, and then every stop (thirds and all) are all exactly relative to ISO 100 instead of ISO 1 and 128.
Modern digital camera sensors don't use the lowest ISO numbers any more. And since roughly about 1960 (when light meters began appearing in cameras), cameras have adopted the goal for ISO 100 and its multiples to conveniently be full even stops. The base for Stop Numbers is shifted by an offset so that ISO 100 and higher multiples are now a full stop.
ISO (called ASA back then) was done that way earlier than 1960, when we didn't really know or care about this detail, we just loaded a roll of film. But then in the late 1950s came notions of adding semiconductor light meters into cameras, with automation involving EV computation, and then ISO 100 being a full stop seemed like it should be convenient, a nice round number. But of course, it really is a beneficial necessity.
The issue is that decimal 100 (102), as nice as it is, is not a binary number necessary to be a power of 2, so that full stops will change in 2x multiples. Binary powers of 2 are 1, 2, 4, 8, 16, 32, 64, 128, 256, etc. (20 = 1)
So the new way (60+ years ago), an offset, for example like log2(100/32) = 1.643856, is added to all ISO Stop Numbers 0, 1, 2, 3, 4, etc, and this works the same for any binary divisor n = 1, 2, 4, 8, 16, 32, 64,, relative to 100. The divisor n just changes which is the smallest first entry. A divisor of 1 (100/1) makes log2(100) be the first top entry, and all lower values increment by one stop (a power of 2). Or 100/32 is ISO 3.125. A divisor of 25 = 32 then makes ISO 100 be the 5th full stop entry, 5 stops down the list from the top at ISO 3.125 that has Stop Number 1.643586. It does Not change ISO 100 at all, it is still Stop Number 6.643586, 5 stops down from 1.643586 for 3.125. (6 - 1 = 5 EV.)
Log2(100) = 6.643586 computes the exact precise Stop Number of ISO 100 (not of 101.6, but of 100.0), and the log2(100 / n) starts the list a few stops before 100, but it is still incremented by 1 stop, so all the full stops are exactly 2x apart, and all stops (thirds, halfs) are based relative to ISO 100. The system is still the same, except just based on ISO 100 instead of ISO 1. It computes third Stop Numbers relative to 100 instead of 1. Starting at Stop Number 0 is still fine for aperture (f/1) or shutter (1 second), but is outdated for ISO 1.
So now a third stop past ISO 100 is 2(6.643856 + 0.333333) = ISO 125.97, which is a new number but still called nominal 125. The 125 used to be a full stop at 128, and now it's a precise third past ISO 100, but ISO 100 is the same old value. 101.6 was as close as it got, a third less than ISO 128). It doesn't change any exposure values, is just more precise in our cameras that are based on ISO 100 now. The issue is that 100 is not a binary number. The benefit is that all the thirds are now relative to ISO 100 instead of ISO 1 and 128.
I have seen log₂(100/32) suggested as a standard, but not sure how factual or important that is because several values work the same. Cameras can probably do their own thing, but handheld light meters surely do need a wide range. My old Nikon D800 camera numerically covers ISO 100 to 6400, but it can go a stop further up or down than either limit.
You can see the log₂(100/n) examples detailed by clicking here. All of those offer ISO 100 multiples as full stops, and the precise thirds are relative to them now. ISO 100 is Stop Number 6.643586 in every one of them. The exposure value of the number 100 is Not changed. You can see full charts of the settings, which still looks the same except for the offset Stop Numbers (and 2Stop Number still computes the same).
Click here to toggle Showing the various ISO offset detail on or off. It can of course go higher than the shown Stop Numbers 0..9, but that seemed plenty here.
If curiosity might want to see the Old ISO chart computed with the old film origin starting at ISO 1, then:
Click here to toggle Showing the old style ISO chart Off or On
Or see charts of all the new ISO numbers.
The precise setting values are still computed in the conventional way as starting at Stop Number 0 at value 1, except it adds an offset to every ISO Stop Number, for example 2(0 + 1.643856) = ISO 3.125. The purpose of this plan is that now it now computes precise full and third and half stops relative to exactly ISO 100 (instead of to ISO 1 and 128). Since we do place ISO 100 so high, it's the best thing to do.
That old way was simpler, but this is just for explanation how ISO isn't that way now. It does not change anything except to use the offset, shifting the numbers slightly. The common values like ISO 100, 200, 400 used to be nominal third stops back then. The even hundreds are now precise full stops in today's digital camera.
If you have come this far, a few facts can be observed now (which very few even know). There really was some point here.
In the old ISO chart (until 60+ years ago, starting at ISO 1), we see that Stop Number 6.6667 was a third stop at ISO 101.6, very close to ISO 100, only a tiny difference, but now it will use exact 100. The setting a third stop more than 100 was 128 (called 125), and now it is 126 (and still called 125). We never noticed the tiny change, but it is more precise and exact. That was 60+ years ago, but it is a difference in the old method that might have been still expected. It is still used for shutter speed and f/stop settings, but not ISO (trying to make sure all is understood).
In the new ISO data detailed just above (about the ISO offset), we see that log2(100/1) is 6.643856 (very close to the old ISO 101.6 value of 6.6667 we used to use), and it means ISO 100 is 6.643858 EV from ISO 1. Adding that ISO offset to Stop Number 0 (adding zero is no change) puts ISO 100 at the beginning of the list. Or using log2(100/32) (ISO 3.125) starts the list 5 stops above ISO 100 (because 25 = 32). ISO 100 is still ISO 100 though, without change.. The procedure changed a little, but it is the same result, except ISO 100 is now a full exact stop. ISO 100 is NOT changed. ISO 100 is still the same Stop Number 6.643856 power of 2, because log2(100) = 6.643586.
ISO Conversion: The ISO conversion data further above says that
EV800 converted to a New ISO S = EV800 + log₂ (S / 800) = EVS
(to let ISO 800 match the same exposure of ISO S). That EV will be ± as appropriate, minus if S is less than 800. Logs of fractions are negative, and logs of values greater than 1 are positive.
<select ... > (HTML) ... <option value="6/0">ISO 100 <option value="6/3">ISO 125 ⅓ <option value="6/5">ISO 140 *½ <option value="6/7">ISO 160 ⅔ <option value="7/0">ISO 200 ... </select> /3 is 0.333333 (+ ISO offset /5 is 0.5 added to the 6 /7 is 0.666667 in the code)
So log2(ISO1/ISO2) is just the standard ISO conversion (and 100/1 is just converting ISO 1 to 100), and it is the EV difference in the two, which is what log2(100/1) or log2(100/32) are doing (100 is still the same value). The way we convert ISO2 to ISO1 is to add that EV ± difference, which is what Stop Number is doing now.
The only difference in computing is that we add the ISO offset to all ISO Stop Numbers (the choice so that ISO 100 uses Stop Number 6.643856, because 26.643856 = 100). I still code my Select boxes the old way (like as 3/7 meaning Stop Number 3.666667 for 3 2/3 for shutter and f/stop, and also ISO, but then also adding the ISO offset in the code (instead expanding the Select box). That allows one function to process the arithmetic, and optionally return the numeric code (some uses may want to add it), or uses the right base to compute the setting value. These codes are easy and then the values will be correct.
It's really not as mysterious as it might look. And each full stop value is still a 2x 1 EV change from the prior or next one.
Nominal values cannot be computed, they're just a list of what convention has called the various settings for about 100 years. Nominals are the same set of numbers in both old and newer charts, but now the ISO third, half and full definitions are shifted. The camera will still find the proper exposure. The nominal numbers are still rounded approximations. Specifically, for the larger numbers, one full stop greater than any nominal third, half or full stop will still be 2x the numerical value.
For empirical example of today's use of this offset, we see a Nikon D800 DSLR if set to ISO 1250 is 1/3 stop less than 1600. The camera then reports ISO 1250 nominal in the menu and Exif, but deep into the extended Exif (Maker Notes section), it also reports ISO 1270 there, that it actually uses. Users don't much care about the exact numerical value, they just want it to be 1/3 stop less than ISO 1600.
The Nikon D800 DSLR also uses 1/6 stops for ISO in Auto ISO mode, so values like ISO 449 or 566 can be seen in that way (called nominal 450 or 560). 566 is 3/6 or 1/2 stop, but 449 is 1/6 stop. This 100/32 = ISO 3.125 starting from 21.643856 creates those specific numbers like 1270 or 449 or 566. But starting at ISO 1 does not create the same numbers. Light meters today agree on all the Full and third stop ISO numbers, but I've seen other values from other Auto ISO systems.
This idea of starting ISO at base 3.125 (so ISO 100 would be a full stop) was seen in the APEX (Additive Photographic Exposure) system, which along with EV, was added to ISO specs in the late-1950s when light meters and transistors and batteries started being added into cameras, starting around 1960. That metered exposure calculation required use of the Powers of Two increments.
The APEX idea and math was: EV = Av + Tv = Sv + Bv.
These are log₂ values (the Stop Numbers), see Wikipedia. Repeating, these APEX values are Not camera settings like f/stop and shutter speed seconds, but instead are the Stop Number (the exponents of √2 and 2).
Av is Aperture Value (using for example Stop Number 3 to denote f/2.8).
Tv is Time Value (shutter speed duration), which these are the exponents (of Stop Number + thirds fraction), with some changes, for example APEX reverses sign to make Tv be positive (for the additions instead of subtractions), but the actual exponent still must be negative for fractional seconds (remember, we didn't have shutter speeds longer than one second back in those days).
Some camera brands still label their aperture and shutter preferred modes as Av and Tv, perhaps it indicates it is metered, but it is technically correct that cameras do actually use the Stop Number logarithms (nevertheless users still think of it as the nominal values). But these APEX terms are the Stop Numbers (the exponents, not the actual setting values).
Sv is Film Speed exponent, APEX starting at ISO 3.125 at Sv = 0, but still requiring addition of 1.643856 to be the actual exponent (3.125 forces ISO 100 and multiples to be even full stops).
Bv is Brightness exponent (foot candles, starting at 6.25), which the light meter measures to compute EV.
From Wikipedia:
N is f/Stop Number, t is shutter speed duration Time.
Assume two nominals, f/11 and 1/125 second. The f/11 value is computed using (√2)7 = f/11.314 precise. And the 1/125 second value is 2-7 = 1/128 precise. So the EV formula is EV = log₂(11.314² / 0.0078125) = EV 14. If instead using the camera nominal values of f/11 and 1/125 second, they would compute EV 13.88, maybe approximately close, but not precise, and Not the actual values used.
In the APEX formula EV = Av + Tv = Sv + Bv, adding the exponents is the same as multiplying the actual values (which is just standard logarithm math, see Wikipedia). This was a big deal in 1960, because the simplest transistor chips then were too small to do floating point math, but the logarithms (all values were stored in camera ROM) are simply added or subtracted. And only full stops were used in 1960, not even any halfs. Aperture half stops were approximated by positioning the dial halfway between two click stops. Times have changed. 😊
The negative shutter speed Stop Numbers were reversed (-7 to +7) by APEX. Possible because subtraction of exponents is same as division of the values used by the EV formula (and there were no shutters longer than one second then). But subtracting (for divide) a negative log value is addition again anyway. So then 7 - (-7) = 7 + 7 = EV 14, which is the correct EV number. By using prepared tables of exponents, necessary because a floating point math processor was not available back in early days of APEX and EV, nor even today in smaller processors.
25 is 32, so ISO 100/32 = ISO 3.125 is exactly five stops under ISO 100. I did start the ISO chart at this Stop Number log₂(100/32) = 1.643856 to be exactly five stops under ISO 100 in order to match APEX charts starting at the ISO 3.125 that you might see. Note the difference though, APEX refers to the ISO 100 "fifth" stop Value as 5, which is the exponent for their additive system of EV, but technically, the math of converting back to specific ISO number still requires the exponent of 2(5 + 1.643856) = 100. The ISO chart here could have started 4 or 6 stops under 100 to still simply match ISO values you may see in cameras today (with identical results as 5 stops), and APEX chose 5 stops to start at ISO 3.25. ISO 100 is just another number, not special in any way, it was just an arbitrary choice, more than a nice round convenient number for humans, but the change was really helpful in the EV system math. ISO 128 was the early natural full stop (2^7), but it computes ISO 100 as a third stop at 101.6. The new ISO system makes all third stops exactly relative to ISO 100 instead of to 1 and 128.