Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] How to simplify an arithmetic expression ?
Date: Wed, 05 Oct 2011 15:17:26 +0200	[thread overview]
Message-ID: <87zkhfpogp.fsf@frosties.localnet> (raw)
In-Reply-To: <CAPFanBFQpsmv=U+=4u0d0x8TH3MD4HktL9ptt5qq0vjtupuY9Q@mail.gmail.com> (Gabriel Scherer's message of "Sun, 2 Oct 2011 19:07:11 +0200")

Gabriel Scherer <gabriel.scherer@gmail.com> writes:

>> Below is a quick tentative implementation of NbE, on a slightly
>> restricted expression type (I removed the not-so-interesting Minus
>> nodes).
>
> Sorry, I forgot to give a small example of what the implementation
> does. Really the obvious thing, but it may not be so obvious just
> looking at the code.
> Here is an example of (X*2+Y)*(3+(Y*2+Z)) being 'rewritten' to
> (1*Y)*Z+((2*Y)*Y+(3*Y+((2*X)*Z+((4*X)*Y+6*X)))).

(1*Y)? That certainly isn't optimal.

MfG
        Goswin

  reply	other threads:[~2011-10-05 13:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02 11:51 Diego Olivier Fernandez Pons
2011-10-02 14:08 ` Gabriel Scherer
2011-10-02 15:09   ` Ernesto Posse
2011-10-02 16:32     ` Xavier Leroy
2011-10-02 16:48       ` Gabriel Scherer
2011-10-02 17:07         ` Gabriel Scherer
2011-10-05 13:17           ` Goswin von Brederlow [this message]
2011-10-05 21:31             ` Gabriel Scherer
2011-10-02 16:56 ` Xavier Clerc
2011-10-05 13:09 ` Goswin von Brederlow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zkhfpogp.fsf@frosties.localnet \
    --to=goswin-v-b@web.de \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox