TAILIEUCHUNG - Special Functions part 10

The most convenient way of evaluating these functions to arbitrary precision is to use power series for small x and a continued fraction | Fresnel Integrals Cosine and Sine Integrals 255 Fresnel Integrals Cosine and Sine Integrals Fresnel Integrals The two Fresnel integrals are defined by C x fx cos t2 dt Jo V2 7 x dt o The most convenient way of evaluating these functions to arbitrary precision is to use power series for small x and a continued fraction for large x. The series are n2 x5 m4 x9 C x x - U 5 2 U 9 s x i vxL - i V _xl i V -xiL 27 3 1 W 7-3 2 11 -5 There is a complex continued fraction that yields both S x and C x simultaneously 1 i C x iS x - erf z z 1 - i x where Z erfc z -LIZ -L -L. y y z z z z z 2z 7 1 p V 2z2 1 - 2z2 5 - 2z2 9 - In the last line we have converted the standard form of the continued fraction to its even form see which converges twice as fast. We must be careful not to evaluate the alternating series at too large a value of x inspection of the terms shows that x is a good point to switch over to the continued fraction. Note that for large x C x I---sin x2 2 x 2 S x 2 - 1 cos x Sample page from NUMERICAL RECIPES IN C THE ART OF SCIENTIFIC COMPUTING ISBN 0-521-43108-5 Thus the precision of the routine frenel may be limited by the precision of the library routines for sine and cosine for large x. 256 Chapter 6. Special Functions include include define EPS define MAXIT 100 define FPMIN define XMIN define PI define PIBY2 PI Here EPS is the relative error MAXIT is the maximum number of iterations allowed FPMIN is a number near the smallest representable floating-point number XMIN is the dividing line between using the series and continued fraction. define TRUE 1 define ONE Complex void frenel float x float s float c Computes the Fresnel integrals S x and C x for all real x. void nrerror char error_text int k n odd float a ax fact pix2 sign sum sumc sums term test fcomplex b cc d h del cs ax fabs x if ax sqrt FPMIN Special case avoid failure of convergence s

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.