KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Our server application does a lot of integer tests in a hot code path, currently we use the following function: inline int IsInteger(double n) { return n-floor(n) < 1e-8 } This function is very hot in our workload, so I want it to be as fast as possible. I also want to eliminate the "floor" library call if I can. Any suggestions?
Tags (comma-separated)
Save Edits
Cancel