🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.ada
Article #874

numeric questions

#874
From: Doug Bryan
Date: Thu, 10 Jul 1986 06:35
48 lines
1869 bytes
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?

-------
Technical Details
Message-ID: <12221487462.21.BRYAN@su-sierra.arpa>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!topaz!husc6!seismo!lll-crg!lll-lcc!qantel!hplabs!ucbvax!SU-SIERRA.ARPA!Bryan

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!topaz!husc6!seismo!lll-crg!lll-lcc!qantel!hplabs!ucbvax!SU-SIERRA.ARPA!Bryan
From: Bryan@SU-SIERRA.ARPA (Doug Bryan)
Newsgroups: net.lang.ada
Subject: numeric questions
Message-ID: <12221487462.21.BRYAN@su-sierra.arpa>
Date: Thu, 10-Jul-86 02:35:43 EDT
Article-I.D.: su-sierr.12221487462.21.BRYAN
Posted: Thu Jul 10 02:35:43 1986
Date-Received: Sat, 12-Jul-86 03:02:53 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The ARPA Internet
Lines: 48