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.

1 Answer 1


1/0.0166666666666667 = 60
quite easy :)

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy