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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.52.108.131 with SMTP id hk3mr16972100vdb.6.1411750006625; Fri, 26 Sep 2014 09:46:46 -0700 (PDT) X-Received: by 10.50.61.132 with SMTP id p4mr789307igr.1.1411750006426; Fri, 26 Sep 2014 09:46:46 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!k15no47298qaq.1!news-out.google.com!rp1ni712igb.0!nntp.google.com!h15no7391529igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 26 Sep 2014 09:46:45 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7ab81f91-af1f-4fb1-8aef-c7f692e22f38@googlegroups.com> Subject: Re: Integers and Mathematical Correctness From: Adam Beneschan Injection-Date: Fri, 26 Sep 2014 16:46:46 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.dca.giganews.com comp.lang.ada:189179 Date: 2014-09-26T09:46:45-07:00 List-Id: On Friday, September 26, 2014 2:07:32 AM UTC-7, vincent....@gmail.com wrote: > 1. It is not consistent with modular types : > > A = (A/B)*B + (A rem B) is not true for modular types. So modular types > should not have a "rem" operator. Actually, I question whether you're correct here. Can you provide an example of a modular type, and values A and B of that type (B /= 0), such that (A/B)*B + (A rem B) /= A ? (using the Ada definitions of the operators)? I may be missing something, but I don't think it's possible. -- Adam