Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <stdexcept>
- #include <limits>
- extern "C" __declspec(dllexport)
- double myf_math(double a, double x)
- {
- return 1 / sqrt(1 - x);
- }
- extern "C" __declspec(dllexport)
- double myf_1(double eps, double a, double x)
- {
- if (x >= 1)
- return std::numeric_limits<double>::infinity();
- double sum = 1, q = 1;
- for (int n = 1; fabs(q) >= eps; n++)
- {
- q *= (2 * n - 1)*x / 2 / n;
- sum += q;
- }
- return sum;
- }
- extern "C" __declspec(dllexport)
- const char* FName()
- {
- return "1/sqrt(1-x)";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement