Description: This project requires you to write a program that imitates a simple desk calculator. Your calculator must be able to accept an infix expression which at least includes (, ), +, -, *, /, %, and ^ (exponentiation operator, a^b = ab ). If the expression is legal, output its value, else output an error message.
Input Specification:
Your program must read test cases from a file “input.txt”. In the file there are several test cases, each occupies one line that contains an infix expression. Proceed until the end of the file.
Output Specification:
For each test case, output to a file “output.txt” in one line the value of that expression (accurate up to two decimal places), or an error message “ERROR IN INFIX NOTATION”.
Platform: |
Size: 40492 |
Author:云从龙 |
Hits:
Description: 数论算法库 C++ 语言实现
代码内容 数论算法库,包括以下算法:
欧几里德算法求a,b的最大公倍数
扩展的欧几里德算法,求出gcd(a,b)和满足gcd(a,b)=ax+by的整数x和y
求解模线性方程 ax ≡ b (mod n) 其中n>0
求解模线性方程组(中国余数定理)
模取幂运算 计算a^b mod n (a,b可能很大)
Miller-Rabin随机性素数测试算法
-Number theory algorithms library C++ Language content code number theory algorithm library, which includes the following algorithms: Euclidean algorithm for a, b of the largest common multiple extended Euclidean algorithm, to derive gcd (a, b) and to meet gcd (a, b) = ax+ by the integer x and y-mode linear equations to solve ax ≡ b (mod n) in which n> 0 solving mode of linear equations (China remainder theorem) mode calculation computing exponentiation a ^ b mod n (a, b may be a lot) Miller-Rabin random prime number testing algorithm Platform: |
Size: 9216 |
Author:henry |
Hits:
Description: This project requires you to write a program that imitates a simple desk calculator. Your calculator must be able to accept an infix expression which at least includes (, ), +, -, *, /, %, and ^ (exponentiation operator, a^b = ab ). If the expression is legal, output its value, else output an error message.
Input Specification:
Your program must read test cases from a file “input.txt”. In the file there are several test cases, each occupies one line that contains an infix expression. Proceed until the end of the file.
Output Specification:
For each test case, output to a file “output.txt” in one line the value of that expression (accurate up to two decimal places), or an error message “ERROR IN INFIX NOTATION”.
-This project requires you to write a program that imitates a simple desk calculator. Your calculator must be able to accept an infix expression which at least includes (,),+,-,*, /,, And ^ (exponentiation operator, a ^ b = ab). If the expression is legal, output its value, else output an error message. Input Specification: Your program must read test cases from a file Platform: |
Size: 39936 |
Author:云从龙 |
Hits:
Description: 大整数类,具有一般整数的几乎所有运算,具体包括:四则运算,输入输出,求模幂,乘法,矩阵求模幂,重载了所有int类型的运算符,int,long 等数据的兼容。使用方法与int,long等类型完全一致。-Large integer type, a general integral for almost all computing, including: four computing, input and output, and modular exponentiation, multiplication, modular exponentiation matrix, all the overloaded operator int type, int, long, such as the compatibility of data. Methods and the use of int, long, such as the type is fully consistent. Platform: |
Size: 6144 |
Author:superred |
Hits:
Description: (繁体中文版)台湾出品不得多得的关于spa dpa 旁道攻击rsa算法的精彩论文。相对国内的一些翻译性质的、粗制滥造的论文,简直是一个天上一个地下。-As information technology has developed rapidly, it provides more convenient life for people. As the result, the security has become the main concern. Recently, user id and password are major methods to protect private information. However, the short password can be broken by hackers. Too long is not easy to memorize. Network traffic-analyzing tool provides the function to gain the user id and password while doing transaction via network. Therefore, low cost Smart Card including user name identification and cryptosystem algorithm has become new trend of
modern society.
The first object of this thesis is to present the design and implementati- on of a 512-bit RSA cryptosystem by using 8051 microcontroller. In RSA cryptosystem algorithm, modular exponentiation is the essential arithmetic operation. However, 8051 microcontroller does not provide the modular exponentiation. In order to complete RSA cryptosystem, this thesis has mentioned that using L-algorithm to transfer to modular mult Platform: |
Size: 524288 |
Author:wang carl |
Hits:
Description: 一个经过本人修改的扩展了许多功能的pl/x编译器,具有求余和求幂运算功能-After I modified an extension of a number of functions pl/x compiler, with the remainder, and exponentiation computing capabilities Platform: |
Size: 299008 |
Author: |
Hits:
Description: Understand and apply exponentiation-Wind chill is the apparent temperature felt by exposed skin on a cold, windy day. Normally, there is a thin layer of warm air
surrounding our bodies, and this warm air helps insulate us from the cold air around us. A strong wind reduces the amount
of insulation by this air layer, so our skin loses heat at a faster rate than it would otherwise. Our skin feels colder, which
makes us feel colder the temperature it "feels like" is the wind chill temperature. For example, if you re exposed to 30°F
air moving at 20 mph, your skin loses heat at the same rate it would in calm 17.4°F air, so the windchill is 17.4°F.
In 2001, the National Weather Service changed the formula used to calculate the wind chill index (the old formula
produced temperatures that were too low). The new formula is:
Wind Chill (in °F) = 35.74+ 0.6215 T- 35.75 (V0.16)+ 0.4275 T (V0.16)
where T is the air temperature in °F and V is the wind velocity in mph. (In case your browser has trouble showing it, V0.16
me Platform: |
Size: 2048 |
Author:Chenli |
Hits:
Description: 这是本人做的关于基于二叉树求算术表达式求值的课程设计,供大家一起学习。表达式求解问题
设计一个程序实现基于二叉树表示的算术表达式的操作。
1、 需求分析
1. 算术表达式的合法输入数据包括变量(A~Z,a~z)、常量(0-9)和二元运算符(+,-,*,/,^(乘幂))。程序对数据输入格式不作要求,用户需自己保证语法正确,详见用户手册说明。
2. 演示程序以人机对话的方式执行,即在计算机上显示提示信息后,由用户在键盘上输入对应的数据或命令,程序将执行相应的操作并显示下一步信息。
3. 程序执行的命令包括:
1)根据用户输入的前缀表达式自动添加括号并建立其自然书写形式的表达式;
2)提示用户给各变量赋值;
3)建立二叉树,并基于二叉树进行求值运算,显示结果。
4. 测试数据
分别输入0 a -91 +a*bc +*5^x2*8x +++*3^x3*2^x2x6并输出结果。
每当输入一个表达式后,程序提示用户赋值,再对表达式求值。
-This is based on I do about binary arithmetic expression evaluation order to curriculum design, for all to learn together. Solving the expression problem
Design a program to achieve that arithmetic expressions based on binary tree operations.
1, needs analysis
1. Arithmetic expression valid input data, including the variable (A ~ Z, a ~ z), constant (0-9) and the binary operators (+,-,*,/,^( exponentiation)). Procedures for data input format is not required, the user must ensure that their grammar is correct, see the user manual instructions.
2. Demo program to man-machine dialogue manner, that is, the computer displays a prompt message, by the user on the keyboard corresponding to the input data or command, the program will execute the corresponding action and displays the next message.
3. Program execution commands include:
1) According to user input automatically add the prefix of an expression in parentheses and the establishment of its natural expression in written for Platform: |
Size: 5120 |
Author:viking |
Hits:
Description: 这也是关于基于算术表达式求值的问题,与上题不一样,希望对有需要的人有用。表达式求解问题
设计一个程序实现基于二叉树表示的算术表达式的操作。
1、 需求分析
1. 算术表达式的合法输入数据包括变量(A~Z,a~z)、常量(0-9)和二元运算符(+,-,*,/,^(乘幂))。程序对数据输入格式不作要求,用户需自己保证语法正确,详见用户手册说明。
2. 演示程序以人机对话的方式执行,即在计算机上显示提示信息后,由用户在键盘上输入对应的数据或命令,程序将执行相应的操作并显示下一步信息。
3. 程序执行的命令包括:
1)根据用户输入的前缀表达式自动添加括号并建立其自然书写形式的表达式;
2)提示用户给各变量赋值;
3)建立二叉树,并基于二叉树进行求值运算,显示结果。
4. 测试数据
分别输入0 a -91 +a*bc +*5^x2*8x +++*3^x3*2^x2x6并输出结果。
每当输入一个表达式后,程序提示用户赋值,再对表达式求值。
-It is also based on the arithmetic expression evaluation on the issue, not the same as the previous question, in the hope useful to those in need. Solving the expression problem
Design a program to achieve that arithmetic expressions based on binary tree operations.
1, needs analysis
1. Arithmetic expression valid input data, including the variable (A ~ Z, a ~ z), constant (0-9) and the binary operators (+,-,*,/,^( exponentiation)). Procedures for data input format is not required, the user must ensure that their grammar is correct, see the user manual instructions.
2. Demo program to man-machine dialogue manner, that is, the computer displays a prompt message, by the user on the keyboard corresponding to the input data or command, the program will execute the corresponding action and displays the next message.
3. Program execution commands include:
1) According to user input automatically add the prefix of an expression in parentheses and the establishment of its natural e Platform: |
Size: 5120 |
Author:viking |
Hits:
Description: 通过M-ary乘方原理和二进制算法原理实现模指数运算-By a power of M-ary principle and principle of achieving the binary modular exponentiation algorithm Platform: |
Size: 1876992 |
Author:nick |
Hits:
Description: 利用大数库写的一个RSA模幂运算的小软件,该软件能够方便的进行RSA模幂运算,并且可以让读者学习大数库的使用方法。-Use of large numbers of a library to write a small RSA Modular Exponentiation software, the software can easily be RSA modular power, and large numbers can help readers learn to use the library. Platform: |
Size: 335872 |
Author:稀有品种 |
Hits:
Description: operations overs Z/pZ [X]
methods using + , x , ast exponentiation over a ring of polynomials
can be used to implements AKS algo Platform: |
Size: 18432 |
Author:nano |
Hits:
Description: 这是一个VC里面编写的信号相乘,数乘,以及指数运算。主要应用于信号与系统的学习。-This is written inside a VC signal multiplied, multiplication, and exponentiation. Signals and systems are mainly used in the study. Platform: |
Size: 2048 |
Author:赵萌萌 |
Hits:
Description: Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.
Platform: |
Size: 531456 |
Author:马军 |
Hits:
Description: 大整数库,实现了大整数之间的四则运算和模、模幂运算以及最大公约数的求解-Large integer library to achieve a large integer arithmetic and between modes, modular exponentiation and the greatest common divisor of the solution Platform: |
Size: 2048 |
Author:林迪 |
Hits:
Description: 使用说明:
1、该计算器对表达式的要求比较严格
2、该计算器默认采用弧度制,计算角度时则要转换:sin(π/6)=0.5
3、括号必须要匹配
4、注意像And这样的运算,前后数值需要括号:(1011)And(1000)
其他说明:
Backspace :删除当前输入的最后一位。
CE :清除当前显示的表达式。
C :清除当前的计算,开始新的计算。
MC :清除存储器中的数据。
MR:调用存储器中的数据。
Mod求模(即整数相除求余数)
And按位与, Or按位或, Xor按位异或
dms度分秒切换
Lsh左移, Not按位取反, Int取整数部分
三角函数运算,cos余弦, sin正弦, tan正切
log常用对数, n!阶乘, ln自然对数,
指数运算,F-E科学计数法开关
-Instructions:
1, the calculator more stringent requirements for expression
2, the calculator defaults to radians, the angle will have to calculate the conversion: sin (π/6) = 0.5
3, the brackets must be matched
4, note that operations such as And, need parentheses around the value: (1011) And (1000)
Other notes:
Backspace: Delete the current input of the last one.
CE: Clear the current display of expression.
C: clear the current calculation, start a new calculation.
MC: Clear memory data.
MR: call data in the memory.
Mod Modulus (division remainder is an integer number)
And by bit and, Or by bit or, Xor bitwise XOR
dms degrees minutes and seconds to switch
Lsh left, Not bitwise negation, Int take the integer part
Trigonometric functions, cos cos, sin sine, tan tangent
log common logarithm, n! factorial, ln the natural logarithm,
Exponentiation, F-E switch in scientific notation Platform: |
Size: 1033216 |
Author:fay |
Hits:
Description: Fast exponentiation calculation, the program includes:
binary expansion
successive squares
the product of the squares for which the corresponding bit is a binary Development Platform: |
Size: 1024 |
Author:feriel |
Hits:
Description: Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems. Platform: |
Size: 531456 |
Author:凝聚了 |
Hits:
Description: Exponentiation
Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.
This problem requires that you write a program to compute the exact value of Rn where R is a real number ( 0.0 < R < 99.999 ) and n is an integer such that 0 < n <= 25.-Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.
This problem requires that you write a program to compute the exact value of Rn where R is a real number ( 0.0 < R < 99.999 ) and n is an integer such that 0 < n <= 25. Platform: |
Size: 144384 |
Author:张立超 |
Hits: