Commit ea30963b authored by Manon Eugénie Voisin--Leprince's avatar Manon Eugénie Voisin--Leprince
Browse files

change readme HW2

parent 1b5df869
......@@ -16,20 +16,32 @@ In order to get the help:
./compute_series --help
The arguments that can be provided are the following :
--series_type : pi/arithmetic/integral_cos/integral_sin/integral_cube (Default pi)
--dumper_type : print or write (Default print)
--output : cout or filename (Default cout)
--freq : int, output frequency of the serie value. (Default 10)
--maxiter: int, maximal series iteration. (Default 1000)
--precision: number of digits to use (Default 5)
--delimiter: separator to use for produced files (Default " ")
--integral_bound_inf: bound inf of integral
--integral_bound_sup: bound sup of integral
- --series_type : pi/arithmetic/integral (Default pi)
- --function : cube/cos/sin
- --dumper_type : print or write (Default print)
- --output : cout or filename (Default cout)
- --freq : int, output frequency of the serie value. (Default 10)
- --maxiter: int, maximal series iteration. (Default 1000)
- --precision: number of digits to use (Default 5)
- --delimiter: separator to use for produced files (Default " ")
- --integral_bound_inf: bound inf of integral
- --integral_bound_sup: bound sup of integral
In order to run the program, at least one argument has to be provided.
Examples:
./compute_series --series_type arithmetic --dumper_type write
- ./compute_series --series_type arithmetic --dumper_type write
./compute_series --series_type integral_sin --dumper_type write --integral_bound_inf 0 --integral_bound_sup pi/2
- ./compute_series --series_type integral --function sin --dumper_type write --integral_bound_inf 0 --integral_bound_sup pi/2
......@@ -89,7 +89,7 @@ int main(int argc, char **argv) {
func = [](double i) { return i * i * i; };
} else if (function == "cos") {
func = [](double i) { return cos(i); };
} else if (series_type == "sin") {
} else if (function == "sin") {
func = [](double i) { return sin(i); };
}
series = std::make_unique<RiemannIntegral>(func, bound_inf, bound_sup);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment