comp.lang.ada
 help / color / mirror / Atom feed
* What's the floating point equivalent of 'first 'last ??
@ 1992-03-24 16:00 dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!cc.utah.edu!eyring
  0 siblings, 0 replies; 2+ messages in thread
From: dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!cc.utah.edu!eyring @ 1992-03-24 16:00 UTC (permalink / raw)


This may be a FAQ, but I wouldn't know where to look for the FAQ
if there was one.

What's the equivalent of 'first and 'last on a floating point type?

It's not 'small and 'large because 'small is the smallest POSITIVE
nonzero number in the type. (ie just above zero)

For example:

	type my_type is range -50.0 .. +75.0;

What I need are attributes which will return the -50.0 and the +75.0.

If it were all my own code I would put in constants, but we are 
interfacing with another code set here, ie I can't change their types.



-- 
>Bob Witmer
>Eyring Corp., Flight Simulation Div.
>Salt Lake City, Utah
>eyring@cc.utah.edu

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: What's the floating point equivalent of 'first 'last ??
@ 1992-03-25 14:35 Arthur Evans
  0 siblings, 0 replies; 2+ messages in thread
From: Arthur Evans @ 1992-03-25 14:35 UTC (permalink / raw)


eyring@cc.utah.edu asks
    What's the equivalent of 'first and 'last on a floating point type?

Answer: 'first and 'last.

Read the book!  Floating point types are explained in ARM 3.5.7 and
operations on them in 3.5.8.  See 3.5.8(3), and also the Note in
3.5.8(19).

Art Evans
----------------------------------------------
Arthur Evans, Jr, PhD		Ada Consultant
461 Fairview Road
Pittsburgh PA  15238-1933
412-963-0839
ae@sei.cmu.edu

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1992-03-25 14:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-03-24 16:00 What's the floating point equivalent of 'first 'last ?? dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!cc.utah.edu!eyring
  -- strict thread matches above, loose matches on Subject: below --
1992-03-25 14:35 Arthur Evans

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox