An alternative approach to think about.
Those are some very good ideas, but it wouldn't do what my current functions do, in that it doesn't provide for a scale factor and automatic number of digits of precision based on (apex96+1). It would also take more work and code to implement. It seems like there are a lot of "magic letters" to learn too.
I'm leaning towards unifying all the conversion functions into two functions:
apex96_from(type, val, mult)
type: "shutter", "iso", "aperture"
val: value for shutter, iso, or aperture
mult: multiplier (negative means use 1/val)
(double) dval = val*mult or 1/(-mult*val)
default if mult isn't present: 1
returns: integer apex96 value
example: 1/3200 shutter tv96=apex96_from("shutter",3200,-1)
apex96_to( type, apex96, mult, ndig)
type: same as above, plus "*shutter","*iso", "*aperture" for string output
apex96: tv96, sv96, or av96 based on type
mult:: multiplier for result, negative means 1/x
default if mult isn't present is 1
ndig: for string types only
#digits of precision 0 to 9, or -1 for auto.
Default, if ndig isn't present is -1 auto
returns: integer or string
For waterwingz request of returning only camera valid values, you could start the type with "=" instead of "*"
apex96_to("=shutter",apex96)
would return a string with the nearest valid camera value. ndig and scale determined by valid value format
========
Before jumping on me for suggesting new things that have already been decided, what I'm considering doing is a separate patch for my own builds that I'll provide independently to those that want to use it, instead of trying to get it in the trunk. This will eliminate all the arguing, and free me up to think more creatively.