Two measurements of temperature don't add up properly via + operator.

Originator:taruntyagi946
Number:rdar://27966206 Date Originated:Aug 23, 2016
Status:Open Resolved:
Product:iOS SDK - Foundation Product Version:iOS 10 SDK beta 4 (Xcode 8 b4)
Classification:BUG Reproducible:Always
 
Suppose there are two measurements for temperature. One in fahrenheit, other in celcius, when adding them together using + operator, result is mathematically wrong.

Steps to Reproduce:
1. Unzip the MeasurementsAndUnits.playground from attached zip file.
2. Open in Xcode
3. Look at the results where totalTemperature is calculated. Line 12 - Line 18

Expected Results:
Two measurements of same type with different units should add up correctly mathematically when added using + operator.

Actual Results:
Two measurements of same type with different units don't add up correctly mathematically when added using + operator.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!