gephi / gephi/gephi

Floating point precision error upon opening CSV file

Open
#2,700 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.6k
Forks
1.6k
Avg merge
9h 38m
Merged PRs (30d)
75

Description

Have encountered this issue which look like a floating point precision error, when opening a CSVfile as Matrix & UTF-8. Example below

Once I imported a CSV file and look into the Data Table -> Edge, on the upfront the weight will be shown as 0.02 (which is the original value from the CSV file), however once double click into the cell, the value will be shown 0.019999999552965164. This is an issue when trying to apply filter based on Edge Weight as it is based on the floating point figure instead of the original figure. For instance, applying edge weight of minimum 0.02 will actually filter out all the rows with figure of 0.02.

![Untitled](https://user-images.githubusercontent.com/118872532/203472181-60695678-b30f-4d85-b200-761058d9f5c9.png)
![Untitled2](https://user-images.githubusercontent.com/118872532/203472228-8fc48231-e5af-49cc-a57a-e16bcbb9e237.png)

However, upon exporting the edge table and open it, the figures shown are normal without above error. A possible workaround now is to export & reimport the edge table every single time which is rather annoying.

Using gephi version 0.9.7

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.