28.06.2013 Views

x - Aerospace Computing Lab - Stanford University

x - Aerospace Computing Lab - Stanford University

x - Aerospace Computing Lab - Stanford University

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Complex Functions and Operators in<br />

Fortran<br />

• Relational operators<br />

– Used with if statements to direct the execution<br />

thread.<br />

– Complex algorithm must follow same thread.<br />

– Therefore, compare only the real parts.<br />

– Also, max, min, etc.<br />

• Arithmetic functions and operators:<br />

– Most of these have a mathematical standard<br />

definition that is analytic.<br />

– Some of them are implemented in Fortran.<br />

– Exception: abs<br />

∂u<br />

∂x<br />

= ∂v<br />

∂y =<br />

abs(x + iy) =<br />

<br />

−1 ⇐ x < 0<br />

+1 ⇐ x > 0<br />

<br />

−x − iy ⇐ x < 0<br />

+x + iy ⇐ x ≥ 0 .<br />

– Joaquim Martins – January 12, 2000 – 8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!