NRML source model parser to use 'Decimal' instead of 'float'

Bug #1008398 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
High
Lars Butler

Bug Description

For probability values in the various distributions. This applies to nrml v0.4 only.

The reason for this is that, for example, sum([0.1] * 10) == 0.9999999999999999

Using 'decimal' (http://docs.python.org/library/decimal.html) is safer.

Tags: nrml
tags: added: nrml
Changed in openquake:
status: New → Confirmed
Changed in openquake:
assignee: nobody → Lars Butler (lars-butler)
milestone: none → 0.8.1
importance: Undecided → Medium
Revision history for this message
Lars Butler (lars-butler) wrote :
Changed in openquake:
status: Confirmed → In Progress
importance: Medium → High
Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.