comp.lang.ada
 help / color / mirror / Atom feed
* choice of fixed point type
@ 2000-03-01  0:00 tmoran
  2000-03-03  0:00 ` tmoran
  0 siblings, 1 reply; 7+ messages in thread
From: tmoran @ 2000-03-01  0:00 UTC (permalink / raw)


Why does
    type duration is delta 1.0E-13 range 0.0 .. 0.000_1;
    f : float;
    i : integer := 10_000;
begin
    f := float(0.000_0001/i);
    ada.text_io.put_line(float'image(f));
    f := float(duration'(0.000_0001)/i);
    ada.text_io.put_line(float'image(f));
    f := 0.000_0001/float(i);
    ada.text_io.put_line(float'image(f));
print
 0.00000E+00
 9.94760E-12
 1.00000E-11

   Is <universal real> / <integer> always treated as a call on
function "/"(Left : Standard.Duration; Right : Integer)
return Standard.Duration;  ?




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

end of thread, other threads:[~2000-03-06  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-01  0:00 choice of fixed point type tmoran
2000-03-03  0:00 ` tmoran
2000-03-04  0:00   ` Richard D Riehle
2000-03-05  0:00     ` tmoran
2000-03-06  0:00       ` Robert Dewar
2000-03-06  0:00         ` David W. Glessner
2000-03-06  0:00           ` tmoran

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