MantisBT - Core Inform View Issue Details ID Project Category View Status Date Submitted Last Update 0001935 Core Inform Equations, units, arithmetic public 2016-07-27 07:04 2016-07-27 07:40 Reporter mattweiner Assigned To Priority normal Severity mild Reproducibility always Status confirmed Resolution open Platform Macintosh OS El Capitan OS Version 10.11.5 Product Version 6M62 Target Version Fixed in Version Effect (serious/mild) Game compiles but misbehaves Submitter Summary 0001935: totals of real-numbered specified units are wrong Description When taking the total of a set of values specified as a real number unit (1.0 kg), the total comes out as an impossibly large number when it should be 2.0 kg. Minimal Source Text To Reproduce Lab is a room. A weight is a kind of value. 1.0 kg specifies a weight. Everything has a weight. A rock and a stone are in Lab. The weight of the rock is 1.0 kg. The weight of the stone is 1.0 kg. When play begins: say "Total weight: [total weight of things in the Lab]." Additional Information Output: Total weight: 1.70141 × 10^38 kg. Welcome An Interactive Fiction Release 1 / Serial number 160727 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD Lab You can see a rock and a stone here. > Tags No tags attached. Relationships Attached Files Issue History Date Modified Username Field Change 2016-07-27 07:04 mattweiner New Issue 2016-07-27 07:09 mattweiner Note Added: 0004492 2016-07-27 07:40 zarf Note Added: 0004493 2016-07-27 07:40 zarf Status new => confirmed

Notes
 (0004492) mattweiner 2016-07-27 07:09
 This also happens if we use the Metric Units extension. Source: Lab is a room. Include Metric Units by Graham Nelson. Everything has a mass. A rock and a stone are in Lab. The mass of the rock is 1.0kg. The mass of the stone is 1.0kg. When play begins: say "Total weight: [total mass of things in the Lab]." Output: Total weight: 1.70141 × 10^35 tonnes.
 (0004493) zarf 2016-07-27 07:40
 Confirmed. The total-property-value routine (Prop_1 in this example) uses integer addition whether the value is integer or real.