title: Objective-C Double, Long Calculation
body: <p>I am trying to calculate a long value divided by an integer to give me what I would expect to be a double, although the result I am getting is 0. The code I am using...</p>
  
  <pre><code>double daysByYear = daysSinceBirthdayToService/365;
  NSLog(@"%d", daysByYear);
  </code></pre>
  
  <p>In this code, daysSinceBirthdayToService variable is a Long Double which can be NSLogged using the following code <code>(long)daysSinceBirthdayToService</code></p>
  
  <p>It is declaired in the header file as a property of</p>
  
  <pre><code>@property (nonatomic) NSInteger daysSinceBirthdayToService;
  </code></pre>
  
  <p>Can anybody help me out with this, thanks!</p>