On 19 December 2012 08:55, Walter Bright <newshound2@digitalmars.com> wrote:
On 12/19/2012 12:47 AM, Alex Rønne Petersen wrote:
On 19-12-2012 08:35, Jacob Carlborg wrote:
On 2012-12-19 08:30, Walter Bright wrote:
https://github.com/D-Programming-Language/phobos/pull/1018/files

Cool, Walter does a pull request. Should this be put in the review queue
or is this a small enough change to be added anyway?


Seems a bit overkill to throw it in the review queue, but I don't know how
rigorous we want to be about that.

Probably the main point of this module is to demonstrate how to do new arithmetic types like this without needing compiler support. It also shows how to do IEEE floating point rounding correctly, which is not obvious and not trivial.


How difficult would you think it would be to scale down (or up) this library type so it can be an emulated IEEE type of any size? (The whole shebang eg: quarter, half, single, double, quad, double-quad, 80bit and 96-bit).   Just interested as I think that a module which implements an IEEE floating point type that produces constant results cross-platform would be better than a dedicated module just for half float types.


--
Iain Buclaw

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