[Cryptography] floating point

Henry Baker hbaker1 at pipeline.com
Thu Dec 25 17:35:45 EST 2014

At 05:55 PM 12/24/2014, Henry Baker wrote:
>I believe that the Lisp/Scheme reader/printer was the first to satisfy the axiom:
>Actually, in the case of floating point numbers, they aren't just EQUAL, but bit-for-bit identical (variously called EQ or EQL, depending upon whether floating point numbers are "immediate" or not).

I forgot to mention that I had a recent legitimate need to utilize bit-for-bit comparison of floating point numbers.

The 3D printing ".stl" format utilizes triples of IEEE 32-bit format floating point numbers to represent vertices in the face triangles of a surface in 3D.  But in order to see whether a given .stl file represents a legitimate 3D-printable object, one needs to perform certain topological tests on these vertices, edges and triangles.  In particular, one needs to be able to recognize when "the same" vertex occurs again in the .stl file, and this can be determined by bit-for-bit matching of all three coordinates of the vertices.  Once vertices can be recognized, then so can directed edges and directed triangles.

Finally, the Euler characteristic of the object can be computed, and the object can be tested to see if it is "water tight" -- it actually represents a 3D-printable object.

None of these operations should be done using floating point, because any round-off error whatsoever will destroy the accuracy of the result.  In fact, most popular 3D printing packages cannot check these topological properties with certainty -- that computation might require quadruple-, quintuple- or even more precision to compute the correct result.

More information about the cryptography mailing list