[net.lang.ada] numeric questions

Bryan@SU-SIERRA.ARPA (Doug Bryan) (07/10/86)

I have a number of questions concerning numeric types.  I would appreciate
any help with these.  Send your responses to me, and I'll send the results
to info-ada.


I. 
Are all numeric base types anonymous?  For instance, 

	type Int is range 1 .. 10;

Int'Base'First = -32_768 and Int'Base'Last = 32_767 is perfectly
understandable.  But must it be true that (assume Short_Integer and
Long_Integer are predefined):

	Short_Integer'First = Short_Integer'Base'First
	Short_Integer'Last  = Short_Integer'Base'Last
	Integer'First       = Integer'Base'First
	Integer'Last        = Integer'Base'Last
	Long_Integer'First  = Long_Integer'Base'First
	Long_Integer'Last   = Long_Integer'Base'Last


II. 
Concerning safe numbers, consider:

	type F is digits 4;

May it be true that F'Safe_Small < F'Small?  May safe numbers exist within
a model interval?  (All model numbers are also safe numbers, this much I 
understand.)  Could one say that

	The safe numbers of a type are those numbers which the base type
	can represent exactly.

Must it be true that
	
	Float'Safe_Small      = Float'Small
	Float'Base'Safe_Small = Float'Small
	Float'Base'Digits     = Float'Digits

for all predefind, named floating point types?

doug

p.s. Does anyone know who maintains the IG?

-------