Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <stdexcept>
- double karimli_func(double init, const double eps, const double x) // функция считает косинус
- {
- double q = init;
- for (int n = 1; fabs(q) >= eps; n++)
- {
- q *= -x * x / 2 / n / (2 * n - 1);
- init += q;
- }
- return init;
- }
- extern "C" __declspec(dllexport)
- double myf_math(double x, double a) // функция считает косинус в кубе
- {
- return cos(x)*cos(x)*cos(x);
- }
- extern "C" __declspec(dllexport)
- double myf_1(double eps, double x, double a) // функция считает косинус в кубе
- {
- double cos = karimli_func(1, eps, x);
- return cos*cos*cos;
- }
- extern "C" __declspec(dllexport) // функция возвращает имя мат функции
- const char* FName()
- {
- return "cos^3(x)";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement