Sam Steingold on Thu, 14 Dec 2017 22:45:20 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
patch: Variable argument is always optional because it can be inferred. |
Hi, There are ~50 functions which accept a variable arg ("n" prototype) and everywhere except for the 3 places below it is optional. In fact, the underlying C functions accept -1, so these 3 are actually optional too. This patch fixes the docs. Thanks.
>From a62194fc690f81b394fdcacef15c41408683bf37 Mon Sep 17 00:00:00 2001 From: Sam Steingold <sds@gnu.org> Date: Thu, 14 Dec 2017 16:36:14 -0500 Subject: [PATCH] Variable argument is always optional because it can be inferred. --- src/functions/conversions/serprec | 10 +++++----- src/functions/polynomials/subst | 12 ++++++------ src/functions/polynomials/taylor | 12 ++++++------ 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/functions/conversions/serprec b/src/functions/conversions/serprec index e25b2c87b..937cfcb68 100644 --- a/src/functions/conversions/serprec +++ b/src/functions/conversions/serprec @@ -1,12 +1,12 @@ Function: serprec Section: conversions C-Name: gpserprec -Prototype: Gn -Help: serprec(x,v): - return the absolute precision x with respect to power series in the variable v. -Doc: returns the absolute precision of $x$ with respect to power series +Prototype: GDn +Help: serprec(s,{v='x}): + return the absolute precision of s with respect to power series in the variable v. +Doc: returns the absolute precision of $s$ with respect to power series in the variable $v$; this is the - minimum precision of the components of $x$. The result is \tet{+oo} if $x$ + minimum precision of the components of $s$. The result is \tet{+oo} if $s$ is an exact object (as a series in $v$): \bprog ? serprec(x + O(y^2), y) diff --git a/src/functions/polynomials/subst b/src/functions/polynomials/subst index fdd06efd6..b0fe90f12 100644 --- a/src/functions/polynomials/subst +++ b/src/functions/polynomials/subst @@ -1,11 +1,11 @@ Function: subst Section: polynomials C-Name: gsubst -Prototype: GnG -Help: subst(x,y,z): in expression x, replace the variable y by the +Prototype: GDnG +Help: subst(e,{v='x},z): in expression e, replace the variable v by the expression z. -Doc: replace the simple variable $y$ by the argument $z$ in the ``polynomial'' - expression $x$. Every type is allowed for $x$, but if it is not a genuine +Doc: replace the simple variable $v$ by the argument $z$ in the ``polynomial'' + expression $e$. Every type is allowed for $e$, but if it is not a genuine polynomial (or power series, or rational function), the substitution will be done as if the scalar components were polynomials of degree zero. In particular, beware that: @@ -22,8 +22,8 @@ Doc: replace the simple variable $y$ by the argument $z$ in the ``polynomial'' *** ^-------------------- *** subst: forbidden substitution by a non square matrix. @eprog\noindent - If $x$ is a power series, $z$ must be either a polynomial, a power - series, or a rational function. Finally, if $x$ is a vector, + If $e$ is a power series, $z$ must be either a polynomial, a power + series, or a rational function. Finally, if $e$ is a vector, matrix or list, the substitution is applied to each individual entry. Use the function \kbd{substvec} to replace several variables at once, diff --git a/src/functions/polynomials/taylor b/src/functions/polynomials/taylor index 6958483ef..1d5ef05fb 100644 --- a/src/functions/polynomials/taylor +++ b/src/functions/polynomials/taylor @@ -1,13 +1,13 @@ Function: taylor Section: polynomials C-Name: tayl -Prototype: GnDP -Help: taylor(x,t,{d=seriesprecision}): taylor expansion of x with respect to - t, adding O(t^d) to all components of x. -Doc: Taylor expansion around $0$ of $x$ with respect to - the simple variable $t$. $x$ can be of any reasonable type, for example a +Prototype: GDnDP +Help: taylor(f,{t='x},{d=seriesprecision}): taylor expansion of f with respect to + t, adding O(t^d) to all components of f. +Doc: Taylor expansion around $0$ of $f$ with respect to + the simple variable $t$. $f$ can be of any reasonable type, for example a rational function. Contrary to \tet{Ser}, which takes the valuation into - account, this function adds $O(t^d)$ to all components of $x$. + account, this function adds $O(t^d)$ to all components of $f$. \bprog ? taylor(x/(1+y), y, 5) %1 = (y^4 - y^3 + y^2 - y + 1)*x + O(y^5) -- 2.15.1
-- Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504 http://steingoldpsychology.com http://www.childpsy.net http://thereligionofpeace.com http://honestreporting.com https://ffii.org Security at the expense of usability comes at the expense of security.