Boost logo

Boost :

Subject: Re: [boost] Determining interest: Pure imaginary number library
From: Vicente Botet (vicente.botet_at_[hidden])
Date: 2011-11-18 09:21:17


Thorsten Ottosen-3 wrote:
>
> Den 18-11-2011 12:17, Vicente Botet skrev:
>>
>> Thorsten Ottosen-3 wrote:
>>>
>>> Den 17-11-2011 12:42, Vicente Botet skrev:
>>>>
>>>> Matthieu Schaller wrote:
>>>>>
>>>>> Dear all,
>>>>>
>>>
>>> Many years ago I proposed
>>>
>>>
>>> http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1869.html
>>>
>>> Maybe it can be of interest.
>>>
>>>
>>
>> How this proposal was received?
>>
>
> As not worth doing. But I couldn't show examples of algorithms that
> where faster than without it.
>
>

I agree that without a clear gain in performances, it will be difficult to
justify the addition.

This is secondary, I see in
http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2004/n1612.pdf that you
proposed a variable i so that

complex_t z = 4.2 + 3.0*i;

is well formed. This variable was removed from n1869, isn't it?

While I like the trick, it could break a lot of code. Could the addition of
a user literal allow to use it as

complex_t z = 4.2 + 3.0i;

Of course, when we have a double and we want an imaginary, 'i' could not be
used anymore, and 1i will be necessary, which is unfortunate

double d;
complex_t z = 4.2 + d*1i;

Just some impressions,
Vicente

--
View this message in context: http://boost.2283326.n4.nabble.com/Determining-interest-Pure-imaginary-number-library-tp4075796p4083441.html
Sent from the Boost - Dev mailing list archive at Nabble.com.

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