Initial commit
This commit is contained in:
29
functions.cpp
Normal file
29
functions.cpp
Normal file
@@ -0,0 +1,29 @@
|
||||
#include <cmath>
|
||||
|
||||
// 1.1 e^(x - 1) - x^3 - x
|
||||
double function_1(double x)
|
||||
{
|
||||
return std::exp(x - 1) - std::pow(x, 3) - x;
|
||||
}
|
||||
|
||||
|
||||
// 1.2 1 / (3 + sin(3.6x))
|
||||
double function_2(double x)
|
||||
{
|
||||
return 1 / (3 + std::sin(3.6 * x));
|
||||
}
|
||||
|
||||
|
||||
// 1.3 arccos(x) - √(1 - 0.3x^3)
|
||||
double function_3(double x)
|
||||
{
|
||||
return std::acos(x) - std::sqrt(1 - 0.3 * std::pow(x, 3));
|
||||
}
|
||||
|
||||
|
||||
// 1.9 0.25x^3 + x - 2
|
||||
double function_9(double x)
|
||||
{
|
||||
return 0.25 * std::pow(x, 3) + x - 2;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user