Boost logo

Boost :

From: Dave Steffen (dgsteffen_at_[hidden])
Date: 2007-12-18 16:58:58


On Monday 17 December 2007, Kevin Lynch wrote:
> Andreas Harnack wrote:
> > If you think that this doesn't belong to the standard, then
> > please allow me to ask one question: Why is there a complex
> > number class in the standard and what does it actually do?
>
> There are a number of fundamental differences: the operations on
> complex numbers provided for in the standard covers exactly the same
> domain of tasks as are covered by the built-in floating point types.
> Standardization is possible because implementing those operations for
> complex in a numerically stable and efficient way is relatively simple
> (although even that can go astray pretty rapidly), and the "best"
> storage format of complex numbers on the hardware has long been well
> understood and agreed upon. Even the class interface can be agreed upon
> pretty trivially, and with minimal impact on implementation flexibility.

  Right. In addition, there is a precedent, in that Fortran supports
  complex number types natively. They're not uncommon in numerical
  code, and fairly easy to get right (and to get people to agree on
  the interface).

  Note, however, that nobody ever tries to standardize what
  sqrt(complex) means, because that's a vastly more compex problem
  (pun intended), and because people who need that sort of thing will
  go find a specialized library that supports it.

  

-- 
Dave Steffen - Software Engineer 4
Numerica Corporation (www.numerica.us <http://www.numerica.us/> ) 
4850 Hahns Peak Drive, Suite 200
Loveland, Colorado 80538
main (970) 461-2000 
direct (970) 461-2422 x227
fax (970) 461-2004
Email: dave.steffen_at_[hidden]
This message and any attachments are intended only for the individual
or entity to which the message is addressed.  This is a private
message and may contain privileged information.  If you are neither
the intended recipient nor the agent responsible for delivering the
message to the intended recipient, you are hereby notified that any
review, retransmission, dissemination, or taking of any action in
reliance upon, the information in this communication is strictly
prohibited, and may be unlawful.  If you feel you have received this
communication in error, please notify me immediately by returning this
email to me and deleting it from your computer.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk