Henry Baker | 1 Nov 16:06 2011
Picon

Treat inequalities like equations?

(%i121) y=m*x+b;
(%o121)                           y = m x + b
(%i122) %-b;
(%o122)                           y - b = m x

but

(%i123) y<m*x+b;
(%o123)                           y < m x + b
(%i124) %-b;
(%o124)                        (y < m x + b) - b
(%i125) %,expand;
(%o125)                        (y < m x + b) - b

Can we handle inequalities like this any better?
Edwin Woollett | 1 Nov 19:38 2011
Picon

strange question when using interface to integrate

I am trying to start an isolation of integrate
behavior, error messages, etc.
from the nint.mac user, and have a short
function called nint_integrate. It only uses
the function complex_number_p defined
in nint.lisp.

I get the question: "is 1 zero or nonzero? ",
when the integrand is bessel_i(1,%i*x) and
integrating over (1,inf).

As an experiment, I also tried using
bessel_i(1.0,%i*x), which produced
a different error message:
"integrate: variable must not be a number; found: 1".

--------------------------
Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
                                  2011-11-01

(%i1) load(temp);
(%o1) "c:/work2/temp.mac"

(%i2) nint_integrate(bessel_i(1,%i*x),x,1,inf);
Is  1  zero or nonzero?

(Continue reading)

Edwin Woollett | 1 Nov 20:02 2011
Picon

rectform strange question, was: strange question when using interface to integrate

On Nov. 1, 2011, I wrote:
-----------------------
>I get the question: "is 1 zero or nonzero? ",
>when the integrand is bessel_i(1,%i*x) and
>integrating over (1,inf).
>
>(%i2) nint_integrate(bessel_i(1,%i*x),x,1,inf);
>Is  1  zero or nonzero?
>
>nonzero;
>defint: integral is divergent.
>#0: nint_integrate(ue=bessel_i(1,%i*x),uvar=x,ua=1,ub=inf)
> -- an error. To debug this try: debugmode(true);
-------------------------

debug printouts now show this question
comes from rectform:

----------------------------------------
 Maxima 5.25.1 http://maxima.sourceforge.net
using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (a.k.a. GCL)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
                                  2011-11-01

(%i1) display2d:false$
(%i2) rectform(%i*bessel_i(0,%i*inf));
Is  1  zero or nonzero?

(Continue reading)

Edwin Woollett | 1 Nov 21:19 2011
Picon

Re: rectform strange question

On Nov. 1, 2011, I wrote:
--------------------------
>debug printouts now show this question
>comes from rectform:
>
>(%i2) rectform(%i*bessel_i(0,%i*inf));
>Is  1  zero or nonzero?
>
>nonzero;
>(%o2) %i*bessel_i(0,%i*inf)
-------------------------------------
This doesn't happen if I use limit inside the
code, which replaces %i*inf by infinity.
-------------------------------------
(%i7) load(temp);
(%o7) "c:/work2/temp.mac"
(%i8) nint_integrate(bessel_i(1,%i*x),x,1,inf);
vx = %i*bessel_i(0,%i*x)

vxop = "*"

vxa = %i*bessel_i(0,%i)

vxa = 0.76519768655797*%i

vxb = %i*bessel_i(0,infinity)

vxb = %i*'realpart(bessel_i(0.0,infinity))
    -1.0*'imagpart(bessel_i(0.0,infinity))

(Continue reading)

razif razali | 2 Nov 05:32 2011
Picon

Re: got error when try to run calculation

Dear Raymond Toy and Maxima users,


I already update my clisp to 2.49 but still can't run my code given before...
1 questions, what is maxima cvs?is it different with standard maxima for ubuntu?

On Tue, Oct 25, 2011 at 12:14 PM, Raymond Toy <toy.raymond <at> gmail.com> wrote:
On 10/24/11 8:43 PM, razif razali wrote:
> ok here i attach the file,
>
> braket.mac i put in /usr/local/share/maxima/5.24.0/share/ folder,
>
> then in maxima i give below command,
>
> (%i1)load("pnn_4");

I didn't have any problems with this using maxima cvs and clisp 2.49.

Do you have any information on exactly where the problem is occurring?
I did notice that I can't load pnn_4 twice because tellsimp complains
about circular rules, which I guess is true.

Ray




--
Regards,

RAZIF RAZALI,
Tutor & Master Student,
Physics Department,
Faculty Of Science,
Universiti Teknologi Malaysia(UTM).
+60199393606



_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Robert Dodier | 2 Nov 05:56 2011
Picon

Re: Treat inequalities like equations?

There is a share package, ineq, which might be helpful.
load(ineq) loads the package and demo(ineq) runs through some examples.

ineq is not too complicated -- it defines simplifications rules
(via tellsimp and tellsimpafter) for some basic operations on
inequalities. Maybe it's enough, I don't know.

Hope this helps,

Robert Dodier
Raymond Toy | 2 Nov 06:06 2011
Picon

Re: Re-implementing R in Maxima

On 10/31/11 11:42 AM, Stavros Macrakis wrote:
On Mon, Oct 31, 2011 at 13:38, Raymond Toy <toy.raymond <at> gmail.com> wrote:
I also notice that ratepsilon is still 2e-8, even though maxima has been using double precision for years (decades?) now.

Argh!  I thought we'd agreed multiple times (starting at least as long ago as 2005) that ratepsilon should be much smaller, say 2.0e-15 (about 9 ulps).  This is plenty of slop for returning "nice" rationals in the face of rounding error.

It's been finally changed to 2d-15, after all these years.

No problems with the testsuite, FWIW.

Ray

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima
Raymond Toy | 2 Nov 06:08 2011
Picon

Re: got error when try to run calculation

On 11/1/11 9:32 PM, razif razali wrote:
> Dear Raymond Toy and Maxima users,
>
> I already update my clisp to 2.49 but still can't run my code given
> before...
> 1 questions, what is maxima cvs?is it different with standard maxima
> for ubuntu?
I guess it's not maxima cvs anymore.  I meant the current version of
maxima in the sourceforge git repository.  I'm pretty sure this is
different from what ubuntu has.

Sorry, I haven't done anything more with your code.

Ray
Henry Baker | 2 Nov 13:38 2011
Picon

Re: Treat inequalities like equations?

Cool! "ineq" seems to do nearly everything that I wanted.  Thank you!

This sort of behavior on inequalities seems pretty orthogonal to the rest of Maxima.  How come Maxima can't
just incorporate it into the standard mechanisms?  I would be surprised if it broke anything.

At 09:56 PM 11/1/2011, Robert Dodier wrote:
>There is a share package, ineq, which might be helpful.
>load(ineq) loads the package and demo(ineq) runs through some examples.
>
>ineq is not too complicated -- it defines simplifications rules
>(via tellsimp and tellsimpafter) for some basic operations on
>inequalities. Maybe it's enough, I don't know.
>
>Hope this helps,
>
>Robert Dodier
Stavros Macrakis | 2 Nov 14:42 2011
Picon

Re: Treat inequalities like equations?

ineq is not particularly robust or general.


For example:

(a=b)*(c=d) => a*c = b*d (base Maxima, OK)
With ineq, (a=b)*(c<d) asks if a and b are PNZ (second question is redundant) and returns
    a*c<a*d = (b*c<b*d)  (?!); I'd think this should be a*c < b*d (if a>=0)

(a<b)*(c<d) => is a<b PNZ (nonsense question) => (a<b)*c < (a<b)*d (nonsense value).  This should presumably either be returned unmodified or as a*c<b*d (if signs are appropriate).

0*(a<b) => 0  -- not clear what this should be, but probably not 0

but 

assume(equal(q,0))$
q*(a<b) => q*(a<b)    -- again, not clear what this should be

Of course, base Maxima doesn't do too well, either, for equation manipulation:

exp(a=b) => exp(a=b), not exp(a)=exp(b)

Ineq also slows down simplification:

(%i8) expand((a+b+a*b-2)^50)$
Evaluation took 0.9830 seconds (1.0200 elapsed)
(%i9) load(ineq)$
tellsimp: warning: putting rules on '+' or '*' is inefficient, and may not work.
...(%i10) expand((a+b+a*b-2)^50)$
Evaluation took 2.0750 seconds (2.0940 elapsed)

          -s

On Wed, Nov 2, 2011 at 08:38, Henry Baker <hbaker1 <at> pipeline.com> wrote:
Cool! "ineq" seems to do nearly everything that I wanted.  Thank you!

This sort of behavior on inequalities seems pretty orthogonal to the rest of Maxima.  How come Maxima can't just incorporate it into the standard mechanisms?  I would be surprised if it broke anything.

At 09:56 PM 11/1/2011, Robert Dodier wrote:
>There is a share package, ineq, which might be helpful.
>load(ineq) loads the package and demo(ineq) runs through some examples.
>
>ineq is not too complicated -- it defines simplifications rules
>(via tellsimp and tellsimpafter) for some basic operations on
>inequalities. Maybe it's enough, I don't know.
>
>Hope this helps,
>
>Robert Dodier

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima

_______________________________________________
Maxima mailing list
Maxima <at> math.utexas.edu
http://www.math.utexas.edu/mailman/listinfo/maxima

Gmane