#basic function

3 messages · Page 1 of 1 (latest)

rapid daggerBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

#
How to Format Code on Discord
Markup

```cpp
int main() {}
```

Result
int main() {}
hollow fable
#
#include <iostream>
#include <cmath>

double arct(double x) {
    return atan(x) - 1;
}
double darct(double x) {
    return 1 / (1 + x*x);
}

double poly(double x) {
    return x*3 + 2*x*2 + 10*x - 20;
}
double dpoly(double x) {
    return 3*x*x + 4*x + 10;
}

double lincos(double x) {
    return cos(x) - x;
}
double dlincos(double x) {
    return -1*sin(x) - 1;
}

double tanf(double x) {
    return tan(x) - (1 / (1 + x*x));
}
double dtanf(double x) {
    return cos(x)*(-2) + (2*x) / (1 + x*x)*2;
}