![]() |
Blitz Bugs : |
From: Patrick Guio (patrick.guio_at_[hidden])
Date: 2004-04-21 09:19:51
On Wed, 21 Apr 2004, Matthias Holschneider wrote:
Hi Matthias,
There is no implicit casting rule from float to double, you need an
explicit cast like this:
titi = cast<double>(toto);
Cheers,
Patrick
> Dear all,
>
> the following piece of code does not compile
>
> #include <blitz/blitz.h>
> #include <blitz/array.h>
>
> using namespace blitz;
>
> int main (int argc, char * argv[] ) {
> Array<double, 1> titi (10); // double array
>
> Array<float, 1> toto (10); // float array
> toto = 1. ;
>
> titi = toto; // type promotion does not work ?
>
> };
>
> With double instead of float everythin works fine.
>
> Pleas help,
>
> cheers,
>
> Matthias
>
>