added: to the parser: function frac() - remains fraction
git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@230 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -1390,6 +1390,15 @@ void Avg(int sindex, int amount_of_args, ValueType & result)
|
||||
}
|
||||
|
||||
|
||||
void Frac(int sindex, int amount_of_args, ValueType & result)
|
||||
{
|
||||
if( amount_of_args != 1 )
|
||||
Error( err_improper_amount_of_arguments );
|
||||
|
||||
result = stack[sindex].value;
|
||||
result.RemainFraction();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1596,6 +1605,7 @@ void CreateFunctionsTable()
|
||||
InsertFunctionToTable("bxor", &Parser<ValueType>::BitXor);
|
||||
InsertFunctionToTable("sum", &Parser<ValueType>::Sum);
|
||||
InsertFunctionToTable("avg", &Parser<ValueType>::Avg);
|
||||
InsertFunctionToTable("frac", &Parser<ValueType>::Frac);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user