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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,270d47706116d3c X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Can compilers do this? Date: 1996/02/23 Message-ID: #1/1 X-Deja-AN: 140885505 references: <4gjd6g$mfq@newsbf02.news.aol.com> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-02-23T00:00:00+00:00 List-Id: BwB says "Also, suppose Y and X are floating point variables, and M and B are CONSTANT floating point variables (not named numbers) initialized to 1.0 and 0.0 respectively. If one writes Y := M * X + B ; can (and will) any compiler reduce this to Y := X ; Sure, this is just standard constant propagation, a very common optimization.