private double decodeCanonEv(int val)
    {
        int sign = 1;
        if (val < 0)
        {
            val = -val;
            sign = -1;
        }

        int frac = val & 0x1f;
        val -= frac;

        if (frac == 0x0c)
            frac = 0x20 / 3;
        else if (frac == 0x14)
            frac = 0x40 / 3;

        return sign * (val + frac) / (double)0x20;
    }
private double decodeCanonEv ( int val ) { int sign = 1 ; if ( val < 0 ) { val = - val ; sign = - 1 ; } int frac = val & 0x1f ; val -= frac ; if ( frac == 0x0c ) frac = 0x20 / 3 ; else if ( frac == 0x14 ) frac = 0x40 / 3 ; return sign * ( val + frac ) / ( double ) 0x20 ; }
Canon hex-based EV (modulo 0x20) to real number.

Converted from Exiftool version 10.10 created by Phil Harvey
http://www.sno.phy.queensu.ca/~phil/exiftool/
lib\Image\ExifTool\Canon.pm

eg) 0x00 -> 0
0x0c -> 0.33333
0x10 -> 0.5
0x14 -> 0.66666
0x20 -> 1   ... etc