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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Fixed-point question Date: Sat, 27 Jun 2015 12:57:21 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <249bcd57-3074-4566-b8f2-03e6923bfbce@googlegroups.com> <6a104bde-67ea-48a5-a035-6be3f9235d42@googlegroups.com> <21e4185b-bc89-4940-b329-09863ad17344@googlegroups.com> <0320a865-5636-4ac6-81f7-ea56b761ce0d@googlegroups.com> <87a8vlrm9j.fsf@theworld.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Sat, 27 Jun 2015 19:56:01 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="a3855fbfe1a666be9aefba0563039ed5"; logging-data="16232"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191qaTGKXVitdZCLgFZcMpHrSmL6qb2tek=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 In-Reply-To: <87a8vlrm9j.fsf@theworld.com> Cancel-Lock: sha1:XydMK6LVDIsxWid4vrRbSqInUPg= Xref: number.nntp.giganews.com comp.lang.ada:193809 Date: 2015-06-27T12:57:21-07:00 List-Id: On 06/27/2015 12:20 PM, Bob Duff wrote: > > Because of RM-8.6(29). Actually, it's the root_real operator; > universal_real has no operators. Without the preference rule > of 8.6(29), it would be ambiguous. As you said, it's calculating > an exact rational number (at compile time), and converting that. Root_Real, right. I still tend to think in terms of the rules for Ada 83. So for C1, the compiler is looking for a visible "/" that yields a result that can be converted to Fixed_Type. These include those for at least Root_Real, Float, Duration, and Fixed_Type. 8.6(29) results in Root_Real's "/" being selected. For C2, the compiler is looking for a visible "/" that yields a result of Fixed_Type, and only Fixed_Type's "/" does that. Is that anything close to correct? -- Jeff Carter "My brain hurts!" Monty Python's Flying Circus 21