I’ve an issue with Monte Carlo, I wrote the code, nevertheless it fully doesn’t random, the result’s 0.
g is operate, p and okay is the decrease and higher restrict, n variety of random factors
That is the code i wolfram mathematica:
x[g_, p_, k_, n_] := Module[{s, d, j, z},
s = 0;
d = p - k;
For[j = 1, j <= n, j++,
z = Random[Real, {p, 0}];
s += g[p + z*d];
];
s = d*s/n;
Return[s]]
f[x_] := x*x + 2 x;
a = 0;
b = 1;
n = 500000;
x[g, p, k, n]
The lead to c ++ involves 1.333 in wolfram mathematica 0, I do not know the place the error is. I do not know how one can enhance it.
Best Quality Private Proxies by Proxyti:
fully anonymous
100% anonymous and safe reliable private proxies
1,000 mb/s speed
Blazing fast proxy servers with up to 1,000 mb/s speed
Elite quality
Best quality proxies from world and USA locations
Unlimited bandwidth
No limits of using your proxies - truly unlimited bandwidth
Buy Now - Get 2X More Proxies:
100 Private Proxies
$30/month
200 Private Proxies
$50/month
500 Private Proxies
$100/month
1,000 Private Proxies
$180/month
2,000 Private Proxies
$340/month
5,000 Private Proxies
$750/month
Our Unbeatable Proxy Features:
Anonymous Proxies
100% security with our proxies – anonymous and secure proxy experience
Ultra Fast Speed
Proxyti offers up to 1,000 mb/s ultra fast proxy speed – feel the real power!
Unlimited Bandwidth
No data limits for your proxies – truly unlimited proxy bandwidth for you!
Proxy Authentication
We secure proxies with IP authentication – use your proxies with your own IP
Elite Quality
Highest proxy quality guarantee with supported HTTP/HTTPS and SOCKS connections
Great Prices
Proxyti offers great proxies for great prices – this is what we call new proxy era!
USA Locations
You can choose USA or random proxies locations when ordering for free
No Limitations
We don’t have any limits – you can use your proxies with every software or program!
Lots Of Subnets
The more proxies you buy, the more subnets you get – it is worth ordering more!
Semi Dedicated
Our proxies are shared with maximum of 5 users at a time, but they are still anonymous
Fast Delivery
We deliver your ordered proxies in your email in .txt file – this is simple as that
Awesome Support
Have any questions or want more information – please contact us anytime!