polar

From WeBWorK
Jump to: navigation, search


Description

polar

Syntax

polar(cplx, r_format=>fmt, theta_format=>fmt)

Params

cplx is a complex number object (e.g. created with $cplx= new Complex(1,1) )
fmt is a perl (C like format specification) such as "%0.5f" -- 5 decimal place fixed point number

Options

Option key Option value Default
r_format the format for the modulus, r (or rho) "%0.3f"
theta_format the format for the argument, theta "%0.3f"

Action

Calculates the polar representation of the complex number

Returns

A string representing the complex number using "e to the i theta" notation
follow us