acer

32722 Reputation

29 Badges

20 years, 87 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

What happens if you pan the plot around a little? I can get the curve to appear, if I just do that in the Maple 16.02 Std GUI.

Also, the plot data structure generated in Maple 16.02 renders ok, as is, in Maple 15.01.

I agree with Alejandro, it seems like a Std GUI plot renderer problem.

I don't have a copy of Maple 16.00 or Maple 16.01 around, to see if either of those has the problem.

(This may be another report of the problem.)

acer

What happens if you pan the plot around a little? I can get the curve to appear, if I just do that in the Maple 16.02 Std GUI.

Also, the plot data structure generated in Maple 16.02 renders ok, as is, in Maple 15.01.

I agree with Alejandro, it seems like a Std GUI plot renderer problem.

I don't have a copy of Maple 16.00 or Maple 16.01 around, to see if either of those has the problem.

(This may be another report of the problem.)

acer

Double precision floats are 64bit on the platforms (compiler, OS) in which Maple is built and run, regardless of the length of a pointer (memory address) , word, or long int.

And 64bit hardware precision floats in Maple (evalhf, HFloat, etc) have a 53bit significand (IEEE 754) which is slightly less than 16 decimal digits (or 15 whole decimal digits, to put it another way).

See wikipedia, etc.

On "64bit" Maple 16.02 (Windows 7),

evalhf(DBL_EPSILON);

                                         -16
                   2.22044604925031308 10   

kernelopts(version);

   Maple 16.02, X86 64 WINDOWS, Nov 18 2012, Build ID 788210

kernelopts(maximmediate);

                      4611686018427387903

kernelopts(wordsize);

                               64

while, on the same OS, using "32bit" Maple 16.02,

evalhf(DBL_EPSILON);

                                         -16
                   2.22044604925031308 10   

kernelopts(version);

    Maple 16.02, IBM INTEL NT, Nov 18 2012, Build ID 788210

kernelopts(maximmediate);

                           1073741823

kernelopts(wordsize);

                               32

acer

Double precision floats are 64bit on the platforms (compiler, OS) in which Maple is built and run, regardless of the length of a pointer (memory address) , word, or long int.

And 64bit hardware precision floats in Maple (evalhf, HFloat, etc) have a 53bit significand (IEEE 754) which is slightly less than 16 decimal digits (or 15 whole decimal digits, to put it another way).

See wikipedia, etc.

On "64bit" Maple 16.02 (Windows 7),

evalhf(DBL_EPSILON);

                                         -16
                   2.22044604925031308 10   

kernelopts(version);

   Maple 16.02, X86 64 WINDOWS, Nov 18 2012, Build ID 788210

kernelopts(maximmediate);

                      4611686018427387903

kernelopts(wordsize);

                               64

while, on the same OS, using "32bit" Maple 16.02,

evalhf(DBL_EPSILON);

                                         -16
                   2.22044604925031308 10   

kernelopts(version);

    Maple 16.02, IBM INTEL NT, Nov 18 2012, Build ID 788210

kernelopts(maximmediate);

                           1073741823

kernelopts(wordsize);

                               32

acer

restart:
s := sum((-1)^(n+1)/(n^2+a), n=1..infinity):

expand(radnormal(combine(simplify(s))));

                   1                 1       (1/2)    
                   - I Pi            - I (-a)         
                   2                 2               1
          ------------------------ - ------------- + -
           (1/2)    /       (1/2)\       (3/2)       a
          a      sin\Pi (-a)     /      a             

But not so easy an invocation to find.

acer

@mriedel I was not trying to suggest that it was always easy to force Maple's hand, but rather that there may be some additional simple attempts that Maple could take automatically. That is, when splitting a sum, and [if some conditions hold then] when trying to recombine the results.

Perhaps we are agreeing more than disagreeing.

For example, since Maple sometimes handles just cos & sin better than, say, cot & tan, then according to what functions are found steps like the following might be taken (nb. simplification in general is hard),

S1:=sum((-1)^((2*n)+1)/((2*n)^2+a),n=1..infinity):
S2:=sum((-1)^((2*n-1)+1)/((2*n-1)^2+a),n=1..infinity):
combine(convert(S1+S2,sincos),trig);

                          (1/2)    /       (1/2)\
              -Pi a - (-a)      sin\Pi (-a)     /
              -----------------------------------
                       (3/2)    /       (1/2)\   
                 2 (-a)      sin\Pi (-a)     /   
restart:

S0:=sum((-1)^(n+1)/(n^2+a),n=1..infinity) assuming a>0;

   1   /
 ----- |
 1 + a |
       \
     1    /1           /1    /1   1   /     (1/2)\\
 - ------ |- I (1 + a) |- Psi|- - - I \I + a     /|
    (1/2) \2           \2    \2   2               /
   a                                               

      1    / 1   /     (1/2)\\\\     1    /1           /1    /1
    - - Psi|-- I \I + a     /||| + ------ |- I (1 + a) |- Psi|-
      2    \ 2               ///    (1/2) \2           \2    \2
                                   a                           

      1   /     (1/2)\\   1    / 1   /     (1/2)\\\\\
    - - I \I - a     /| - - Psi|-- I \I - a     /||||
      2               /   2    \ 2               ///|
                                                    /

S1:=Sum((-1)^((2*n)+1)/((2*n)^2+a),n=1..infinity);

                     infinity             
                      -----               
                       \         (2 n + 1)
                        )    (-1)         
                       /     -------------
                      -----       2       
                      n = 1    4 n  + a   

S2:=Sum((-1)^((2*n-1)+1)/((2*n-1)^2+a),n=1..infinity);

                     infinity              
                      -----                
                       \           (2 n)   
                        )      (-1)        
                       /     --------------
                      -----           2    
                      n = 1  (2 n - 1)  + a

S12:=simplify(value(S1+S2),size) assuming a>0;

          /1     (1/2)\        (1/2)          /1     (1/2)\  
  -Pi coth|- Pi a     | a + 2 a      + Pi tanh|- Pi a     | a
          \2          /                       \2          /  
  -----------------------------------------------------------
                              (3/2)                          
                           4 a       
                        
simplify(expand(convert(combine(convert(S0-S12,expln)),expln))) assuming a>0;

                               0

[edit]

SZ:=expand(combine(expand(simplify(simplify(value(S1+S2),size))))) assuming a>0;

                  1               Pi           
                 --- - ------------------------
                 2 a      (1/2)     /    (1/2)\
                       2 a      sinh\Pi a     /

simplify(expand(convert(combine(convert(S0-SZ,expln)),expln))) assuming a>0;

                               0

It may be a matter of personal preference whether SZ above is simpler as it is, or as converted to `csc` or `csch`, etc.

acer

@Markiyan Hirnyk 

Converting with parse(sprintf(..)) of a float format is one obvious way to treat individual floats (if this is in fact what the Asker wants).

The `subsindets` selection of all things of type `float` may work for this particular example where only the coefficients are to be changed. But it could be too heavy handed in other scenarios where some floats (eg, coefficients) were on target but other floats (eg. exponents) were not. Finer discrimination might be needed. But that too is pretty obvious.

@Markiyan Hirnyk 

Converting with parse(sprintf(..)) of a float format is one obvious way to treat individual floats (if this is in fact what the Asker wants).

The `subsindets` selection of all things of type `float` may work for this particular example where only the coefficients are to be changed. But it could be too heavy handed in other scenarios where some floats (eg, coefficients) were on target but other floats (eg. exponents) were not. Finer discrimination might be needed. But that too is pretty obvious.

@Blackkeeper Did you intend 'LIB'="add.dll" instead?

@Blackkeeper How exactly did you create wave.dll? It would be most helpful if you could give the commandline (cygwin?) set of commands you used to build it.

Is the symbol `play` exported from wave.dll? Does that symbol (name) have any decorations (due to C++)?

Your C++ source code has omissions. Some of the includes got wiped out, due to misinterpretation by mapleprimes of the angle-brackets, I suspect.

Carl, did you intend to add the option to disable adaptive plotting, so as to strictly enforce the numpoints value?

If not, then as written the code took my Win7 16.02 about 35sec, and produced about 125000 value points. There's nothing wrong with that many points per se (if that's what you wanted), but it does become an example which can be sped up. If it's as intended then I wouldn't mind adding it as an example in a post I'm working on...

acer

Before any other considerations: it should be wave(filename) from within Maple.

acer

Thank you, gentlemen. This looks like just what I wanted. I ought to have gotten there by myself, sorry.

acer

Thank you, gentlemen. This looks like just what I wanted. I ought to have gotten there by myself, sorry.

acer

First 388 389 390 391 392 393 394 Last Page 390 of 599