From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7a434e753b9dd044,start X-Google-Attributes: gid103376,public From: "Mark D. McKinney" Subject: Re: Time_Span divide question Date: 1997/05/15 Message-ID: <337BD41B.2FE1@mail.us.net>#1/1 X-Deja-AN: 241816738 References: <5lg555$rba3@castor.cca.rockwell.com> Organization: US Net - MD,DC,VA ISP - info@us.net Reply-To: mckmark@mail.us.net Newsgroups: comp.lang.ada Date: 1997-05-15T00:00:00+00:00 List-Id: > D1 := 0.495; > D2 := 0.500; > Put_Line ("Duration divide result: " & Integer'Image(Integer(D1/D2))); D1 / D2 = 0.990 Integer(D1/D2) = 1 > > TS1 := To_Time_Span (D1); > TS2 := To_Time_Span (D2); > Put_Line ("Time_Span divide result: " & Integer'Image(TS1/TS2)); To_Time_Span(D1) = Integer(D1) = 0 To_Time_Span(D2) = Integer(D2) = 1 TS1 / TS2 = 0 Yes they should be different. Careful where rounding occurs.