|
Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
A babylonian method (BM) is an algorithm that computes the square root. More...
#include <cassert>#include <cmath>#include <iostream>Namespaces | |
| namespace | numerical_methods |
| for assert | |
Functions | |
| double | numerical_methods::babylonian_method (double radicand) |
| Babylonian methods is an iterative function which returns square root of radicand. More... | |
| static void | test () |
| Self-test implementations. More... | |
| int | main (int argc, char const *argv[]) |
| Main function. More... | |
A babylonian method (BM) is an algorithm that computes the square root.
This algorithm has an application in use case scenario where a user wants find accurate square roots of large numbers
| int main | ( | int | argc, |
| char const * | argv[] | ||
| ) |
Main function.
| argc | commandline argument count (ignored) |
| argv | commandline array of arguments (ignored) calls automated test function to test the working of fast fourier transform. |
|
static |
Self-test implementations.
Declaring two test cases and checking for the error in predicted and true value is less than 0.0001.
Testcase 1
Testcase 2
Real Output 1
Real Output 2
Test result for testcase 1
Test result for testcase 2
Testing for test Case 1
Testing for test Case 2