Items tagged with evalf

Feed

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. 

If i use expression with function add() it runs normaly, but if I use expression with Threads:-Add (parallel implementation) it causes error "Error, continuation task already created for the current task" or "Kernel connection has been lost"

Expression:

Array(1 .. N,1 .. 1/2*N-NR-1,(i, m) -> evalf(Add(cosArr2[modp(k*i,N)]/kl[k],k = 1 .. NR+m-1)+Add(cosArr2[modp(k*i,N)]*alpha[k],k = NR+m .. 1/2*N)))

 

What am I doing wrong? Can I use two Add in one evalf?

The following limit does not return a value. Then the evalf gives a wrong answer.

The answer should be "undefined" or -infinity .. infinity.

limit(exp(n)/(-1)^n, n = infinity) assuming n::posint; evalf(%);


                       /exp(n)              \
                  limit|------, n = infinity|
                       |    n               |
                       \(-1)                /

                               0.

The same happens if you delete the assumption.

 

A similar problem occurs with

limit(sin(Pi/2+2*Pi*n), n = infinity) assuming n::posint;
                            -1 .. 1
without the assumption this would be appropriate.

I was looking at a question on another forum, and tried in Maple also, and Maple also have a problem with this integral. Here is a simple version. The problem is that int() gives different numerical answer from evalf(Int). Maple can't solve this analytically, so values have to be used for the integrand before calling int()

restart;
eq2:=(a/(a + c*z))^L*exp(-z)/sqrt(z);

L:=2:
a:=10^(0.1):
b:=10^(0.1):
c:=0.01*a:
int(eq2,z=0..infinity);   # 177.245
evalf(Int(eq2,z=0..infinity));   # 1.7551


I think the 1.7551 is the correct value. My question is: Why did maple give wrong answer from int()? Is it analytical reason, or purely numerical?

Maple 17.02, windows 7.

Hi everyone. Long time reader, first time poster.

I have a rather nasty function that I need to use in various calculations (namely, one of them is a numerical integration). But, even evaluating this function at a given point takes exceedingly long (several seconds to tens, maybe even hundreds of seconds!). Is there any way I can make maple do all of the calculations numerically instead of doing all but the last evalf symbolically? I think that may be the problem. Anyway, here is my defined function:

How do I do to get a single number (decimal) when I evaluate an input.

 

For example, I write this:

evalf((546, 1/1000000000)*(7, 0)*sqrt(36+1/(7, 0)^2));

but I still get the same thing as I inputed as a response, how do I do to get an actual number?

 

Can somebody explain me this:

 I want to calculate successive roots of the following complex eq.

how can I set interval (?) for fsolve in the following code:

Why won't evalf give me a number.  I have solved for a variable "iDS" higher up in my sheet, and want the approximate value of an element in a matrix.  this element is a function of iDS and no matter what I do, I get the function of iDS!

I really want to use Maple.  I see what it can do, but I often get "stuck" and very frustrated when I can't get it to do what I need it to do.  Sometimes when you are doing assignments, you need a number!

Hi,

Quite often, the result Maple gives involves exponents.

For example:

0.26/0!*e^-0.26.

When I use "evalf", "simplify", or right-click and select "approximate," I always obtain a fraction with e^13/50. How an I get a numerical approximation!

 

Thanks!

when I use s:=evalf(...), maple give me reasonable results but when I use s1:=evalf(...) for the same problem the results are different from previous case!

Can you help me, please?

I have run into some queer behaviour of my Maple 9 software. I gave the following commands:

##############################################################
 with(numtheory):
 xx := invcfrac([[0],[5,1,5,1,4,1]]);
                                        ...

An example:

evalf(frac(10^2*exp(1)));

0.8281828

Two digits lost.

And here is even worse:

evalf(frac(10^9*exp(1)));

0.

Correct unswer:

evalf[20](frac(10^9*exp(1)));

0.4590452354

The correct answer

Interesting behavior!!

> restart
> N := 150; L := LinearAlgebra[RandomVector](N);

                              150

> st := time(); for j to 10^4 do ArrayTools[SearchArray](`~`[`=`](L, max(L))) end do; time()-st;

             ...

I noticed the following behaviour in Maple 16:

x1 := (a)^(b):
eval(x1,[a=103/100]):
evalf[3](%);

                                 b
                             1.03

1 2 3 4 Page 3 of 4