ParaView cannot read numbers like 1e-100

Hi, I found that ParaView cannot read VTK files with numbers like 1e-331.

To reproduce the error, please use the following file:

# vtk DataFile Version 3.0
ibm
ASCII
DATASET UNSTRUCTURED_GRID
POINTS 3 double
1.0e-321 1.1e-349 0.0
1.0 0.0 0.0
0.0 1.0 0.0
CELLS 1 4
3 0 1 2
CELL_TYPES 1
5

At least for the version I am using, 5.6.0 on MacOS, this file cannot be read successfully, but simply changing 1.0e-360 to 0.0 solves the problem.

1.0-e321 is smaller than the smallest representable double in the iEEE 754 format, so the parsing of 1.0e-321 fails. What VTK (and ParaView) are doing in reporting the error is likely better than assuming some value for an unparsable number string, so I don’t think this is a bug.

1 Like