Talk:Ada Programming/Types/delta

Rework needed!
Randy Brukardt said this on c.l.a (10.v.2006, thread 'Ada decimal types'):

There is no such thing as "binary fixed point"! There is "ordinary fixed point" and "decimal fixed point". For all fixed point types, the "small" is the smallest value that can be exactly represented. Other values are multiples of the small. (The only effect of the delta is to provide guidance for the *default* selection of the small value; the only thing that matters is the small value). For "ordinary fixed point", the small value can be anything. The *default* is a power of two, but it can be specified as any value (including powers of ten). For "decimal fixed point", the *default* small value is a power of ten.

The representation of the multiples of small can be anything that the compiler wants to use (and this may, but doesn't have to vary between ordinary and decimal fixed point types). Typically, the representation is some binary integer representation.

It is possible for a compiler to reject specifying a small of 1.0e-6. That would be a pretty lame Ada 95 compiler, IMHO, given that it has to be supported in decimal types. Ada 83 compilers used to reject these because there were impossible precision requirements for mixed multiplies (these were changed in Ada 95), so there may be some Ada myths about avoiding the specification of small values.

I think that *all* ordinary fixed point types should have 'Small specified, because then there is no surprise or guesswork as to what precision is being used.

I was going to suggest that you read some online resources, but I wasn't able to find any that explain this correctly (other than the RM, and I wouldn't suggest starting there!). Specifically, the wikibook entry is over-simplified to the point of being wrong. I hope someone has the time to correct it on the lines I give above.

Sjw 05:39, 11 May 2006 (UTC)


 * Its' a wiki - everybody can redo it - you too. There is no need for critisim on the Talk page - just hit edit and correct it - talk pages are only needed when there is a dispute of some sort. --Krischik T 18:10, 11 May 2006 (UTC)


 * Was intended as a reminder that one of us needs to do something, but it's not going to be me this week! --Sjw 18:37, 11 May 2006 (UTC)