TAILIEUCHUNG - Evaluation of Functions part 5

You evaluate a rational function like R(x) = p 0 + p1 x + · · · + pµ x µ Pµ (x) = Qν (x) q 0 + q 1 x + · · · + q ν xν () | 176 Chapter5. Evaluation ofFunctions Rational Functions You evaluate a rational function like R x P x Qv x Po pix ---- p x qo qix qv xv in the obvious way namely as two separate polynomials followed by a divide. As a matter of convention one usually chooses q0 1 obtained by dividing numerator and denominator by any other q0. It is often convenient to have both sets of coefficients stored in a single array and to have a standard function available for doing the evaluation double ratval double x double cof int mm int kk Given mm kk and cof kk evaluate and return the rational function cof 0 cof 1 x cof mm xmm 1 cof mm 1 x cof mm kk xkk . int j double sumd sumn Note precision Change to float if desired. for sumn cof mm j mm-1 j 0 j sumn sumn x cof j for sumd j mm kk j mm 1 j sumd sumd cof j x return sumn sumd CITED REFERENCES AND FURTHER READING Acton . 1970 Numerical Methods That Work 1990 corrected edition Washington Mathematical Association of America pp. 183 190. 1 Mathews J. and Walker . 1970 Mathematical Methods of Physics 2nd ed. Reading MA . Benjamin Addison-Wesley pp. 361-363. 2 Knuth . 1981 SeminumericalAlgorithms 2nd ed. vol. 2 of TheArtofComputerProgramming Reading MA Addison-Wesley . 3 Fike . 1968 ComputerEvaluation ofMathematicalFunctions Englewood Cliffs NJ PrenticeHall Chapter 4. Winograd S. 1970 Communications on Pure andApplied Mathematics vol. 23 pp. 165-179. 4 Kronsjo L. 1987 Algorithms Their Complexity and Efficiency 2nd ed. New York Wiley . 5 Complex Arithmetic As we mentioned in the lack of built-in complex arithmetic in C is a nuisance for numerical work. Even in languages like FORTRAN that have complex data types it is disconcertingly common to encounter complex operations that produce overflows or underflows when both the complex operands and the complex result are perfectly representable. This occurs we think because software companies assign inexperienced programmers to what they believe to be the

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.