On 15 March 2013 15:15, Johannes Pfau <[email protected]> wrote:

> writefln("%f\n%f", cast(float)cast(int)float.infinity, float.infinity);
>
> writes
> ---
> 2147483648.000000
> inf
> ---
>
> -fdump-tree-original
> ---
> writefln ({.length=5, .ptr="%f\n%f"}, 2.147483647e+9,  Inf);
> ---
>
> The same conversion at runtime produces the expected result.
>
> Is this a gdc or gcc bug or is this expected?
>

GCC bug, try the same in C and see if it produces the same result.

-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';

Reply via email to