What about that math problem that was located?
As far as the floating point math. It is never desirable. Certainly not in a function such as ntargettimespan. Its believed Clients may be interpreting the calculation differently.
One thing to remember is that delays in multiple communications, coming through TCP are horrible... That is why FPS shooters don't use TCP. There is no guarantee of time-delivery. Sent-time is never equal to delivered-time, off by many seconds at times. That is in addition to the layers of stacked TCP delays...
EG, Delivery path sample... "->" = TCP delivery delay of 500ms to 4500ms (0.5sec to 4.5sec) each.
My miner solution when it finally finishes the worksize -> My wallet -> My wallet checking -> IRC room I connect to USA,FL -> IRC relay node USA,NY -> IRC relay node EUR,Fr -> IRC relay node CHN,Sh -> Your wallet JAP,To -> Your wallet checking -> Your miner when it finishes its current worksize that it has to dump, before it can begin working on your own solution to the next block.
** Assumed processing time to be equal to a hop... with local-paths. (Wallet->miner through loop-back or home net router.)
Total time: 9 * 500ms = 4.5sec to 9 * 4500ms = 40.5sec (Worst perfect world case "time-out". Up to minutes in reality, but rare.)
That same path as UPD delivery would be 50ms to 1200ms... (Again, assuming the 20ms loopback but including processing time there.)
Total time: 9 * 50ms = 0.45sec to 9 * 1200ms = 10.8sec (In a perfect world UDP expire time.)
Thus, higher diffs to allow time for them to traverse the net faster. (Faster as opposed to flooding, which causes further delays and out-of-order sequence delivery. Thus, less TCP "resends" of broken or undeliverable packets.)
Another thing you could "try", is using the last value of a persons wallet ID (The private key pair value), to determine when that wallet can submit and start looking for a POS solution, when a POS solution is desired. EG, if the last 8 bytes of our key-pair are used to determine this... that is 256 possible submit/start times per 5 minutes... 5*60=300 seconds... 300/256 = 1.171875seconds per byte-value... Assume it it midnight 00:00:00, and my value is 256... I can't find a solution for POS until 00:05, because it is not my time to find a solution, but after 00:00:05, it is my time, and one is still desired by the system... I begin... Now I find one, and it is 00:00:12, I have to wait until 00:00:15 (My next available submit time that I am allowed, otherwise the network will reject it.) It could be submitted before that time, but the network would not accept it until that time. First-come first serve... But by that time, everyone already has it, to begin working off of it, if it was submitted early, had time to distribute, and was still valid. (Eg, another block was not found in that time, that was also valid. Which would leave 254/256th of the network not looking for POS for the next 1.171875 seconds, and 5 minutes before the 1/256th of the network similar to my ID, would send again, at the least.)
Something like that, or...
Force clients to STOP submitting a POW at every 5 minute-mark, while the network waits for 1 POS to be created and submitted, failing after 2 minutes if none are submitted, continuing with POW acceptance/delivery. First valid POS to have the most confirms over the others, wins... (Again, the above could alleviate losses there. Only those available to submit this round, can submit.) You could stall the POW by making the DIFF +0.5 of the normal expected diff for that block, just prior to the time when a POS is expected... or whatever is needed for a diff adjustment for that block to make it a 3-min target, instead of a 1-min target.
Eg, POS "valid if" and expected at times xx:00:xx, xx:05:xx, xx:10:xx, xx:15:xx... thus actual hour does not matter, and seconds don't matter for validity. Just the minute mark.
Might also help if you shot for a 1.5min target for normal blocks. I believe it is 1 minute targets now, which often gives a 30-45 second block-time result, due to luck of the lotto-draw with multiple machines, on average. (That is what my cgminer shows.) EG, 1 min time... Luck of the lotto... we all have to loose the lotto (bad luck) to find no block within 1 min target. Only one of the thousands has to win, to find that winner within less than 1 minute, and there are a lot of winners within a minute of time. Even with auto-adjusted per-block diffs, which could be every even block, adjusted if per-block is too much variation to contend with.