Re: Strange Exception in default Hashtable constructor
- From: "Jon Skeet [C# MVP]" <skeet@xxxxxxxxx>
- Date: 5 Dec 2005 08:41:04 -0800
Nicholas Paldino [.NET/C# MVP] wrote:
> When you use a default hashtable constructor, it assumes a load factor
> of 1. However, because it uses a float for that, it might not be exactly 1
> (even though it is baked into the code as 1).
If it's baked into the code as 1, it should be exactly 1. 1 is exactly
representable in all the various floating point formats .NET has.
I can't think of any floating point conversion that would corrupt that,
or give a false comparison with another value of exactly 1.
This is very odd...
Jon
.
- Follow-Ups:
- Re: Strange Exception in default Hashtable constructor
- From: Nicholas Paldino [.NET/C# MVP]
- Re: Strange Exception in default Hashtable constructor
- References:
- Strange Exception in default Hashtable constructor
- From: Nick Vaughan
- Re: Strange Exception in default Hashtable constructor
- From: Nicholas Paldino [.NET/C# MVP]
- Strange Exception in default Hashtable constructor
- Prev by Date: Re: Simple math program.
- Next by Date: Re: Can you raise an event that doesn't block?
- Previous by thread: Re: Strange Exception in default Hashtable constructor
- Next by thread: Re: Strange Exception in default Hashtable constructor
- Index(es):
Relevant Pages
|