--- Comment #1 from David Simcha <> 2009-11-16 20:15:34 PST ---
Okay, I've gotten a good start on debugging this by pragma'ing the bitfield
code and pasting it in to temporarily get rid of the mixin.  The assert failure
is in setting the exponent:

void exponent(uint v){
    assert(v >= exponent_min);
    assert(v <= exponent_max);  // FAILS
    signfractionexponent = cast(typeof(signfractionexponent))
((signfractionexponent & ~49152U) | ((cast(typeof(signfractionexponent)) v <<
14U) & 49152U));

The problem appears to be overflow in the following code in opAssign:

exponent = cast(typeof(exponent_max))
    (value.exponent + (bias - value.bias));

If the result is negative, we get overflow.  Instead, this should probably
result in a denormal or something.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to