Robert Dodier | 3 May 19:33 2016
Picon

simplification of one-argument %union(foo) --> foo

In to_poly_solve, it seems like that the one-argument expression
%union(foo) could simplify to foo. What does anyone think of that?
Have I overlooked something?

The following patch doesn't introduce any new failures in
rtest_to_poly_solve.

best

Robert Dodier

PS.
diff --git a/share/to_poly_solve/to_poly_solve_extra.lisp b/share/to_poly_solve/to_poly_solve_extra.lisp
index 27b5b90..507d6fa 100644
--- a/share/to_poly_solve/to_poly_solve_extra.lisp
+++ b/share/to_poly_solve/to_poly_solve_extra.lisp
 <at>  <at>  -137,7 +137,8  <at>  <at> 
       (if (op-equalp ek '$%union) (setq acc (append acc (margs ek))) (push ek acc)))
     ;; setify and remove $emptyset.
     (setq e (margs ($disjoin (take '($set)) (opapply '$set acc))))
-    `(($%union simp) , <at> e)))
+    ;; %union(one_expr) --> one_expr
+    (if (= (length e) 1) (first e) `(($%union simp) , <at> e))))

 ;; TeX support
 (defprop $%union tex-nary tex)

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
(Continue reading)

Nijso Beishuizen | 3 May 00:07 2016
Picon

integrate sometimes returns result with large numbers

Dear all, 

Sometimes an integration returns a result including very large numbers:

(%i01) I1: integrate(x^2*%e^(x^2)/(1 + x^2 + a*x^2),x);
'integrate((((a+1)*x^2-1)*%e^x^2)/((2*a^2+4*a+2)*x^4+(4*a+4)*x^2
+2),x)+(x*%e^x^2)/((2*a+2)*x^2+2)

returns the integral. But when replacing 'a' with 2^(1/2):

(%i02) I2: integrate(x^2*%e^(x^2)/(1 + x^2 + 2^(1/2)*x^2),x);

'integrate((((91850253*2^(3/2)+259791747)*x^2-1136689*sqrt(2)-1607521)*%
e^x^2)
            /((46611179*2^(5/2)+263672646)*x^4
+(38613965*2^(5/2)+218433572)*x^2+3998607*2^(7/2)+45239074),x)
 +((985*sqrt(2)+1393)*x*%e^x^2)/((195025*2^(3/2)+551614)*x^2
+40391*2^(5/2)+228486)

I think the integral is correct but integrate just fails to find some
common divisor. I don't know how to get rid of the ugly integral. Does
somebody know what to do about it?

Best regards,
Nijso Beishuizen

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
(Continue reading)

Norman Beam | 2 May 20:20 2016

Is suspension and resumption possible?

Some of you may recall my investigations with large sets of differential
equations that require days, weeks, or even months of CPU time. The
fastest XEON box I have access to unfortunately runs other things that
will occasionally require a reboot. This looses in run in process. Is
there any way to preserve Maxima's state in SBCL which could then be
restored after a reboot? I've tried doing this by running in a virtual
machine but there seem to be some runtime penalties once SBCL memory
usage swells into the many GB.

Best regards,

Norman

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
mike@mikepage.us | 30 Apr 19:00 2016
Picon

Factoring large integers

Is there a way to manage ifactor so that it does not sail off to unite time in trying to find huge factors of an argument?

Ideally I would like to see it output factors as it finds them, from small to large, with the last factor listed still possibly composite.
Then the user would have the option to continue or not.

For instance:
factor(98162481248761246);
would output:
49081240624380623
continue?
y
2 167 293899644457369
continue?
y
2 167 14929 19686492361
continue?
y
2 167 14929 19686492361
continue?
n


Mike Page
Theory and Practice, LLC
www.linkedin.com/in/MikePageHPC
mike <at> mikepage.us
303-944-8291



------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Fadli Elwardi | 29 Apr 11:32 2016
Picon

Android App improvements

Hello;
 I've created a package for Maxima that helps PVT analysis students
calculate different parameters faster, http://depthofmaths.com/maxima
 And i need my package to be included in the Android App (Actually i
want to change its design too)
 If there is anyone who can help me to do that, please contact me via
elwardipol1 <at> gmail.com
Thakns

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Marduk Bolaños | 1 May 22:42 2016
Picon

Wrong result for integral of a complex-valued function

Dear all,

I recently tried calculating the following integral:

(%i1) integrate(exp(-%i*ω^2*ρ^2-(%i*t^2)/(4*ρ^2)),ρ,0,inf);

(%o1) 0

But the result is wrong. Mathematica returns the correct
answer:

1/sqrt(%i/%pi)*1/(2*ω)*exp(-%i*ω*abs(t))

There is a formula for this kind of integrals. How can one
teach it to Maxima?

Thank you in advance.

Best regards,
Marduk

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Raymond Toy | 1 May 20:36 2016
Picon

Fun with erfi and erf


But #3090 shows that we incorrectly computing erfi.  This basically
boils down to computing erfi(z) -%i*erf(%i*x) by writing %i*x as
(complex (- (imagpart z)) (realpart z)).  Replacing that with (* #c(0
1) z)) fixes the issue.

However, in doing some experiments I discovered that

erf(1e-20+0.25*%i) =>
0.288083619794972 %i + 1.201153370931523e-20

That's fine.  But

erf(1e-20+0.5*%i) =>
0.614952094696511 %i - 1.0

That's just plain wrong.  erf(0.5*%i) = 0.614952094696511 %i.

There's a bit more work to be done....

Also, Bug #3090 mentions that commit 8f1085 could be the culprit.  I
think not, but  the description doesn't really help.  "Some" lisps
produce spurious imaginary parts; Lisps that support signed zero
produce conjugates for gamma-incomplete for imaginary part of z^2
equal to -0 or +0.

It would have been really beneficial if either the commit log or the
actual changes indicated which lisps and why conjugates are wrong.

Numerical code and issues with branch cuts are hard.  Don't make it
even harder by not describing why algorithms are changing to handle
these.

Also, if you want to get rid of signed zeroes on algorithms, it's
really just easiest to add 0.0 (or 0.0+%i*0.0) to smash negative
zeroes to positive.

--
Ray

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Richard Fateman | 30 Apr 17:21 2016
Picon

timeout functions

two programs are available, only for sbcl implementations of Maxima
in
http://www.cs.berkeley.edu/~fateman/lisp/timeout.lisp

stopme(expression, seconds)

and
time_constrained(expression, seconds).

time_constrained  returns   the symbol  aborted if it runs out of time.

stopme prints a warning message and also
returns a message  (which includes the expression that could not be 
evaluated).

I think this should be in share directory,  but it would be nice if 
others can
add implementations for non-sbcl.

RJF

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
Edwin Woollett | 30 Apr 00:56 2016
Picon

Maxima by Example: New Ch. 5: Matrix Solution Methods

Two changes to the Maxima by Example Series:
 
======================================
The new Ch. 5 of Maxima by Example includes a
discussion of generalized eigenvectors,  Jordan
chains, canonical bases, Jordan canonical form,
construction of the inverse of a matrix by row operations,
and four analytic methods of calculating the exponential
matrix exp(t*A). The software file mbe.mac contains
many tools to study matrix methods and properties.
 
From the webpage:
----------------------------------------------------
Chapter 5: Matrix Solution Methods
 
Chapter 5 shows the use of Maxima matrices
for the solution of eigenvalue and eigenvector problems,
and the analytic matrix solution of sets of first order
ordinary differential equation initial value problems.
 
    --mbe5matrix.pdf : Mar. 30, 2016, Maxima 5.36.1, 95 pages
    --mbe5matrix.tex : Mar. 30, 2016, Latex code file
    --mbe5.mac : Maxima matrix functions code: Mar. 30, 2016,
           Maxima 5.36.1
============================================
 
The old Ch. 5 on the qdraw interface to draw2d has been
  moved to Ch. 13 of Maxima by Example, and contains
  new examples including drawing a density plot directly
  from a matrix of numerical values, drawing a scatterplot
  (with a linear fit) of the wait  times vs. eruption durations
  for the Old Faithful Geyser. Also added are more examples
  of using Greek letters, mathematical symbols and adjustable font.   
---------------------------------------------------------------------------
From the webpage:
-------------------------------------------------------   
Chapter 13: 2D Plots and Graphics using qdraw
 
Chapter 13 presents many examples which use qdraw.mac, an
interface to Maxima's draw2d function. qdraw(...) provides much
quicker access to many features of draw2d, with default plot
properties of interest to users from the physical sciences and
engineering. This chapter is the old chapter 5.
 
    --mbe13qdraw.pdf : April 29, 2016, Maxima 5.36.1, 51 pages
    --mbe13qdraw.tex : April 29, 2016, Latex code file
    --qdraw.mac : A Graphics Interface to draw2d: April 29, 2016,
            Maxima 5.36.1
    --qdrawcode.txt : Copy and Paste Code: April 29, 2016,
           Maxima 5.36.1
    --faithful.dat : Old Faithful Geyser data file
    --fit1.dat : Data File
    --fit2.dat : Data File    
   
Chapter 13 Topics
 
    Quick Plots for Explicit Functions: ex(...)
    Quick Plots for Implicit Functions: imp(...)
    Contour Plots with contour(...)
    Density Plots
    Explicit Plots with Greater Control: ex1(...)
    Scatterplots and Data Plots and pts(...) Syntax
    Implicit Plots with Greater Control: imp1(...)
    Parametric Plots with para(...)
    Polar Plots with polar(...)
    Geometric Figures: line(...)
    Geometric Figures: rect(...)
    Geometric Figures: poly(...)
    Geometric Figures: circle(...) and ellipse(...)
    Geometric Figures: vector(..)
    Geometric Figures: arrowhead(..)
    Using Greek Letters, Math Symbols, and Adjustable
            Font Size with Labels
    Even More with more(...)
    Programming Homework Exercises
 
===============================
Ted Woollett
 
   
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
Richard Fateman | 29 Apr 23:46 2016
Picon

a prototype "stopme" timeout for SBCL

stopme takes 2 arguments.  An expression to evaluate and a time limit in 
seconds.
If the evaluation takes less than the time limit, it just returns as usual.
Otherwise it prints a message and returns a text.  It could return a
quoted version of the input, or something else...

It's written for SBCL.  Other lisps might be similar.
I post the code so that others who know lisp but perhaps not the
nuance of defmspec may look at it and improve it.

As an example,
(x, stopme(do x:x+1,1), x);
prints
  your time limit of 1 seconds ran out
and returns 803456.  An indication of how fast my computer is, at 
executing x:x+1.

;; stopme command, only for sbcl
(in-package :maxima)
(defmspec $stopme(args)    ;; usage:  stopme (do x:x+1, 2) ; stops 
infinite loop after 2 sec
   (let* ((evalme(cadr args))          ;  not evaluated !
      (timelimit (meval (caddr args))) ; evaluate the time limit

      (v (sb-ext::make-timer ;; the timer program
          (lambda()
            (format t "~%your time limit of ~s seconds ran out" timelimit)
            (throw 'stopme `((mtext) "timed out on " ,evalme))))))
     (catch 'stopme
       (progn
     (sb-ext::schedule-timer v timelimit)
     (prog1 (meval evalme)
       (sb-ext::unschedule-timer v))    ))))

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
David Scherfgen | 29 Apr 20:44 2016
Gravatar

Re: Deadly factoring in sign - we need a better way of telling whether something is "safe to factor"

I have posted a patch on SourceForge (bug #3147) that prevents the factor call when the expression's degree in any rational variable is too high.
This fixes the recently reported cases. If someone could have a look at the code and tell me whether it's OK to commit, that would be great.
It's not the best solution, but it could take a long time until someone finds the time to come up with an entirely new approach to sign (I can't do it, I have too little experience with LISP and Maxima).

Sent from my mobile phone. / Von meinem Handy aus gesendet.

Am 29.04.2016 20:11 schrieb "Robert Dodier" <robert.dodier <at> gmail.com>:
On 2016-04-29, Stavros Macrakis <macrakis <at> alum.mit.edu> wrote:

> Yes, we can 'fix' the problem in factor, but the fix so far seems to be
> that it will return a clean failure rather than a useful result, right? So
> we still haven't fixed the sign issue.

Yes, good point, that's right.

best

Robert Dodier


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Maxima-discuss mailing list
Maxima-discuss <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

Gmane