add phobos module std.halffloat ?

Walter Bright newshound2 at digitalmars.com
Wed Dec 19 11:50:11 PST 2012


On 12/19/2012 2:13 AM, Iain Buclaw wrote:
> 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.

You'd have to add support for add, sub, mul, div, and compare. The halffloat 
only does conversions.

Other than that, the algorithm used is quite extendible to other IEEE types.



More information about the Digitalmars-d mailing list