Laur's blog
Sign in Subscribe

inexact

A collection of 1 post
Simple Floating Point Equality Check in C++
c

Simple Floating Point Equality Check in C++

TL;DR: Here you can see a handmade comparison function for floating point values. While working on a C++ project using templates, I had to perform an equality to see if two values are identical. While the == is OK for integer values, it is not really OK for floating point
Dec 21, 2015 1 min read
Page 1 of 1
Laur's blog © 2025
  • Sign up
Powered by Ghost