Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8029 > unrolled thread
| Started by | Nehal Patel <nehal.alum@gmail.com> |
|---|---|
| First post | 2012-01-20 06:52 +0000 |
| Last post | 2012-01-20 06:52 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Tips for writing correct, non trivial Mathematica Libraries Nehal Patel <nehal.alum@gmail.com> - 2012-01-20 06:52 +0000
| From | Nehal Patel <nehal.alum@gmail.com> |
|---|---|
| Date | 2012-01-20 06:52 +0000 |
| Subject | Re: Tips for writing correct, non trivial Mathematica Libraries |
| Message-ID | <jfb2vg$hno$1@smc.vnet.net> |
>> of x + y to be Sqrt[x y], it should be (x + y)^1 = x+ y > > No, it shouldn't be. There is no such thing as a mean of a number or an algebraic expression. What you would expect is But something like Times[2] should be ok? It think it's a reasonable matter of convention whether someone feels like a definition for geometric mean should expect a single vector argument, or as multiple arguments e.g. geom[x,y,z,=85] but I'll admit we're quibbling at this point and move on. > > Clear[geom] > > geom::nonlist = > "The argument `1` is neither a non-empty vector nor a non-empty matrix"; > > geom[ls_] /;If[Head[ls] === List, True, Message[geom::nonlist, x]; False] := > Apply[Times, ls]^(1/Length[ls]) Awesome -- this is what I was curious about! Thanks for taking the time.
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web