Mini proposal: rename float.min to float.min_normal

2009-10-23 Thread Don
This is another small imperfection we should get rid of. The floating point types have a property called ".min", but unlike the integer ".min", it's not the minimum! This naming stupidity is inherited from C++. The minimum float is -float.max. Instead, float.min is the minimum representable posi

Re: Mini proposal: rename float.min to float.min_normal

2009-10-23 Thread #ponce
I agree, when i had to type float.min i was confused it it was the smallest subnormal or smallest normal float

Re: Mini proposal: rename float.min to float.min_normal

2009-10-23 Thread Lars T. Kyllingstad
Don wrote: This is another small imperfection we should get rid of. The floating point types have a property called ".min", but unlike the integer ".min", it's not the minimum! This naming stupidity is inherited from C++. The minimum float is -float.max. Instead, float.min is the minimum repres

Re: Mini proposal: rename float.min to float.min_normal

2009-10-23 Thread Ali Cehreli
Don Wrote: > The floating point types have a property called ".min", but unlike the > integer ".min", it's not the minimum! That bothered me too when I was writing about it before; I felt embarrassed when explaining that it was not actually the minimum. :) Ali

Re: Mini proposal: rename float.min to float.min_normal

2009-10-23 Thread bearophile
Don: > such as X86_64 and D_InlineAsm_X86< I don't like the identifier that denotes D2 code ("D_Version2"). > If there is no objection to this, I will create a patch. It's very simple. I usually like all your proposals about floating point numbers :-) Bye, bearophile

Re: Mini proposal: rename float.min to float.min_normal

2009-10-23 Thread Andrei Alexandrescu
Don wrote: This is another small imperfection we should get rid of. The floating point types have a property called ".min", but unlike the integer ".min", it's not the minimum! I've always hated that with a passion. Yes Don, great initiative. Let's change that crap once and for all. I'd consi

Re: Mini proposal: rename float.min to float.min_normal

2009-10-24 Thread Jeremie Pelletier
bearophile wrote: Don: such as X86_64 and D_InlineAsm_X86< I don't like the identifier that denotes D2 code ("D_Version2"). I never use it either, this identifier is rather pointless. Both compilers will still parse both conditions and errors on the branch for the other version. If the

Re: Mini proposal: rename float.min to float.min_normal

2009-10-24 Thread bearophile
Jeremie Pelletier: > I never use it either, this identifier is rather pointless. Both > compilers will still parse both conditions and errors on the branch for > the other version. Sorry, as usual I want not precise enough, I meant I don't like the name of that identifier, but I use that funct

Re: Mini proposal: rename float.min to float.min_normal

2009-10-24 Thread Don
Jeremie Pelletier wrote: I agree, its a good change! I would also change float.min to be an alias of -float.max. Unfortunately, we can't do that yet, it would silently change the meaning of existing code. Hopefully it can be done eventually.

Re: Mini proposal: rename float.min to float.min_normal

2009-10-28 Thread Don
Don wrote: This is another small imperfection we should get rid of. The floating point types have a property called ".min", but unlike the integer ".min", it's not the minimum! This misnaming is bad because (a) it causes confusion; and (b) it interfere with generic code, requiring special cas

Re: Mini proposal: rename float.min to float.min_normal

2009-10-28 Thread Jason House
Don Wrote: > Don wrote: > > This is another small imperfection we should get rid of. > > The floating point types have a property called ".min", but unlike the > > integer ".min", it's not the minimum! > > > This misnaming is bad because (a) it causes confusion; and (b) it > > interfere with ge