Skip to content

Commit

Permalink
corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
jwuttke committed Dec 20, 2018
1 parent d258c0f commit 0fa6314
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set(demos
nonlin1
)

foreach(app ${apps})
foreach(app ${demos})
add_executable(${app} ${app}.c)
target_include_directories(${app} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${lmfit_SOURCE_DIR}/lib)
target_link_libraries(${app} ${lmfit_LIBRARY})
Expand Down
9 changes: 4 additions & 5 deletions demo/curve1.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,10 @@ int main()
printf( " t[%2d]=%4g y=%6g fit=%10g residue=%12g\n",
i, t[i], y[i], f(t[i],par), y[i] - f(t[i],par) );

if (status.fnorm<1e-14) {
printf("SUCCESS (obtained norm = %g)\n", status.fnorm);
if (status.outcome<=3) {
printf("SUCCESS\n");
return 0;
} else {
printf("FAILURE (obtained norm = %g is too large)\n", status.fnorm);
return 1;
}
printf("FAILURE\n");
return 1;
}
5 changes: 2 additions & 3 deletions demo/surface1.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ int main()
if (status.fnorm<1e-14) {
printf("SUCCESS (obtained norm = %g)\n", status.fnorm);
return 0;
} else {
printf("FAILURE (obtained norm = %g is too large)\n", status.fnorm);
return 1;
}
printf("FAILURE (obtained norm = %g is too large)\n", status.fnorm);
return 1;
}

0 comments on commit 0fa6314

Please sign in to comment.