Steppable 0.0.1
A CAS project written from scratch in C++
Loading...
Searching...
No Matches
steppable::__internals::calculus Namespace Reference

Contains calculus functions. More...

Functions

std::string romberg (const std::function< std::string(std::string)> &f, const std::string &a, const std::string &b, int max_steps, int decimals)
 Calculates the Romberg integration of f.
 

Detailed Description

Contains calculus functions.

Function Documentation

◆ romberg()

std::string steppable::__internals::calculus::romberg ( const std::function< std::string(std::string)> & f,
const std::string & a,
const std::string & b,
int max_steps,
int decimals )

Calculates the Romberg integration of f.

Parameters
fThe function to integrate. It takes in one argument and returns a string.
aLower bound of integral.
bUpper bound of integral.
max_stepsMaximum steps of integral. More steps can produce higher accuracy, but takes a longer time.
decimalsThe decimals to output.
Returns
The result of the integral.
Note
The function must take in exactly ONE argument, in the form of std::string. The output must be a std::string object. Wrap your function in a lambda expression if it takes more arguments, or outputs in a different type.
Here is the call graph for this function:
Here is the caller graph for this function:
Untitled