Implement the "unum" representation in D ?

Richard Davies via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 8 12:38:15 PST 2015


On Friday, 18 September 2015 at 03:19:26 UTC, Nick B wrote:
> On Thursday, 17 September 2015 at 23:53:30 UTC, Anthony Di 
> Franco wrote:
>
>>
>> I read the whole book and did not regret it at all, but I was 
>> already looking for good interval arithmetic implementations. 
>> I found that the techniques are not too different (though 
>> improved in important ways) from what is mainstream in 
>> verified computing.
>

Hi,

I haven't finished the book but have read over half of it and 
browsed the rest. I wanted to add that an implementation of unums 
would have advantages beyond verifiable computing. Some examples 
that spring to mind are:

Using low precision (8-bit) unums to determine if an answer 
exists before using a higher precision representation to do the 
calculation (example briefly discussed in the book is ray 
tracing).

More generally, unums can self-tune their precision which may be 
generally useful in getting high precision answers efficiently.

It is possible for the programmer to specify the level of 
accuracy so that unums don't waste time calculating bits that 
have no meaning.

Parallelisation - floating point ops are not associative but unum 
ops are.

Tighter bounds on results than interval arithmetic or 
significance arithmetic.

These are just a few areas where a software implementation could 
be useful. If you've ever had any issues with floating point, I'd 
recommend reading the book, not just because of the approach it 
proposes to solve these but also because it's very clearly 
written and quite entertaining (given the subject matter).

Richard







More information about the Digitalmars-d mailing list