| 1916 | |
| 1917 | template<class ValueType> |
| 1918 | bool RootCheckIndexOne(const ValueType & index, ErrorCode * err) |
| 1919 | { |
| 1920 | ValueType one; |
| 1921 | one.SetOne(); |
| 1922 | |
| 1923 | if( index == one ) |
| 1924 | { |
| 1925 | //root(x;1) is x |
| 1926 | // we do it because if we used the PowFrac function |
| 1927 | // we would lose the precision |
| 1928 | if( err ) |
| 1929 | *err = err_ok; |
| 1930 | |
| 1931 | return true; |
| 1932 | } |
| 1933 | |
| 1934 | return false; |
| 1935 | } |
| 1936 | |
| 1937 | |
| 1938 | template<class ValueType> |