Boost logo

Boost :

From: Andy Little (andy_at_[hidden])
Date: 2004-01-09 04:02:21


"Dan W." <danw_at_[hidden]> wrote in message
news:btlmsg$45b$1_at_sea.gmane.org...

> I also have another argument why the dimensional power type should be a
> template plug-in:
>
> e^(-j*pi) = 1.0

Wow even to a non-mathematician that looks a beautiful equation. :-)

My lib won't do non-integer powers.( ie no rational fraction, real), My
workaround is
when you get to that situation use a double. Sorry I cant be more help.
Alternative is a class with runtime float params.

>
> There may be situations where irrational and imaginary powers are
> needed, even when the final result is intended to be every-day
> quantities. Complex powers are not unfathomable.
>
> And another argument for why the numeric representation should be a
> template plug-in: In analog filter equations and digital signal
> processing it is common to use complex numbers in voltage or current
units.
> Impedance == "complex resistance".

I have always had problems with complex numbers... whats so 'complex'?
Also have problems with analogue electonics.

Hows about :

std::complex<q_impedance::R> =
std::complex<q_voltage::V>()/std::complex<q_voltage::I>().
No idea if that would actually work though.... Anybody ...?

regards
Andy Little


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