Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. ParallelTable[Pause[1]; i, {i, 1, 80}];// AbsoluteTiming
  2. {1.171367, Null}
  3.  
  4. Table[Sqrt[i], {i, 1, 10^6}]; // AbsoluteTiming
  5. {11.3152, Null}
  6.  
  7. ParallelTable[Sqrt[i], {i, 1, 10^6}]; // AbsoluteTiming
  8. {13.5914, Null}
  9.  
  10. FAuR[w_, b_] := If[b == 0, 0, NIntegrate[1/u Sqrt[u^2 - (w/gAu)^2]
  11. BesselJ[1, b Sqrt[u^2 - (w/gAu)^2]] FFAuR[u^2], {u, w/gAu,
  12. 40}, MinRecursion -> 3, MaxRecursion -> 100,
  13. WorkingPrecision -> 20, PrecisionGoal -> 10,
  14. AccuracyGoal -> Infinity] ]
  15.  
  16. FAuR[1, 1] // AbsoluteTiming
  17. NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. >>
  18. {5.26011, 0.086004396132821223043}
  19.  
  20. FAuR[1, 1] // AbsoluteTiming
  21. NIntegrate::slwcon: Numerical integration converging too slowly; suspect one of the following: singularity, value of the integration is 0, highly oscillatory integrand, or WorkingPrecision too small. >>
  22. {431.500101, 0.086004396132821223043}
  23.  
  24. NIntegrate[FFAuR[Power[x, 1]], {x, 0, 10}] // AbsoluteTiming
  25. {0.990320, 0.353331}
  26.  
  27. NIntegrate[FFAuR[Power[x, 2]], {x, 0, 10}] // AbsoluteTiming
  28. {461.942459,0.580889}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement