| 1951 | |
| 1952 | template<class ValueType> |
| 1953 | bool RootCheckIndexFrac(ValueType & x, const ValueType & index, ErrorCode * err) |
| 1954 | { |
| 1955 | if( !index.IsInteger() ) |
| 1956 | { |
| 1957 | // index must be integer |
| 1958 | if( err ) |
| 1959 | *err = err_improper_argument; |
| 1960 | |
| 1961 | x.SetNan(); |
| 1962 | |
| 1963 | return true; |
| 1964 | } |
| 1965 | |
| 1966 | return false; |
| 1967 | } |
| 1968 | |
| 1969 | |
| 1970 | template<class ValueType> |