On Thu, Apr 9, 2009 at 5:46 AM, Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote: > Paul D. Anderson wrote: >> >> Walter Bright Wrote: >> >>> Paul D. Anderson wrote: >>>> >>>> b) the features and functions that should be included. >>> >>> I'd say NaNs and unordered comparisons. In other words, it should support >>> the same semantics as float, double and real do. >>> >>> If you've got the time and interest, adding all the functions in std.math >>> would be great! >> >> I'm not sure I can sign up for ALL of std.math. I'm sure I'll need >> help. I can do roots, powers and transcendental functions, though. >> Maybe not very efficiently (power series). >> >> (If very high precision numbers are questionable, how valuable are >> high precision sine and cosine??) >> >> Paul > > Would be great if we could enlist Don's help. Don? :o) > > In only slightly related news, the "new, new" Phobos2 offers custom > floating-point numbers, see > > http://erdani.dreamhosters.com/d/web/phobos/std_numeric.html > > They aren't infinite precision (which makes their utility orthogonal on > bigfloat's), but they allow fine tweaking of floating point storage. Want to > cram floats in 16 or 24 bits?
Awesome. So we can use it to create the IEEE Halfs that are used by graphics cards? > Care about numbers in [0, 1) at maximum > precision? Give CustomFloat a shot. By this do you mean you can get a fixed point format? (i'm guessing so, just by setting exp bits to zero.) If so, then that's very cool too. --bb