Description: Account for rounding errors on float representing version

2.2 is not directly representable as a float and doing comparison with
it gives surprising results on i386. Basically, the 2.2 in the header of
the gmsh files might actually result in a float that is larger than 2.2

Hence we now make sure that the float representing the version is smaller
than 2.20001

Author: Markus Blatt <markus@dr-blatt.de>
Forwarded: https://gitlab.dune-project.org/core/dune-grid/-/merge_requests/730
Applied-Upstream: no
Last-Update: 2024-03-12
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/dune/grid/io/file/gmshreader.hh
+++ b/dune/grid/io/file/gmshreader.hh
@@ -391,7 +391,9 @@ namespace Dune
       if (strcmp(buf,"$MeshFormat")!=0)
         DUNE_THROW(Dune::IOError, "expected $MeshFormat in first line");
       readfile(file,3,"%lg %d %d\n",&version_number,&file_type,&data_size);
-      if( (version_number < 2.0) || (version_number > 2.2) )
+      // 2.2 is not representable as float and leads to problems on i386
+      // Hence we use >= 2.00001.
+      if( (version_number < 2.0) || (version_number >= 2.20001) ) // 2.2 is not representable as float and leads to problems on i386
         DUNE_THROW(Dune::IOError, "can only read Gmsh version 2 files");
       if (verbose) std::cout << "version " << version_number << " Gmsh file detected" << std::endl;
       readfile(file,1,"%s\n",buf);
