Subject: how to interpret a ?print(%) quadpack result
From: Raymond Toy
Date: Sat, 19 May 2012 18:19:31 -0700
On 5/19/12 1:59 PM, Edwin Woollett wrote:
> I am constructing a test file of definite
> integral results produced by nint, and am
> using ?print(%) to get the correct digits to
> put in the expected answer.
>
> In the following, the use of quad (instead of
> nint) forces the use of quadpack and the
> form of the arguments causes quad to
> call quad1d.
>
> The option singular forces the use of quad_qags,
> implemented by a call to function qags(complex-expr,x,x1,x2).
>
> (%i30) quad(log(1/x)/sqrt(%i*x),x,0,1,singular);
>
> (%o30) 2.82842712474623-2.828427124746158*%i
>
> (%i31) ?print(%)$
>
> ((MPLUS SIMP (1708 "c:/work2/quad1d.mac" SRC $QAGS 1596))
> 2.8284271247462298 ((MTIMES SIMP) -2.8284271247461579 $%I))
This is the internal representation used by maxima. a+b is internally
((mplus) $a $b). a*b is ((mtimes) $a $b). The simp in ((mplus simp) $a
$b) means the expression has been simplified. And as you guessed the
(1708 "c/..." ...) represents the source where the computation is done.
(I think).
A google search for "maxima internals" will return some messages and
routines to show the internal representation used by maxima.
Ray