root

Calculate the n-th root of a number

root<return_type>(n, a);

will return the n-th root (index/degree) of a number (radicand). The return_type specifies in which data type the result will be returned in, like shown in below example:

root<int>(3, -34); //-3
root<float>(5, 23123); //7.4612
root<bool>(3, -15); //1
------------------------
root<char>(15, 98756); //'ß'

Last updated