Carl Love

Carl Love

28035 Reputation

25 Badges

12 years, 319 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@epostma Vote up.

Yes, I'd consider two-asterisk-flagged anomalies that disappear upon rerunning with a different randomize seed to have "passed" the test. Indeed, my criteria for the asterisk counts were

*     1/20   <  significance level (alpha) < 1/200  (alpha = 1/20 is widely used historical value)
**    1/200  <                   "         < 1/2000
***   1/2000 <                   "         < 1/2e4

etc. Since my test run posted as an Answer shows 336 p-values, under the null hypothesis of "true randomness" we'd expect about 17 one-asterisk flags and about 2 two-asterisk flags. So, your new sampling code is right on target.

@Kitonum It's a good point in general. But in this case we're dealing with polynomials. 

@666 jvbasha 

eval(diff(f, x$2), p union {x=0});

@Shah Fahd As far as I can tell, there's no way to use ifactor "off-the-shelf" for multiprocessing the factorization of a single large integer. However, I think it'd be possible to pull the Maple code out from the ifactor subprocedures and refactor it for multiprocessing.

I'd be interested in coding Number Field Sieve in Maple if you can provide detailed exposition (with or without pseudocode). From my reading just now, I understand that there are numerous heuristic choices to be made at various steps in the algorithm.

I don't recall ever seeing an error message that gave the exact position and exact library entry where the error occurred. That's very useful. Does anyone know if that information is generally available (perhaps from a debugopts command)?

@Yaongyaong 

Did you not understand the part of my Answer under the plot where I computed the surface area? I'd be happy to explain it in more detail. Do you know cylindrical coordinates: x = r*cos(theta), y = r*sin(theta), z = z?

@Carl Love I got your integral to work in Maple Companion by entering

int ln(x)/x*BesselJ(1,x)dx

where

int is the indefinite integral from the functions keyboard;
ln( is ln from the functions keyboard (the comes with it);
is the variable from the main keyboard (not the alphabetic keyboard);
is from the main keyboard;
is division from the main keyboard;
ditto;
is multiplication from the main keyboard;
BesselJ is (carefully) typed from the alphabetic keyboard;
is from the main keyboard;
1 ditto;
is from the main keyboard, but you need to hold down the and swipe up and to the right to get it (the gesture required a little practice to get right, but I've mastered it now);
is from the main keyboard;
dx comes "for free" when you enter the integral sign, and it's probably best if you ignore it.

The computation is then activated by the blue-highlighted check mark from the main keyboard. The result is
 

int(ln(x)*BesselJ(1, x)/x, x)

Integrate

((1/2)*ln(2)*(-BesselJ(0, x)*Pi*StruveH(1, x)+BesselJ(1, x)*Pi*StruveH(0, x)+2*BesselJ(0, x))+ln(x)*BesselJ(0, x)-ln(2)*BesselJ(0, x)-(1/2)*ln(x)*BesselJ(0, x)*Pi*StruveH(1, x)+BesselJ(0, x)*Pi*StruveH(1, x)*ln(2)+(1/2)*ln((1/2)*x)*BesselJ(0, x)*Pi*StruveH(1, x)-BesselJ(0, x)*(D[1](LommelS1))(1, 1, x)+(1/2)*BesselJ(1, x)*Pi*StruveH(0, x)+(1/2)*ln(x)*BesselJ(1, x)*Pi*StruveH(0, x)-BesselJ(1, x)*Pi*StruveH(0, x)*ln(2)-(1/2)*ln((1/2)*x)*BesselJ(1, x)*Pi*StruveH(0, x)+BesselJ(1, x)*(D[1](LommelS1))(0, 0, x))*x-ln(x)*BesselJ(1, x)-BesselJ(1, x)


 

Download MC_BesselInt.mw

That result can be substantially simplified, as I showed in previous Replies above.

 
 
 

@Karishma I got BesselJ to work now. I don't know what I did wrong before. Thanks for asking, though.

@Mac Dude This happened for me also. It's frustrating when you've composed an Answer, and, poof, it disappears into the ether. No way to retrieve it.

@HS A warning is not an error, and you say that it "does not seem to work" while I see it working just fine despite the warning.

The reason for the warning is that you have a procedure which is changing the status of an undeclared global name, q. This is usually something worth warning about. A better way to code it is to pass in the name that will be aliased:

restart:
`mod/field`:= proc(k::And(posint, Not(1)), q::name, p::prime)    
local z;
   alias(q= RootOf(Randprime(k,z) mod p, z));
   q
end proc:

field(2, ':-q') mod 13;
field(3, ':-q') mod 13;

The purpose of the ':-q' rather than just q is so that any previous value or alias that q may have will be ignored, and it'll be passed as just an unassigned name.

Now---unlike your original---you can use this procedure to create multiple extensions with different names:

field(2, ':-q1') mod 13;
field(3, ':-q2') mod 13;

You can also return the irreducible polynomial if you insist; however, I find that redundant because that polynomial can always be accessed as op(q)op(q1), etc.

I was indeed of the opinion that this should be a Post, and I made it so. And voted up.

@HS Our two most-recent Replies crossed each other. So, it seems that you understand what I mean by "nontrivial example".

@vv The reason that I brought up the issue of what the OP expects as output is that it seems as if they expect something to happen with respect to the extended finite field, as in the oft-repeated phrase "mod out by q", where q is the RootOf of the irreducible extension polynomial. It's not possible for the extension to have any effect on the output if it doesn't appear in the input; the computations within the degree-1 subfield suffice in that case. So, I was hoping for the OP to provide a nontrivial example. That being said, Normal is likely what will provide the OP's expected output for that nontrivial example. By nontrivial, I simply mean that the extension should come into play somehow.

@vv I meant that they did nothing special in the case at hand. Of course in the general case they do something special with respect to finite-field arithmetic, lest they wouldn't have been written.

@ianmccr No offense taken, not in the slightest! You have a genuine and serious issue here. And now that you've defined URI, I understand your problem. Other than that, I don't know a solution, other than to workaround by maintaining separate files in a folder, as we've done for decades. But you probably already realize that workaround.

First 233 234 235 236 237 238 239 Last Page 235 of 708