4
\$\begingroup\$

I'm writing my own software to manage my photo storage.

Within the EXIF data the camera stores it's exposure time in seconds.

So 1/60 is expressed as 0.0166666666666667.

Sites like Flickr are already able to convert this into the more friendler "1/60" format, but what is the formula to achieve this?

I.e, how to find out how many times the value will fit into 1.

\$\endgroup\$

1 Answer 1

5
\$\begingroup\$

1/0.0166666666666667 = 60
quite easy :)

\$\endgroup\$
2
  • \$\begingroup\$ Cheers I got there in the end - I was confused because the calculator was giving me 59.99999999999988. \$\endgroup\$
    – user32020
    Sep 2, 2014 at 18:31
  • 1
    \$\begingroup\$ well, some rounding is in order, obviously. with floats, thats always a problem. \$\endgroup\$
    – ths
    Sep 2, 2014 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.