In my coce, I need to handle small numbers (~e-22) but not always so I can't scale the problem (maybe I'll be able to do so later). During the code, I need to subtract two numbers but sometimes, when I do so, I get a nan answer instead of a number. The subtracted numbers are getting smaller and smaller as the code progress and when I forces larger numbers no nan has appeared. Could it be that the numbers I use are so small that they are nan?
Thanks.
p.s. I know that usually nan is generated by undefined move such as 0/0.
I tried something similar and got the same results. I would love to post some code only I think it's a little bit too big to post. I try to isolate the problem and post it then.