## 25 Reputation

11 years, 220 days

## did it in a rude way so far...

since I am in a hurry to see the effects, i've written a rude step interpolation function myself and continue the computation...

But it really looks as I use golden watch as a hammer.

## did it in a rude way so far...

since I am in a hurry to see the effects, i've written a rude step interpolation function myself and continue the computation...

But it really looks as I use golden watch as a hammer.

## file and more details...

Hello Acer!

Thank you for your reply!   I attach the example, it takes around 5 minutes to generate the data (first integral is done analytically, but the second is only numerical).

I found that increasing the data size 4 times, makes ArrayInterpolation work around 16 times slower!

You see in the example, I use many tricks I learned from You, how to work with numerics...

Maybe there is a faster way to pass arguments to ArrayInterpolation?  I cannot debug it and see what eats time...
Best wishes,

Sergey

 >
 (1.1)
 >
 (1.2)
 >
 >
 >
 (1)
 >
 (2)
 >
 >
 >
 >
 >
 >
 >
 >
 (3)
 >
 (4)
 >
 >
 (5)
 >
 (6)

## file and more details...

Hello Acer!

Thank you for your reply!   I attach the example, it takes around 5 minutes to generate the data (first integral is done analytically, but the second is only numerical).

I found that increasing the data size 4 times, makes ArrayInterpolation work around 16 times slower!

You see in the example, I use many tricks I learned from You, how to work with numerics...

Maybe there is a faster way to pass arguments to ArrayInterpolation?  I cannot debug it and see what eats time...
Best wishes,

Sergey

 >
 (1.1)
 >
 (1.2)
 >
 >
 >
 (1)
 >
 (2)
 >
 >
 >
 >
 >
 >
 >
 >
 (3)
 >
 (4)
 >
 >
 (5)
 >
 (6)

## pow is unknown...

pow is known in older versions, but it's unknown in Maple 16.

evalf(pow(1, 1))  returns unevaluated.

## M_INT type?...

The working compiled procedure seem to involve conversionof double  to M_INT type in some places...  Can it be dangerous???  I mean, is it rounding to integer?

## M_INT type?...

The working compiled procedure seem to involve conversionof double  to M_INT type in some places...  Can it be dangerous???  I mean, is it rounding to integer?

## Thank you, this answers my question!...

Thank you, Acer.  That was helpful!

## Thank you, this answers my question!...

Thank you, Acer.  That was helpful!

## showing You...

Comments:  virgin installation of Ubuntu 11.10.  Maple 15 works ok, Maple 16 gives a bit stange plots...

## Formally, only up to 11.10 is supported...

Formally, only up to Ubuntu 11.10  is supported.  But it's strange anyway.

In the meantime I have tried Maple 16,  it computes integrals better, but still some part of my old worksheet return unevaluated.

I will also try the same under Windows.

## Formally, only up to 11.10 is supported...

Formally, only up to Ubuntu 11.10  is supported.  But it's strange anyway.

In the meantime I have tried Maple 16,  it computes integrals better, but still some part of my old worksheet return unevaluated.

I will also try the same under Windows.

## Thank you...

Thank you for help, Axel!

Anyhow, it may be better to combine Maple with Matlab if I want good numerical efficiency.

## Thank you...

Thank you for help, Axel!

Anyhow, it may be better to combine Maple with Matlab if I want good numerical efficiency.

## still the same problem...

Dear Axel, thank you for trying to help.  I again posted an oversimplified problem. Here is a fuller version:

`This works`
`> Compiler:-Compile(proc (U, kF1, kF2, m, k, omega, q) ((-1)*2.*I*omega*m+k^2+q^2+2.*q*k)/sqrt(6.*k^2*q^2+4.*q*k^3+4.*q^3*k+k^4+q^4+4.*omega^2*m^2) end proc, optimize = true);`
` `
`This does not:> prc := codegen[makeproc]((-(2.*I)*omega*m+k^2+q^2+2.*q*k)/sqrt(6.*k^2*q^2+4.*q*k^3+4.*q^3*k+k^4+q^4+4.*omega^2*m^2), [U, kF1, kF2, m, k, omega, q]);> Compiler:-Compile(prc);Error, (in Print) rational numbers and arithmetic are not yet supported`
` `
`You see that any innocent shuffling of expression with sqrt  (like makeproc) automatically converts it to the form that is not accepted by Compile. `
`I have reported a similar problem of this type  here  http://www.mapleprimes.com/questions/135011-Compiling-Errors`
`It seems like one needs some Wizard tricks to make Compile work!`
 1 2 Page 1 of 2
﻿