摘要
通常表达式都是按照运算符的优先级来计算的:优先级高的先计算,优先级低的后计算.但当运算符类型增多后,对表达式的计算就不那么简单了.并且,对于一些较为特殊的表达式,按此方法来计算,其结果还会发生错误.而最低优先直接值法———分析表达式的新方法,应用于此类较为复杂的特殊表达式可充分体现其优越性,不仅计算准确而且计算速度快.最低优先直接值法,其实质是将一个表达式按优先级最低的运算符分为若干块.每块之间的运算相互独立,不存在优先级高低问题.若其中某块的值能决定整个表达式的值,则该表达式的运算可进一步简化.
Generally speaking,the expression is calculated in priority level:the higher priority level is calculated first,and the lower is done later.When the operator type is increased,the calculation to the expression become difficult.Moreover,to some special expressions,the calculation in this way will result some mistakes.However,the Getting the Value Directly by the Lowest Priority Level(VDLPL)-a new method on analysing expressions,is able to show its advantage by analysing the sort of complex and special expression:Not only the result of calculation is precise,but also the calculated speed is very quickly.In fact,the VDLPL is to divide an expression into several pieces by the operator of the lowest priority level.The calculation is independent between every piece.Don't exist the problem of the operator's priority level.If some one piece can settle the value of the expression,the calculation of the expression will be more simple.
出处
《商丘师范学院学报》
CAS
2004年第5期81-83,共3页
Journal of Shangqiu Normal University
关键词
表达式
操作数
运算符
优先级
方向性
expression
operand
operator
priority level
directionality