On Thursday, April 30, 2015 at 8:21:21 PM UTC-4, Páll Haraldsson wrote: 
>
> I've also been think about the numeric tower. Is this for sure ok:
>
> abstract DecimalFloatingPoint <: FloatingPoint
>

Yes, because it is a floating-point type (as opposed to fixed-point, or 
Rational, ...).     All floating-point types, regardless of width or base 
(10 or 2), have many properties in common, and in particular the defining 
property is that they are within a bounded relative error of every real 
number until over/underflow.  This makes error analysis consistent across 
all floating point types, and means that algorithms designed for one 
floating-point type will tend to be applicable to other floating-point 
types, whereas they are unlikely to be applicable to rational (num,den) or 
fixed-point representations (which have vastly worse error-growth 
characteristics).

> I'm also thinking about other decimal types, arbitrary precision. they 
need no NaN (is the NaN the same for binay and decimal..?). Do not think 
BigFloat has NaN > and that can be under FloatingPoint so again, maybe I'm 
just confused.

BigFloat has NaN, and so does DecFP.  No, the binary representations of NaN 
are not the same in the IEEE binary and decimal floating-point types.


Reply via email to