January 29, 2013
On 2013-01-29 20:06, Walter Bright wrote:

> I was waiting on incorporating your improvements until after
> std.halffloat was merged into Phobos. This is because the old ones were
> easier to understand, and I wanted them in the repository history.

Oh, please no, not another module at the "std" level.

-- 
/Jacob Carlborg
January 29, 2013
On Tuesday, 29 January 2013 at 19:51:03 UTC, Jacob Carlborg wrote:
> On 2013-01-29 20:06, Walter Bright wrote:
>
>> I was waiting on incorporating your improvements until after
>> std.halffloat was merged into Phobos. This is because the old ones were
>> easier to understand, and I wanted them in the repository history.
>
> Oh, please no, not another module at the "std" level.

+1

David
January 29, 2013
Jacob Carlborg wrote:

> On 2013-01-29 20:06, Walter Bright wrote:
> 
>> I was waiting on incorporating your improvements until after std.halffloat was merged into Phobos. This is because the old ones were easier to understand, and I wanted them in the repository history.
> 
> Oh, please no, not another module at the "std" level.
> 

+11111111
I can't agree more to this, Jacob...
Seriously people... "std.halffloat" ???

-- 
Dejan Lekic
dejan.lekic (a) gmail.com
http://dejan.lekic.org
January 29, 2013
On 29 January 2013 19:06, Walter Bright <newshound2@digitalmars.com> wrote:

> On 1/29/2013 4:31 AM, Don wrote:
>
>> Since it got lost in the old thread on this topic, I'll repost my
>> versions of
>> floatToshort and shortToFloat, which are extremely fast (no unpredictable
>> branches, no lookup tables) and respect the current rounding mode:
>>
>
> I was waiting on incorporating your improvements until after std.halffloat was merged into Phobos. This is because the old ones were easier to understand, and I wanted them in the repository history.
>
>

I'm sure this was mentioned before, but what does halffloat have over std.numeric.CustomFloat?


Thanks
-- 
Iain Buclaw

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


January 29, 2013
On 01/29/2013 11:27 PM, Iain Buclaw wrote:
> I'm sure this was mentioned before, but what does halffloat have over
> std.numeric.CustomFloat?

"These formats are for storage only; all operations on them are performed by first implicitly extracting them to real first."

... whereas HalfFloat extracts to float, and so should be faster, which is probably one of the main goals here.

But since std.numeric was mentioned, why not add HalfFloat there rather than its own separate module?
January 30, 2013
On 1/29/2013 2:27 PM, Iain Buclaw wrote:
> I'm sure this was mentioned before, but what does halffloat have over
> std.numeric.CustomFloat?

There was a long discussion about it, I don't remember if it was in the ng or on github.

January 30, 2013
On Tue, Jan 29, 2013 at 04:36:48PM -0800, Walter Bright wrote:
> On 1/29/2013 2:27 PM, Iain Buclaw wrote:
> >I'm sure this was mentioned before, but what does halffloat have over std.numeric.CustomFloat?
> 
> There was a long discussion about it, I don't remember if it was in the ng or on github.

It was on github. But IIRC no conclusion was ever reached.


T

-- 
Живёшь только однажды.
January 30, 2013
On Tuesday, 29 January 2013 at 22:49:02 UTC, Joseph Rushton Wakeling wrote:
> But since std.numeric was mentioned, why not add HalfFloat there rather than its own separate module?

+1
January 30, 2013
On Tuesday, 29 January 2013 at 22:49:02 UTC, Joseph Rushton Wakeling wrote:
> On 01/29/2013 11:27 PM, Iain Buclaw wrote:
>> I'm sure this was mentioned before, but what does halffloat have over
>> std.numeric.CustomFloat?
>
> "These formats are for storage only; all operations on them are performed by first implicitly extracting them to real first."
>
> ... whereas HalfFloat extracts to float, and so should be faster, which is probably one of the main goals here.
>
> But since std.numeric was mentioned, why not add HalfFloat there rather than its own separate module?


The discussion we had on github agreed that std.halffloat isn't a good place.
But OTOH std.numeric needs a complete overhaul, it's a mess.
It would be a mistake to throw it in there.
January 30, 2013
On 2013-01-30, 09:26, Don wrote:

> The discussion we had on github agreed that std.halffloat isn't a good place.
> But OTOH std.numeric needs a complete overhaul, it's a mess.
> It would be a mistake to throw it in there.

So put it somewhere else for the moment, and move it to std.numeric after
a while? Boy, does that ever sound stupid.

I say stuff it in std.numeric, and announce properly that someone should
probably have look at fixing std.numeric, and that HalfFloat in there may
be the only thing salvageable (not that I know if it is, but that's how
you make it sound).

-- 
Simen