Re: Evaluating Min[2^(1/2), 3^(1/2)]
- To: mathgroup at yoda.physics.unc.edu, "Roger B. Kirchner" <kirchner at cs.umn.edu>
- Subject: Re: Evaluating Min[2^(1/2), 3^(1/2)]
- From: jacobson at cello.hpl.hp.com
- Date: Mon, 10 Aug 92 08:16:31 -0700
"Roger B. Kirchner" <kirchner at cs.umn.edu> asks:
> I would like a way to explicitly find the minimum of a list of exact
> numbers. Is there a way to get Min[2^(1/2), 3^(1/2)] to evaluate to
> 2^(1/2)?
ExactMin[data_List] := Module[{numlist=N[data]},
data[[Flatten[Position[numlist,Min[numlist],{1},1]]]]]
This isn't fancy enough to deal the things that don't evalute to
numbers without getting internal errors. But it works for what you
ask for.
-- David Jacobson