Thomas Dean

322 Reputation

10 Badges

19 years, 121 days

MaplePrimes Activity


These are questions asked by Thomas Dean

I expected plot with an undefined name to do nothing, but,

plot(asdf);

actually plots y=x!

This is reduced from another forum.

restart;
e1 := 12*g^2+12*h^2+4*i^2+3*j^2=684;
e2 :=  12*l^2+12*m^2+4*n^2+3*o^2=684;
e3 := 12*q^2+12*r^2+4*s^2+3*t^2=172;
e4 := 12*v^2+12*w^2+4*x^2+3*y^2=108;
e5 := 12*g*l+12*h*m+4*n*i+3*j*o=-84;
e6 := 12*g*q+12*h*r+4*s*i+3*j*t=-84;
e7 := 12*g*v+12*h*w+4*x*i+3*j*y=-84;
e8 := 12*l*q+12*m*r+4*n*s+3*o*t=-84;
e9 := 12*l*v+12*m*w+4*n*x+3*o*y=-84;
e10 := 12*q*v+12*r*w+4*s*x+3*y*t=-84;
e11 := g+h+i+j=-1;
e12 := l+m+n+o=-1;
e13 := q+r+s+t=-1;
e14 := v+w+x+y=-1;
e15 := h*i+m*n+3*s*r+4*x*w=-21;
e16 := g*i+l*n+3*s*q+4*x*v=-21;
e17 := i+n+3*s+4*x=-3;
e18 := g*h+m*l+3*q*r+4*w*v=-7;
e19 := h+m+3*r+4*w=-1;
e20 := g+l+3*q+4*v=-1;
e21 := i*j+o*n+3*s*t+4*x*y=-84;
e22 := j*h+o*m+3*r*t+4*y*w=-28;
e23 := j*g+o*l+3*q*t+4*y*v=-28;
e24 := j+o+3*t+4*y=-4;
e25 := j^2+o^2+3*t^2+4*y^2=144;
e26 := i^2+n^2+3*s^2+4*x^2=129;
e27 := h^2+m^2+3*r^2+4*w^2=57;
e28 := g^2+l^2+3*q^2+4*r^2=57;

eqset := {e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15,
          e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28};
for s in eqset do print(s) end do;

Error, too many levels of recursion

If I then do

S := {1,2,3,6,3,6,8,2,3,6};

for s in S do print(s) end do;

Then,

for s in eqset do print(s) end do;

has the correct output.

What am I doing wrong?

Tom Dean

This is simplified from a larger example.  I never saw Maple exit from a numercal calculation.

> 123456789 ^ 987654321:
Execution stopped: Stack limit reached.

Process Maple R2016 exited abnormally with code 158

> kernelopts(maxdigits);
                                  38654705646

> lprint(123456789. ^ 987654321.);
.4339566080e7991619731

kernelopts(memusage) shows about 2~3 meg bytes used.

The system has 16G Ram.  16G swap.

Seems like something maple should have caught.

restart;
eq1 := T - M*g = 0;
eq2 := T1*sin(theta1) + T2*sin(theta2) - T = 0;
eq3 := -T1*cos(theta1) + T2*cos(theta2) = 0;
soln := solve({eq1,eq2,eq3},{T,T1,T2});

limit(subs(theta2=theta1,soln[3]),theta1=0);

This returns a limit -> ... expression.  Since there is a sin(theta1) in the denominator, this should be undefined or infinity.

I don't know where to ask this.  Sorry if this is the wrong forum.

I use maplev-mode

;; Version:    2.155
;; X-RCS:      $Id: maplev.el,v 1.14 2006-06-02 14:02:38 joe Exp $
 

I am attempting to modify it so
  f1 invokes maplev-cmaple-send-line
  f2 invokes maplev-cmaple-send-region
  f3 invokes maplev-cmaple-send-buffer
 

tried adding
(define-key map [(control c) (control c) ?l] 'maplev-cmaple-send-line)
(define-key map [(f1)]  'maplev-cmaple-send-line)

but, emacs seems to not recognize this.  I can change the global keymap to get this behavior.
Is there a way to do this in maplev.el?
 

Tom Dean

First 9 10 11 12 13 14 15 Page 11 of 15