From: Tony Roberts <anthony.roberts@ad...>  20131114 23:35:11

BEGIN PGP SIGNED MESSAGE Hash: SHA1 Hi, nice to know about realvalued command, I would have liked to use it last year. Is there any effort under way to update the Reduce manual to reflect the developments being made? I am only aware of the 2004 manual. Or is the team looking for someone to do it? Tony On 14/11/13 6:12 PM, Arthur Norman wrote: > On Wed, 13 Nov 2013, Bard Ermentrout wrote: >> I am not sure if this is the right place to send questions and I >> am sorry if it is not. > Yes this is a good place to ask... > >> How do I declare, say x and y to be real so that say, >> conj(x+i*y)=xi*y? And how do I declare m to be an integer so >> int(sin(m*x),x,0,2*pi) =0 >> > > Part of your question may be addressed if I transcribe comments > from the code in packages/poly/compopr.red, which may say more than > the manual does! > > % The following code attempts to improve the way that the complex % > operators CONJ, REPART and IMPART handle values that are > implicitly % real, namely composed "realitypreserving" functions > of explicitly % real numbers, implicitly real symbolic constants > and variables that % the user has declared using the REALVALUED > command defined below. > > % All arithmetic operations, direct trig functions and the > exponential % function are "realitypreserving", but inverse trig > functions and the % logarithm are "realitypreserving" only for > real arguments in a % restricted range. This relates to > piecewisedefined functions! This % code is believed to make the > right decision about implicit reality in % straightforward cases, > and otherwise errs on the side of caution and % makes no assumption > at all, as does the standard REDUCE 3.4 code. It % performs only > very limited numerical evaluation, which should be very % fast. It > never performs any approximate numerical evaluation, or any % > sophisticated analysis, both of which would be much slower and/or % > complicated. The current strategy is believed to represent a % > reasonable compromise, and will normally give the user what they % > expect without undue overhead. > > symbolic procedure realvalued u; % Command to allow the user to > declare functions or variables to be % implicitly real valued. > <<rmsubs(); % So that an expression can be reevaluated. for each > v in u do if not idp v then typerr(v,"id") else flag(list > v,'realvalued)>>; > > symbolic procedure notrealvalued u; % Undo realvalued declaration. > % Cannot recover "complexity", so no need for rmsubs(). for each v > in u do if not idp v then typerr(v,"id") else remflag(list v, > 'realvalued); > > flag('(realvaluedp),'boolean); % Make realvaluedp available in % > algebraic mode. > > ============ So a statement realvalued x, y; will tend to help, as > in > > Reduce (Free CSL version), 04Nov13 ... > > 1: conj(x + i*y); > >  impart(x)*i  impart(y) + repart(x)  repart(y)*i > > 2: realvalued x, y; > > 3: conj(x + i*y); > > >  i*y + x > > > > > > Arthur > > >  > > DreamFactory  Open Source REST & JSON Services for HTML5 & Native Apps > OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API > Access Free app hosting. Or install the open source package on any > LAMP server. Sign up and see examples for AngularJS, jQuery, Sencha > Touch and Native! > http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk > > _______________________________________________ > Reducealgebradevelopers mailing list > Reducealgebradevelopers@... > https://lists.sourceforge.net/lists/listinfo/reducealgebradevelopers > > . >     Professor A.J. Roberts School of Mathematical Sciences phone: +61 8 8313 3035 University of Adelaide fax: +61 8 8313 3696 South Australia 5005. mailto:anthony.roberts@... http://www.maths.adelaide.edu.au/anthony.roberts/ ==.0000001000000100000110001000011010001111110010111011101000010000== BEGIN PGP SIGNATURE Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla  http://enigmail.mozdev.org/ iEYEARECAAYFAlKFWwkACgkQ7TX8dTbro1si5gCffKG/hRpqN/0SVrkxB4YNaAs+ mo8An2c/cF/9ZwBXY5c4V0lvtsqXhh6Y =2vWv END PGP SIGNATURE 