« first day (4967 days earlier)      last day (21 days later) » 

6:51 PM
It appears as though your code is working and you need help refactoring it. StackOverflow is for asking questions about non-working code. I would suggest you post this question on either Software Engineering or Code Review. — Abion47 32 secs ago
 
 
2 hours later…
9:07 PM
@Kittoes0124 Sorry you had a bad experience. Since your question is about an algorithm (without showing any code to debug), you would be welcomed on other SE sites: math.stackexchange.com mathoverflow.net softwareengineering.stackexchange.com cs.stackexchange.com It wasn't clear if 1 - SQRT(0.5) was the only number you needed or a general non-float function. If one, you can use a program to create a .h with predefined constants. Otherwise, there are other algs that may be better with fixed-point formats (e.g. binary search). — Craig Estey 50 secs ago
 

« first day (4967 days earlier)      last day (21 days later) »