Skip to content

Commit

Permalink
Update code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
caco3 authored Dec 22, 2024
1 parent a93228e commit da03af6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ int ClassFlowCNNGeneral::PointerEvalHybridNew(float number, float number_of_pred
// a number greater than 9.994999 is returned as 10, this leads to an error during the decimal shift because the NUMBERS[j]->ReturnRawValue is one digit longer.
// To avoid this, an additional test must be carried out, see lines 99 to 106
// Another alternative would be "result = (int) ((int) trunc(round((number+10 % 10)*1000))) / 1000;", which could, however, lead to other errors?
result = (int) ((int) trunc(round((number+10 % 10)*100))) / 100;
result = (int) ((int) trunc(round((number+10 % 10)*100)) ) / 100;

LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "PointerEvalHybridNew - No predecessor - Result = " + std::to_string(result) +
" number: " + std::to_string(number) + " number_of_predecessors = " + std::to_string(number_of_predecessors)+ " eval_predecessors = " + std::to_string(eval_predecessors) + " Digit_Uncertainty = " + std::to_string(Digit_Uncertainty));
Expand Down

0 comments on commit da03af6

Please sign in to comment.