# acer

7 years, 235 days

These are questions asked by acer

### quick JacobiTheta1 ?

December 31 2012 by Maple

0

4

I'd like to be able to get a quicker low accuracy computation of the argument of the complex-valued JacobiTheta1 function.

I only need as much accuracy as to get a decent plot, which means... I don't know... about 1e-3 relative accuracy?

If I can get a formula or approach that is "evalhf'able" then I can construct a procedure which does this action and writes results inplace to a float[8] Matrix.

The naive approach in the code below takes about 6min...

### point plot and colors

December 22 2011 by Maple

1

0

The code below, which is a PLOT structure, seems to be one of the more efficient forms of specifying individual colors for each point in a 2D point plot.

My central question is: what plotting command will construct this?

PLOT(CURVES(Matrix([seq([i,i],i=0..4)],datatype=float[8])),
STYLE(POINT), AXESLABELS("", ""), VIEW(0 .. 10, 0 .. 10),
COLOUR(HSV,
Array(1..15,[0.0,1,1,0.2,1,1,0.4,1,1,0.6,1,1,0.3,1,1],
datatype=float[8])
)
);


I know that I can call plot and pass the m-by-2 Matrix of point data, and specify style=point. But how can I pass in such a nice, efficient float[8] Array to specify the points' colors? I know that the float[8] Array is leaner than a long sequence of HFloats. But even in the simpler case of just two points: how can one pass the color option just once to specify the colors to be used for each of the points?

Oh, in case anyone's interested, another old-fashioned (but terser) was to get such a float[8], C_order Array is with the hfarray command.

### plotting region between two functions

December 12 2011 by Maple

5

5

Suppose that I wanted to produce a 2D plot which was coloured in the region between two functions.

I mean not just between two curves, but between two functions. I would like to make the curves appear as smooth as Maple knows how, but without getting any jaggedness due to using a high grid in an implicitpot.

Consider this example. These two curves are displayed as being quite smooth (using adaptive plotting or whatever plot knows to use). How best can the regions between these two curves be filled, without having to recourse perhaps to a rough implicit plot?

plot([x^2-1, -x-1], x=-1.5..1.5, y=-1.5..1.5, color=black);


A simple trick with a product provides a defined implicit region that implicitplot can handle. But there can be small gaps, or irregularities, because the formulas for the curves are being solved in a complicated way and no longer being used as mere functions.

plots:-implicitplot( (y - (x^2-1))*(y - (-x-1)),
x=-1.5..1.5, y=-1.5..1.5,
filledregions=true, gridrefine=4,
coloring=[COLOUR(RGB,.8,.8,.9),"white"],
axes=boxed, labels=["x","y"],
view=[-1.5..1.5,-1.5..1.5] );


Another technique is to overlay two simpler implicit plots, colouring and layering them carefully so as to give the impression that only the inner regions had been coloured. The problem here is that the intersections all have to be computed and the problem split up piecemeal (which I did not do) so that the layered colouring is adjusted to whichever curve lies on top. Without that care, then something like this happens, with odd subregions appearing uncoloured.

plots:-display(
plots:-implicitplot( x^2-1 >= y, x=-1.5..1.5, y=-1.5..1.5,
filledregions=true, gridrefine=4,
coloring=["white","white"] ),
plots:-implicitplot( -x-1 >= y, x=-1.5..1.5, y=-1.5..1.5,
filledregions=true, gridrefine=2,
coloring=[COLOUR(RGB,.8,.8,.9),"white"] ),
axes=boxed, labels=["x","y"], view=[-1.5..1.5,-1.5..1.5]);


Did I miss something obvious? Is there some other calling sequence or command that makes this much easier (and smoother, by default)?

### choices for integral form

September 13 2011 by Maple

3

6

On the main page for the Rubi rule-based integrator, there is a table comparing results of Rubi against Maple and Mathematica.

On the face of it, the Maple results don't look so good. Maple is claimed as scoring about 82% correct on the author's example test suite. But only 42% of the suite gets an "optimal" result from Maple. The other 40% that Maple is claimed to get correct have results that are described as "Messy:

### threshold for ignoring nonreal part...

August 24 2011 by Maple

3

4

On the usenet newsgroup sci.math.symbolic Prof. Richard Fateman posted a question (or here) recently about what mechanisms a math application could use to handle the situation of negligible imaginary parts of computed data when plotting.

An example could...

### 2DMath in Mapleprimes

June 11 2010 by Maple

Here's my first attempt at posting some 2DMath on this site.

First, I will paste directly from 2D output in a running Standard GUI Maple session.

BesselJ(0, x)+GAMMA(Psi)-sqrt(abs(omega))

### Am I missing something?

May 31 2010 by Maple

1

5

Am I missing some justification for this last one?

> zip(/,Array([3]),Array([9]));
[1/3]

> zip(/,Array([3],datatype=integer[4]),Array([9]));
[1/3]

> zip(/,Array([3]),Array([9],datatype=integer[4]));
[1/3]

> zip(/,Array([3],datatype=integer[4]),Array([9],datatype=integer[4]));
[0.333333333333333315]


### paranoia in maple

January 10 2010 by

0

2

Is anyone aware of Maple code intended to do some of the floating-point stress tests like are done in Kahan's paranoia code? (See here.)

I realize that modern Maple claims to comply with IEEE 854, 754, etc. But I like to check some things for myself. Call me paranoid. ;)

acer

### format for image embedded in worksheet

October 26 2008 by Maple

2

1

An image may be embedded in a Maple worksheet, using Insert-> Image in the top menubar of the Standard GUI.

Can anyone say (or figure out) the format in which such embedded binary files are embedded in a Worksheet .mw file? The .mw worksheet is a text file.

I thought that it might be base64, but so far haven't been able to confirm that.

For example, suppose that I create a small 64x48...

### JCHelpCallBack

August 08 2008 by Maple

1

0

I would like to investigate the JCHelpCallBack example using OpenMaple. The sample can be found under the directory,

\$MAPLE/samples/OpenMaple/Java/jcmaple/


I've set LD_LIBRARY_PATH. And I can compile and run the jcmaple.java sample. That starts up what appears to be a commandline Maple session. And within that session I can issue the help query ?int OK. I can also issue INTERFACE_HELP(display,topic=int) and that too works, although it dispays as double-lined.

### extending CodeGeneration[C] and array...

June 07 2008 by Maple

2

3

Does anyone know how to extend CodeGeneration[C], using AddFunction, so that the new function's signature matches a specific type of Matrix/Vector/Array?

By specific type I mean a match for a specific combination of indexing function, hardware datatype, order, and storage.

I haven't even had success using the 'anything' type in the signature, for (C) array arguments, for examples with the new function used within a proc and not just as an inlined example.

First the new function's "definition",

 Page 1 of 1