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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Bob Duff Newsgroups: comp.lang.ada Subject: Re: Fixed-point question Date: Mon, 29 Jun 2015 10:13:03 -0400 Organization: A noiseless patient Spider Message-ID: <87y4j2r4b4.fsf@theworld.com> 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> <876168sx28.fsf@theworld.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="046878139b4fd5c02f42068d2162c482"; logging-data="22156"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1984RnRSvJZabao/PODihFN" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:U203xCCVCmeGNQa6Qm9ipdxxyhM= sha1:3JXTmIol3vyQdHOmGvhVinuW0co= Xref: news.eternal-september.org comp.lang.ada:26538 Date: 2015-06-29T10:13:03-04:00 List-Id: Patrick Noffke writes: > But for C2 why is the compiler implicitly converting N and D to universal_fixed > before doing the division? Isn't it just as valid to treat the constants as > universal_real and use the root_real "/" operator first and then do the > conversion? I don't see this discussed in 8.6 (29). There must be another > rule for type conversion taking preference over division. The "/" for root_real returns root_real, and there is no implicit conversion from root_real to the fixed point type. There is an implicit conversion from universal_real (which is the type of literals and named numbers) to any numeric type. - Bob