highsciguy

75 Reputation

7 Badges

11 years, 128 days

MaplePrimes Activity


These are questions asked by highsciguy

This is a question I have also submitted to the technical support, I am worried that it is a bit too technical for them, however:)

I am debugging a C program which links against the OpenMaple API library (under Linux and with Maple 17 and 18). I am using valgrind memcheck, because I am experiencing strange behavior which could be due to writes beyond allocated blocks of memory.  

The first thing which jumps to my eye, are many errors of the types

Use of uninitialised value of size (4/8/16)

Invalid read of size (4/8/16)

Conditional jump or move depends on uninitialised value(s)

The same errors are also printed when I use the examples that ship with Maple. For instance, I compile "simple.c" with

gcc  -Wl,--no-as-needed -lmaple -lmaplec -lrt -L /usr/lib -L $MAPLEDIR/bin.X86_64_LINUX -I $MAPLEDIR/extern/include -o simple simple.c

and run valgrind as

valgrind --tool=memcheck --error-limit=no --log-file=memcheck.log ./simple

memcheck.txt 

Some, but not all, of the errors occur in __intel_sse2_strcpy or __intel_sse2_strlen. Furthermore, according to valgrind there are definite memory leaks. which appear in the library. 

Practically this makes it hard for me to identify my potential own errors. I am a bit surprised to see so many warnings because I tend to fix my own programs until memcheck does not print these anymore (before I give it away at least). The question is: Can I consider these errors as safe to ignore? How would I distinguish real errors which may appear in my application?

I am considering options to access Maple features from within a Fortran program using the OpenMaple API. I do not find any examples illustrating this (or even precise statements if this is possible in principle). (Quite surprising to me considering the presence of Fortran in scientific computing).

Is the only way to go to write a C wrapper for the API? If yes, is there an example for such a wrapper which performs common conversions between Fortran and C data types.

Thanks!

I would like to implement a rule for typeseting delayDotProduct in latex exports (in which this expressions appears in plain form). It corresponds to dot products of vectors/matrices with the "." operator. I tried to define 

`latex/Typesetting:-delayDotProduct`:=proc(f1,f2,f3)
sprintf("{ {%s}{%s} }",cat(`latex/print`(f1)),cat(`latex/print`(f2)))
end proc:

which does not do the job. 

Edit:

A related question: How can I make

D[1,1](x)(t)

produce x''(t) in latex output?

For different reasons I need to ocasionally export a number of Maple worksheet in a folder to pdf files. Is there a way to automate this? I would want that the worksheet is opened, output removed, then executed and eventually exported to pdf. It can take quite a while to do this manually for about 50 worksheets.

I would like to tell Maple to evaluate all numbers in an expression using floating point numbers (of a desired precision). Short example:

evalf[30](x^(1/12));

prints

x^(1/12)

while I want it to print 

x^(0.0833333333333333333333333333333)

Note that the real expression may be arbitrarily complicated. I know that it is possible easily because I have already seen this somewhere, but I don't remember it. 

1 2 3 Page 1 of 3