MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: x=2;Composition[f,FindMinimum][x+1,{x,a}]

  • To: mathgroup at
  • Subject: [mg68333] Re: x=2;Composition[f,FindMinimum][x+1,{x,a}]
  • From: "Chris Chiasson" <chris at>
  • Date: Tue, 1 Aug 2006 07:00:06 -0400 (EDT)
  • References: <eake8e$qu9$> <>
  • Sender: owner-wri-mathgroup at

I was testing to see if I could get around the HoldAll Attribute of
FindMinimum by using Composition.

Due to the Attributes of Composition, one would think that
Composition[FindMinimum][args] would cause args to be evaluated before
being caught by FindMinimum's HoldAll. But no. For some reason, it
behaves like FindMinimum[args] - some sort of short circuit for
performance reasons? Perhaps this optimization should be documented
(or maybe it already is and I am too blind to find it).

However, based on a Trace someone kindly sent to me,
Composition[f,FindMinimum][args] in the older versions do cause the
arguments to be evaluated before FindMinimum's HoldAll takes effect.

It's just that in the latest version, if f does not also have the
attribute HoldAll, then the kernel crashes...

Darned if one does, and darned if one doesn't - at least in 5.2 :-)


  • Prev by Date: Re: need to make a special function
  • Next by Date: Re: Using implicit information about row indices
  • Previous by thread: Re: x=2;Composition[f,FindMinimum][x+1,{x,a}]
  • Next by thread: Re: x=2;Composition[f,FindMinimum][x+1,{x,a}]