Browse Source

Added explicit casts to C-style casts

Former-commit-id: 0838166237
tempestpy_adaptions
PBerger 11 years ago
parent
commit
19ca7bedaa
  1. 4
      src/counterexamples/PathBasedSubsystemGenerator.h

4
src/counterexamples/PathBasedSubsystemGenerator.h

@ -588,7 +588,7 @@ public:
// estimate the path count using the models state count as well as the probability bound // estimate the path count using the models state count as well as the probability bound
uint_fast8_t const minPrec = 10; uint_fast8_t const minPrec = 10;
uint_fast64_t const stateCount = model.getNumberOfStates(); uint_fast64_t const stateCount = model.getNumberOfStates();
uint_fast64_t const stateEstimate = ((T) stateCount) * bound;
uint_fast64_t const stateEstimate = static_cast<uint_fast64_t>((static_cast<T>(stateCount)) * bound);
// since this only has a good effect on big models -> use only if model has at least 10^5 states // since this only has a good effect on big models -> use only if model has at least 10^5 states
uint_fast64_t precision = stateEstimate > 100000 ? stateEstimate/1000 : minPrec; uint_fast64_t precision = stateEstimate > 100000 ? stateEstimate/1000 : minPrec;
@ -688,7 +688,7 @@ public:
break; break;
} }
else if (stateEstimate > 100000){ else if (stateEstimate > 100000){
precision = (stateEstimate/1000) - ((stateEstimate/1000) - minPrec)*(subSysProb/bound);
precision = static_cast<uint_fast64_t>((stateEstimate / 1000.0) - ((stateEstimate / 1000.0) - minPrec) * (subSysProb/bound));
} }
} }
} }

Loading…
Cancel
Save