Group Abstract Group Abstract

Message Boards Message Boards

0
|
7.4K Views
|
8 Replies
|
9 Total Likes
View groups...
Share
Share this post:

Evaluate [omega(1) .. omega(10000)] in Wolfram|Alpha within few seconds?

I'm new here, paid for Pro and tried:

[omega(1) .. omega(10000)] 

It's still 'COMPUTING ...' for more than one whole hour. Yes, my internet connection is fine and I tried this several times, ... it's really just the online wolframalpha.com service.

However,

[omega(1000) .. omega(2000)] 

all the way up to

[omega(9000) .. omega(10000)]

all take just 2 or 3 seconds each.

So, what is going on here?

8 Replies

Hi,

I am quite familiar with Factor even in the correct syntax, i.e. starting with a capital F and using square brackets. Factor expects a polynomial as input, I hope that you are familiar with that. So Factor is quite boring when you apply it to integers, which makes me believe that you are not familiar with the function "Factor" in the WolframLanguage. It is relatively straight forward to apply it to standard polynomials in WolframAlpha using for example:

Table[Factor[1 + 2 x - k x^2],{k,1,10}]

as input. This can also be done with arrays:

Table[Factor[1 + j x - k x^2],{k,1,10},{j,1,3}]

In this case the result is an array, i.e. a list of lists.

The thing is that it is quite important what "omega" is supposed to be, because of the way that a CAS simplifies/processes the input. A very simple input is this:

Table[Omega[j,k],{k,1,10},{j,1,3}]

You see from my second reply that WolframAlpha interprets your input "omega" as PrimeNu, which does not appear to be what you want; if you are not familiar with PrimeNu you can look it up here. In case you are more familiar with Sin here is how that works:

Table[N[Sin[i+j]],{i,1,3},{j,1,3}]

If WolframAlpha misinterprets your input, you might want to use the WolframCloud which uses proper Wolfram Language Syntax and often helps to formulate your expression in a more concise way. In that case I would suggest learning the basics about the Wolfram Language first. There are fantastic resources for that like this one.

Cheers,

Marco

POSTED BY: Marco Thiel
Posted 10 years ago
POSTED BY: Bill Simpson

You are quite right. I do not understand the issue. What is omega supposed to mean. There is no definition of it. Many people have named different functions omega. Also, what are the ".." supposed to mean? There is a built in meaning for that in MMA/WL, but it is most likely not what you mean. What do you want to express with the square brackets?

What do you want to calculate? What is the meaning of what you want to code?

Cheers,

Marco

POSTED BY: Marco Thiel

That's what I was trying to explain. Square brackets are used in the Wolfram Language to indicate input to a function. Round brackets are not. The code that you submitted does not conform to the Syntax of the Wolfram Language - also you should post it in a code box in this forum.

Anyway, you are right I did not try your code, because it is obviously not Wolfram Language. Now just to make the obvious absolutely certain, I did type it in and it, of course, gives an error message that the code is not complete. Even a cursory look at the documentation confirms that.

Now, you said that you used WolframAlpha which interprets your input and also accepts syntactically incorrect input. The thing is that it sometimes misinterprets what your input. What I wanted to say is that your input will be difficult to interpret for it; and that also to me it is not quite clear what you want to achieve.

If output is misinterpreted it can take a long time to evaluate. I typed the full input into WolframAlpha and it does evaluate within fractions of a second.

enter image description here

I cannot imagine that this is the interpretation you mean. The shorter input also evaluates in no time at all.

enter image description here

Cheers, M.

POSTED BY: Marco Thiel
POSTED BY: Marco Thiel

omega is not significant here. All I want is repeating a calculation over a range of integers and get the result back in an array.

Can you show me how to do that with for example factor()? Or, if you don't know what that is either, for sin()?

Thanks for your answer, but you don't seem to understand the issue yet it seems.

A. I first tried:

 [omega(1) .. omega(1000)]

which was fine.

B. Then I tried:

[omega(1) .. omega(10000)]

which did not return results, not even after 1 hour.

C. The I tried

[omega(1000) .. omega(2000)]

and

[omega(2000) .. omega(3000)]

etcetera, all the way up to:

 [omega(9000) .. omega(10000)]

these too were all fine and returned results within a few seconds.

So my issue is: Why the heck can't:

[omega(1) .. omega(10000)]

which is just 10 of the above executed in one go, return results in less than say 20 seconds???

I never said I tried

[omega(9000) .. omega(10000)] .. [omega(9000) .. omega(10000)]

The .. in the middle was not between ` `, but I admit that was hard to see. I've edited my original post and replaced it with the textual form.

Any thoughts?

Nope, it understands it perfectly well. Did you even try [omega(1000) .. omega(2000)] for example yourself?

Then, if it would not understand, don't you think it should say that immediately instead of 'spinning' for more than an hour (that's when I gave up).

This is just playing with the system, preparing do other things on ranges of integers.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard