Skip to content

Commit

Permalink
fix(SNSBD-2): fix logs formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
pjazdzyk committed Aug 3, 2023
1 parent 268ff32 commit b3d47c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<groupId>com.synerset</groupId>
<artifactId>brent-dekker-solver</artifactId>
<version>1.1.3</version>
<version>1.1.4</version>

<name>Brent Dekker Solver</name>
<description>The algorithm for finding roots of continuous and single-variable math functions,
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/synerset/brentsolver/BrentSolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,17 @@ public BrentSolver(String id, DoubleFunction<Double> userFunction, int evalX2Div
* @return actual root value
*/
public final double findRoot() {
LOGGER.info("-----[{}] CALCULATION IN PROGRESS-----", id);
if(showDiagnostics) LOGGER.info("-----[{}] CALCULATION IN PROGRESS-----", id);
// To check and set value b as being closer to the root
checkSetAndSwapABPoints(a0, b0);
// In case provided by user point "a" or "b" is actually a root
if (Math.abs(f_b) < accuracy) {
LOGGER.info("CALCULATION COMPLETE. INITIAL VALUE IS A ROOT");
if(showDiagnostics) LOGGER.info("CALCULATION COMPLETE. INITIAL VALUE IS A ROOT");
return b;
}
// If solver were stopped
if (!runFlag) {
LOGGER.info("!!CALCULATION STOPPED!!");
if(showDiagnostics) LOGGER.info("!!CALCULATION STOPPED!!");
return b;
}
// Checking if Brent AB condition is not met to launch automatic AB points evaluation procedure
Expand Down Expand Up @@ -185,7 +185,7 @@ public final double findRoot() {
}

// b is always closer to the root
LOGGER.info("-----[{}] CALCULATION FINISHED-----", id);
if(showDiagnostics) LOGGER.info("-----[{}] CALCULATION FINISHED-----", id);
return b;
}

Expand Down

0 comments on commit b3d47c3

Please sign in to comment.