Project

General

Profile

Actions

Bug #6439

closed

Double rounding fails in some cases while evaluating Expressions

Added by Owsiak Michal about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Urgent
Category:
actors
Target version:
Start date:
03/04/2014
Due date:
% Done:

100%

Estimated time:
Spent time:
Bugzilla-Id:

Description

It seems that addition of doubles can produce values slightly different than they should to be.

Please take a look at attached workflow (simple_error.xml).

Condition that should be satisfied to escape the loop is: 1.7 > 1.5 + 0.1

However, loop is interrupted sooner, because of incorrect calculation of doubles. Value of "p" is set to: 1.6000000000000003

This, of course, makes it impossible to use doubles as check points for the loops.

However, it seems that casting to string and back works fine (take a look at second workflow - simple.xml)

Cheers

Michal


Files

simple_error.xml (83.1 KB) simple_error.xml Owsiak Michal, 03/04/2014 04:23 AM
simple.xml (107 KB) simple.xml Owsiak Michal, 03/04/2014 04:23 AM
Actions

Also available in: Atom PDF