Python Analog Casio Complex calculator "in construction"

Source: Internet
Author: User
Tags sin cos
1. Pre-preparation for the parentheses have such a rule:

--Only ( can be more than ) the number, at this time at the end of the line complement).

--Take the mold |...| cannot be nested. (There is no problem with Casio, because you will get two | Each time you press the modulo key, so you can define their size)

The calculator has the following functions:

--Basic subtraction: 1+2, 3/4

-Power: 3^2

--Take the mold: |-2|

--Imaginary I:2i

--take conjugate, amplitude angle: CJG (), Arg ()

--Trigonometric functions sin cos tan

--Multi-expression separation: 2+3:

--Variable and stored value: a+3, 2+3>a

--The answer automatically stored value: 3+2:ans-4 (==1)

Analysis method

We can divide a number into four parts:

--Positive sign part: [++--+-++-]

--Digital part: [215.2145]

--Variables and imaginary units part: [ANSANSABAIIIANSCJG (...) Arg (...)], which is multiplied here. For a "number", the second or third part must appear one time, otherwise it will be an error.

--Operator Part: *, ^,: ... When processing, it will be considered as an expression terminator, which can be easily judged by human addition, but the user cannot use the following: as the end.

Processing methods

Character by Word, dispatch field, these will not be discussed.

For an error, be sure to point out the wrong location. This preparation takes a variable to count.

Python Analog Casio Complex calculator "in construction"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.