Software Solution for Engineers and Scientist Episode 4

Tham khảo tài liệu 'software solution for engineers and scientist episode 4', kỹ thuật - công nghệ, cơ khí - chế tạo máy phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | 244 Chapter 9 parameter x1 holds first root parameter x2 holds second root returns 1 if roots are complex then solution is x1 -b 2a real part x r x2 - i SQRT bA2 - 4ac 2a double r1 r2 int rootType 0 0 if real 1 if imaginary roots _asm FLD a FLD b FLD c CALL QUAD_FORMULA FSTP r1 FSTP r2 JNC ROOT_EXIT MOV rootType 1 ROOT_EXIT x1 r1 x2 r2 return rootType SOFTWARE ON-LINE The QuadFormulaQ function is contained in the file Calc located in the folder Sample Code Chapter09 Calc Primitives in the book s on-line software. Polar and Cartesian Coordinates In traditional mathematics the study of complex numbers leads directly to an alternative plane of trigonometric representation usually called the polar coordinate system. Conventionally the polar coordinate system is depicted as based on a point called the pole located at the origin of the Cartesian plane and a ray from this pole called the polar axis. The polar axis is usually assumed to lie in the positive direction of the x-axis. A point in the polar coordinate system is defined by its directed angle from the polar axis and its directed distance from the pole. Figure shows the elements of the polar and Cartesian coordinate systems. Applications often require routines for converting coordinate pairs between the polar and the Cartesian systems. Several formulas can be used. The following two formulas allow finding the Cartesian coordinates from the polar form x rcos0 y r sin 0 General Mathematical Functions 245 y Figure Polar and Cartesian Coordinate Systems The following can be used to obtain the polar coordinates from a Cartesian pair tan 0 x r 7x2 y2 The following procedures convert between the polar and the Cartesian coordinate systems. .CODE POLAR_TO_CART PROC Procedure for converting a coordinate pair in polar form to a coordinate pair in Cartesian rectangular form by means of the formulas x r cos A y r sin A where r is the directed distance from the pole A is the directed angle from the .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
242    123    1    01-06-2024
Đã 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.