ID 481214 - Floating point rounding errors when picking 0.5 grey

Follow

Problem summary
Floating point rounding errors when picking 0.5 grey values

Customer reported version
Mar 4.7v3

Customer reported platform
Windows 10

Steps to reproduce

1) Open any Project, and in the Node Graph, press [P] to create a Paint node.

2) Set the Depth to 16bit (Half) and tick the Scalar Data checkbox

3) Click the colour swatch and pick a 0.5 grey value, then click OK to create the node.

4) View the new Paint node, and open the Colors palette

5) Hold [C] and pick the colour in the Viewport, check the Colors palette for the value


Value = 0.5


6) Switch to the Paint Tool [P] and paint 0.5 grey in an area

7) Pick the colour from the stroke [C] and check the Colors palette for the value

Value = 0.499


Expected behaviour
The picked colour from the brush stroke should have a value of 0.5

Actual behaviour
The picked colour has a value of 0.499

Workaround
Unknown.

Reproduced by support
This bug has been reproduced in:
Mari 4.7v3 - Windows 10 - CentOS 7.7

Unable to reproduce bug in:
Mari 4.7v2 - Windows 10 - CentOS 7.7

Earliest version tested
Mari 4.7v2 - This issue doesn't appear in this version and has regressed

      We're sorry to hear that

      Please tell us why