文本計算器是一款為經常需要使用計算器的工程項目人士而設計的軟件,該軟件使用簡單、方便。
當需要計算數據時,在窗口中輸入整個表達式(表達式可以是加+、減-、乘*、除/、平方^、括號(),以及數學函數組合),按回車后可自動計算出結果,計算方法一目了然,便于查找計算中可能出現的錯誤。
支持的數學函數:cos(), sin(), tg(), ctg(), abs(), sgn() or sign(), sqrt(), ln(),sh() or sinh(), ch() or cosh(), th() or tanh(),cth() or coth(), heaviside()
cordic methods describe essentially the same algorithm that with suitably chosen inputs can be used to calculate a whole range of scientific functions including sin, cos, tan, arctan, arcsin, arccos, sinh, cosh, tanh, arctanh, log, exp, square root and even multiply and divide.
the method dates back to volder [1959], and due to its versatility and compactness, it made possible the microcoding of the hp35 pocket scientific calculator in 1972.
here is some code to illustrate the techniques. ive split the methods into three parts linear, circular and hyperbolic. in the hp35 microcode these would be unified into one function (for space reasons). because the linear mode can perform multiply and divide, you only need add/subtract and shift to complete the implementation.
you can select in the code whether to do the multiples and divides also by cordic means. other multiplies and divides are all powers of 2 (these dont count). to eliminate these too, would involve ieee hackery.