diff --git a/src/users/dynscheduler.cpp b/src/users/dynscheduler.cpp
index 1a6263d113ac0eb15cd7d6d61bf6f9aa1511fd24..f0b3b0058fdf2a7aad7571ff9dfc79f5c6c24dd4 100644
--- a/src/users/dynscheduler.cpp
+++ b/src/users/dynscheduler.cpp
@@ -4,8 +4,10 @@
 #include "../pempek_assert.hpp"
 #include "json_workload.hpp"
 #include "loguru.hpp"
+#include <cmath>
 #include <limits>
 #include <map>
+#include <math.h>
 #include <string>
 
 DynScheduler::DynScheduler(Workload *workload, SchedulingDecision *decision,
@@ -86,7 +88,7 @@ void DynScheduler::make_decisions(double date,
         /* Time of next_submission might have changed in response to feedback */
         double new_date_of_next_submission = broker->next_submission(date);
 
-        if (abs(date - new_date_of_next_submission) < .00001)
+        if (new_date_of_next_submission == lround(date))
         {
             submit_broker_jobs(date);
             new_date_of_next_submission = broker->next_submission(date);
@@ -115,7 +117,7 @@ void DynScheduler::on_requested_call(double date)
     ISchedulingAlgorithm::on_requested_call(date);
 
     /* Check if this call concerns the broker */
-    if (broker_enabled && abs(date - broker->next_submission(date)) < .00001)
+    if (broker_enabled && broker->next_submission(date) == lround(date))
     {
         /* Handle the jobs to submit */
         submit_broker_jobs(date);