From: Robert D. <rob...@us...> - 2013-04-18 18:00:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Maxima CAS". The branch, master has been updated via 6bc7215b7c518577906fe6bd918f78b454a2dfb5 (commit) via 0675ee11276008574affd5d62ce2b6d05a7c3bdf (commit) via 5fe57ac82bc60a1e4eac093c715e96fc4013c6b4 (commit) via 7d8604c2572ab379da09abbdabdf596838418ac9 (commit) via 90489062847ab41287e5662ede9be823e48a70bc (commit) via 71063bf5113a7ed7fe9bd19fb46fb81f8f6f2726 (commit) via c5558687d29290fad3edd85d7c90df627169e178 (commit) from bd4678e857b8c23849ab3f03732cb2251c56f6b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6bc7215b7c518577906fe6bd918f78b454a2dfb5 Merge: 0675ee1 bd4678e Author: robert_dodier <rob...@us...> Date: Thu Apr 18 10:58:55 2013 -0700 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit 0675ee11276008574affd5d62ce2b6d05a7c3bdf Author: robert_dodier <rob...@us...> Date: Thu Apr 18 10:58:33 2013 -0700 "dependencies" is a function as well as a variable. Thanks to Ted Woollett for pointing it out. diff --git a/doc/info/Command.texi b/doc/info/Command.texi index 85e5267..a28c767 100644 --- a/doc/info/Command.texi +++ b/doc/info/Command.texi @@ -384,7 +384,7 @@ All atoms which have a user-defined alias, created by the @mrefcomma{alias}@w{} @mref{noun} with @mrefdot{declare} @item dependencies All atoms which have functional dependencies, created by the -@mref{depends} or @mref{gradef} functions. +@mref{depends}, @mref{dependencies}, or @mref{gradef} functions. @item gradefs All functions which have user-defined derivatives, created by the @mref{gradef} function. diff --git a/doc/info/Differentiation.texi b/doc/info/Differentiation.texi index b743659..9c40295 100644 --- a/doc/info/Differentiation.texi +++ b/doc/info/Differentiation.texi @@ -395,14 +395,52 @@ p; @c ----------------------------------------------------------------------------- @anchor{dependencies} @defvr {System variable} dependencies -Default value: @code{[]} +@defvrx {Function} dependencies (@var{f_1}, @dots{}, @var{f_n}) -@code{dependencies} is the list of atoms which have functional -dependencies, assigned by @code{depends} or @code{gradef}. +The variable @code{dependencies} is the list of atoms which have functional +dependencies, assigned by @code{depends}, the function @code{dependencies}, or @code{gradef}. The @code{dependencies} list is cumulative: -each call to @code{depends} or @code{gradef} appends additional items. +each call to @code{depends}, @code{dependencies}, or @code{gradef} appends additional items. +The default value of @code{dependencies} is @code{[]}. + +The function @code{dependencies(@var{f_1}, @dots{}, @var{f_n})} appends @var{f_1}, @dots{}, @var{f_n}, +to the @code{dependencies} list, +where @var{f_1}, @dots{}, @var{f_n} are expressions of the form @code{@var{f}(@var{x_1}, @dots{}, @var{x_m})}, +and @var{x_1}, @dots{}, @var{x_m} are any number of arguments. -See @code{depends} and @code{gradef}. +@code{dependencies(@var{f}(@var{x_1}, @dots{}, @var{x_m}))} is equivalent to @code{depends(@var{f}, [@var{x_1}, @dots{}, @var{x_m}])}. + +See also @code{depends} and @code{gradef}. + +@c ===beg=== +@c dependencies; +@c depends (foo, [bar, baz]); +@c depends ([g, h], [a, b, c]); +@c dependencies; +@c dependencies (quux (x, y), mumble (u)); +@c dependencies; +@c remove (quux, dependency); +@c dependencies; +@c ===end=== +@example +(%i1) dependencies; +(%o1) [] +(%i2) depends (foo, [bar, baz]); +(%o2) [foo(bar, baz)] +(%i3) depends ([g, h], [a, b, c]); +(%o3) [g(a, b, c), h(a, b, c)] +(%i4) dependencies; +(%o4) [foo(bar, baz), g(a, b, c), h(a, b, c)] +(%i5) dependencies (quux (x, y), mumble (u)); +(%o5) [quux(x, y), mumble(u)] +(%i6) dependencies; +(%o6) [foo(bar, baz), g(a, b, c), h(a, b, c), quux(x, y), + mumble(u)] +(%i7) remove (quux, dependency); +(%o7) done +(%i8) dependencies; +(%o8) [foo(bar, baz), g(a, b, c), h(a, b, c), mumble(u)] +@end example @opencatbox @category{Declarations and inferences} @category{Global variables} @@ -442,6 +480,8 @@ only recognize dependencies explicitly represented by their arguments. For example, @code{integrate} does not recognize the dependence of @code{f} on @code{x} unless explicitly represented as @code{integrate (f(x), x)}. +@code{depends(@var{f}, [@var{x_1}, @dots{}, @var{x_n}])} is equivalent to @code{dependencies(@var{f}(@var{x_1}, @dots{}, @var{x_n}))}. + @c GENERATED BY THE FOLLOWING @c depends ([f, g], x); @c depends ([r, s], [u, v, w]); commit 5fe57ac82bc60a1e4eac093c715e96fc4013c6b4 Author: robert_dodier <rob...@us...> Date: Thu Apr 18 10:23:44 2013 -0700 New test to verify that SF bug #2564 "Regression in solve?" remains fixed. diff --git a/tests/rtest8.mac b/tests/rtest8.mac index c843e8e..3ced546 100644 --- a/tests/rtest8.mac +++ b/tests/rtest8.mac @@ -675,3 +675,31 @@ block([], reset (find_root_error); [find_root_error]; + +/* verify that SF bug #2564 "Regression in solve?" remains fixed */ + +block ([foo, bar], + foo : [[x = 3,y = 2,z = 1], + [x = .2768050783899193-2.987202528885064*%i,y = 1.478017834441328-1.347391287293138*%i,z = -0.526432162877356*%i-.8502171357296144], + [x = -2.885476929518458*%i-.8209889702162483,y = 1.596034454560479*%i-1.205269272758513,z = .9957341762950345*%i+.09226835946330206], + [x = 1.337215067329613-2.685489874065195*%i,y = 1.052864325754712*%i-1.700434271459228,z = .9324722294043555-.3612416661871523*%i], + [x = -2.394051681840712*%i-1.807903909137758,y = .8914767115530776-1.790326582710134*%i,z = .7390089172206591-.6736956436465571*%i], + [x = 2.217026751662001-2.021086930939692*%i,y = 1.864944458808694-.7224833323742995*%i,z = .9618256431728189*%i-.2736629900720828], + [x = -1.579296488632072*%i-2.550651407188846,y = 1.923651286345638*%i-.5473259801441661,z = -.1837495178165701*%i-.9829730996839015], + [x = 2.797416688213066-1.08372499856146*%i,y = .3674990356331407*%i-1.965946199367804,z = -.7980172272802396*%i-.6026346363792563], + [x = -.5512485534497117*%i-2.948919299051704,y = 0.184536718926604-1.991468352590069*%i,z = .8951632913550623*%i+.4457383557765383], + [x = .5512485534497115*%i-2.948919299051704,y = 1.991468352590069*%i+0.184536718926604,z = .4457383557765383-.8951632913550623*%i], + [x = 1.083724998561459*%i+2.797416688213064,y = -.3674990356331408*%i-1.965946199367804,z = .7980172272802396*%i-.6026346363792563], + [x = 1.57929648863207*%i-2.550651407188845,y = -1.923651286345638*%i-.5473259801441662,z = .1837495178165701*%i-.9829730996839015], + [x = 2.021086930939673*%i+2.217026751661979,y = 0.722483332374306*%i+1.864944458808712,z = -.9618256431728189*%i-.2736629900720828], + [x = 2.394051681840719*%i-1.80790390913777,y = 1.790326582710125*%i+.8914767115530766,z = .6736956436465571*%i+.7390089172206591], + [x = 2.685489874065194*%i+1.337215067329613,y = -1.052864325754712*%i-1.700434271459228,z = .3612416661871523*%i+.9324722294043555], + [x = 2.885476929518458*%i-0.820988970216246,y = -1.59603445456048*%i-1.205269272758512,z = .09226835946330206-.9957341762950345*%i], + [x = 2.9872025288851*%i+.2768050783899063,y = 1.347391287293114*%i+1.478017834441318,z = 0.526432162877356*%i-.8502171357296144]], + bar : sort (solve([x^2*y*z = 18,x*y^3*z = 24,x*y*z^4 = 6],[x,y,z])), + /* some gyrations to round small floats to zero */ + matchdeclare (xx, lambda ([x], floatnump (x) and abs (x) < 1e-14)), + defrule (rfoo, xx, 0), + apply1 (abs (foo - bar), rfoo), + apply ("and", map (is, flatten (%)))); +true; commit 7d8604c2572ab379da09abbdabdf596838418ac9 Merge: 9048906 a0fe071 Author: robert_dodier <rob...@us...> Date: Mon Apr 8 13:37:21 2013 -0700 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit 90489062847ab41287e5662ede9be823e48a70bc Merge: 71063bf d500f94 Author: robert_dodier <rob...@us...> Date: Sun Apr 7 20:02:17 2013 -0700 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit 71063bf5113a7ed7fe9bd19fb46fb81f8f6f2726 Merge: c555868 fd8c6a3 Author: robert_dodier <rob...@us...> Date: Thu Apr 4 21:11:34 2013 -0700 Merge branch 'master' of ssh://git.code.sf.net/p/maxima/code commit c5558687d29290fad3edd85d7c90df627169e178 Author: robert_dodier <rob...@us...> Date: Thu Apr 4 21:10:03 2013 -0700 Move unitfrac example from rationalize to ceiling, since it uses ceiling and not rationalize. diff --git a/doc/info/DataTypes.texi b/doc/info/DataTypes.texi index 1cefc7e..6029783 100644 --- a/doc/info/DataTypes.texi +++ b/doc/info/DataTypes.texi @@ -503,59 +503,6 @@ representation. 10 5 @end example -Example use: - -@c ===beg=== -@c unitfrac(r) := block([uf : [], q], -@c if not(ratnump(r)) then -@c error("The input to 'unitfrac' must be a rational number"), -@c while r # 0 do ( -@c uf : cons(q : 1/ceiling(1/r), uf), -@c r : r - q), -@c reverse(uf)); -@c unitfrac (9/10); -@c apply ("+", %); -@c unitfrac (-9/10); -@c apply ("+", %); -@c unitfrac (36/37); -@c apply ("+", %); -@c ===end=== -@example -@group -(%i1) unitfrac(r) := block([uf : [], q], - if not(ratnump(r)) then - error("The input to 'unitfrac' must be a rational number"), - while r # 0 do ( - uf : cons(q : 1/ceiling(1/r), uf), - r : r - q), - reverse(uf))$ -@end group -(%i2) unitfrac (9/10); - 1 1 1 -(%o2) [-, -, --] - 2 3 15 -(%i3) apply ("+", %); - 9 -(%o3) -- - 10 -(%i4) unitfrac (-9/10); - 1 -(%o4) [- 1, --] - 10 -(%i5) apply ("+", %); - 9 -(%o5) - -- - 10 -(%i6) unitfrac (36/37); - 1 1 1 1 1 -(%o6) [-, -, -, --, ----] - 2 3 8 69 6808 -(%i7) apply ("+", %); - 36 -(%o7) -- - 37 -@end example - @opencatbox @category{Numerical evaluation} @closecatbox diff --git a/doc/info/MathFunctions.texi b/doc/info/MathFunctions.texi index 835cbf0..e36bdc9 100644 --- a/doc/info/MathFunctions.texi +++ b/doc/info/MathFunctions.texi @@ -175,6 +175,59 @@ can use this information; for example: (%o3) f(x) - 1 @end example +Example use: + +@c ===beg=== +@c unitfrac(r) := block([uf : [], q], +@c if not(ratnump(r)) then +@c error("unitfrac: argument must be a rational number"), +@c while r # 0 do ( +@c uf : cons(q : 1/ceiling(1/r), uf), +@c r : r - q), +@c reverse(uf)); +@c unitfrac (9/10); +@c apply ("+", %); +@c unitfrac (-9/10); +@c apply ("+", %); +@c unitfrac (36/37); +@c apply ("+", %); +@c ===end=== +@example +@group +(%i1) unitfrac(r) := block([uf : [], q], + if not(ratnump(r)) then + error("unitfrac: argument must be a rational number"), + while r # 0 do ( + uf : cons(q : 1/ceiling(1/r), uf), + r : r - q), + reverse(uf))$ +@end group +(%i2) unitfrac (9/10); + 1 1 1 +(%o2) [-, -, --] + 2 3 15 +(%i3) apply ("+", %); + 9 +(%o3) -- + 10 +(%i4) unitfrac (-9/10); + 1 +(%o4) [- 1, --] + 10 +(%i5) apply ("+", %); + 9 +(%o5) - -- + 10 +(%i6) unitfrac (36/37); + 1 1 1 1 1 +(%o6) [-, -, -, --, ----] + 2 3 8 69 6808 +(%i7) apply ("+", %); + 36 +(%o7) -- + 37 +@end example + @opencatbox @category{Mathematical functions} @closecatbox ----------------------------------------------------------------------- Summary of changes: doc/info/Command.texi | 2 +- doc/info/DataTypes.texi | 53 ----------------------------------------- doc/info/Differentiation.texi | 50 ++++++++++++++++++++++++++++++++++---- doc/info/MathFunctions.texi | 53 +++++++++++++++++++++++++++++++++++++++++ tests/rtest8.mac | 28 +++++++++++++++++++++ 5 files changed, 127 insertions(+), 59 deletions(-) hooks/post-receive -- Maxima CAS |