Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001935Core InformEquations, units, arithmeticpublic2016-07-27 07:042016-07-27 07:40
Reportermattweiner 
Assigned To 
PrioritynormalSeveritymildReproducibilityalways
StatusconfirmedResolutionopen 
PlatformMacintoshOSEl CapitanOS Version10.11.5
Product Version6M62 
Target VersionFixed in Version 
Summary0001935: totals of real-numbered specified units are wrong
DescriptionWhen 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 InformationOutput:


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.

>
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0004492)
mattweiner (reporter)
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 (developer)
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.

- 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


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker