首页 | 本学科首页   官方微博 | 高级检索  
     检索      

表达式转换及求值探析
引用本文:杨丽,吴育辉.表达式转换及求值探析[J].安顺学院学报,2020(1):123-127.
作者姓名:杨丽  吴育辉
作者单位:安顺学院电子与信息工程学院
摘    要:表达式求值是数学中的一个基本问题,也是程序设计中的一个常见问题。根据表达式三种表示形式的不同特点,在计算机中进行表达式求值时,通常先将表达式转换为后缀表达式,再对后缀表达式进行求值。文章在分析、对比已有的表达式转换成后缀表达式的方法后,提出利用栈和队列进行转换法、加括号去括号转换法及直接转换法,并对二叉树转换法的转换步骤进行更详细的论述,以期对表达式转换为后缀表达式的方法进行补充和完善。

关 键 词:表达式  转换  求值

An Analysis of Expression Conversion and its Evaluation
YANG Li,WU Yuhui.An Analysis of Expression Conversion and its Evaluation[J].Journal of Anshun College,2020(1):123-127.
Authors:YANG Li  WU Yuhui
Institution:(School of Electronic and Information Engineering,Anshun University,Anshun 561000,Guizhou,China)
Abstract:How to convert and evaluate expressions is not only a basic issue in mathematics,but also a common problem in computer programming.According to the different characteristics of three expressions,when evaluating the expressions in computer programming,the expressions can be often converted into suffix expressions,and then the suffix expressions can be usually evaluated.In this paper,after analyzing,comparing and summarizing the existing methods of converting expressions into suffix expressions,the author proposes some ways to transform expressions,such as transforming by using stacks and queues,by adding parentheses and removing parentheses,and by direct conversion,and the author also illustrates in more details about the transformation steps of binary tree method in this paper.All these ways of expression conversion and its evaluation proposed and discussed in this paper will complement and improve the methods of converting expressions into suffix expressions in computer programming.
Keywords:expression  conversion  evaluation
本文献已被 维普 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号