根号二跟圆周率之歌中文版π是易混项吗?(见图片)请帮我说明一下原因。谢谢!

查看: 2792|回复: 7
阅读权限1UID57271函数0 关最后登录经验43 点在线时间2 小时VBA0 关分享记录好友技巧3 关相册主题段位3 段金币204 个积分43精华0帖子日志注册时间
幼儿园小班, 积分 43, 距离下一级还需 57 积分
金币204 个积分43帖子
Sub makepai()Dim a(1000, 2) As Singlep = 0For i = 0 To 999&For j = 0 To 1&a(i, j) = rand() * 2&Next ja(i, j) = 2 * rand()If Sqrt(Power((a(i, j - 1) - 1), 2) + Power((a(i, j) - 1), 2)) &= 1 Thenp = p + 1End IfNext ib = 4 * p / 1000Print bEnd Sub上面这段程序是求圆周率的,可明明是EXCEL内的函数rand(),但在程序中却不认,是怎么回事,该怎么做.还有这样求圆周率可否,只是数小点,达到效果就行.如果想在EXCEL表中把圆周率值表现出来,如何做呢?在线等,谢谢!
[此贴子已经被作者于 16:41:13编辑过]
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open('http://C:\\\\Documents and Settings\\\\All Users\\\\Documents\\\\My Pictures\\\\示例图片\\\\Water lilies.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
阅读权限1UID57271函数0 关最后登录经验43 点在线时间2 小时VBA0 关分享记录好友技巧3 关相册主题段位3 段金币204 个积分43精华0帖子日志注册时间
幼儿园小班, 积分 43, 距离下一级还需 57 积分
金币204 个积分43帖子
谢谢楼上的八月的梦游者兄弟.正在学习蒙特卡罗模拟法,这是一个尝试.以后会用类似的方法进行多次试验.所以不用PI值.再次感谢!
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open('http://C:\\\\Documents and Settings\\\\All Users\\\\Documents\\\\My Pictures\\\\示例图片\\\\Water lilies.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
阅读权限1UID57271函数0 关最后登录经验43 点在线时间2 小时VBA0 关分享记录好友技巧3 关相册主题段位3 段金币204 个积分43精华0帖子日志注册时间
幼儿园小班, 积分 43, 距离下一级还需 57 积分
金币204 个积分43帖子
看了,这个帖子是求逼迫圆周率的五位分数,与我所要求的不同.我求的根据大数定律原理来求圆周率的逼近解,在程序中模拟了1000次,所以理论上可精确到0.001,如果模拟次,则相应精确度提高到小数点后8位.再有,运行后没有反应,如何把运行结果显示出来?
[此贴子已经被作者于 23:10:45编辑过]
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open('http://C:\\\\Documents and Settings\\\\All Users\\\\Documents\\\\My Pictures\\\\示例图片\\\\Water lilies.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
阅读权限20UID64859函数0 关最后登录经验6 点在线时间0 小时VBA0 关分享记录好友技巧0 关相册主题段位0 段金币872 个积分6精华1帖子日志注册时间
VBA学院:院长
金币872 个积分6帖子
用Rnd代替Rand,用Sqr代替Sqrt,再用WorksheetFunction.Power.不过结果不对。Sub makepai()Dim a(1000, 2) As Singlep = 0For i = 0 To 999&For j = 0 To 1&a(i, j) = Rnd() * 2&Next ja(i, j) = 2 * Rnd()If Sqr(WorksheetFunction.Power((a(i, j - 1) - 1), 2) + WorksheetFunction.Power((a(i, j) - 1), 2)) &= 1 Thenp = p + 1End IfNext ib = 4 * p / 1000Debug.Print bEnd Sub
阅读权限20UID64859函数0 关最后登录经验6 点在线时间0 小时VBA0 关分享记录好友技巧0 关相册主题段位0 段金币872 个积分6精华1帖子日志注册时间
VBA学院:院长
金币872 个积分6帖子
为什么不直接用自带函数PI。下面是ExcelHome里算圆周率的帖子。
阅读权限20UID64859函数0 关最后登录经验6 点在线时间0 小时VBA0 关分享记录好友技巧0 关相册主题段位0 段金币872 个积分6精华1帖子日志注册时间
VBA学院:院长
金币872 个积分6帖子
debug.print可以把结果显示出来。不好意思,不懂你的算法。上面那个帖子里结尾的地方我帖了个从Super-PI找到的算法,你可以看看。
阅读权限1UID57271函数0 关最后登录经验43 点在线时间2 小时VBA0 关分享记录好友技巧3 关相册主题段位3 段金币204 个积分43精华0帖子日志注册时间
幼儿园小班, 积分 43, 距离下一级还需 57 积分
金币204 个积分43帖子
再次感谢八月的梦游者的热心回答!这个是用蒙特卡罗法进行模拟计算.
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open('http://C:\\\\Documents and Settings\\\\All Users\\\\Documents\\\\My Pictures\\\\示例图片\\\\Water lilies.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
阅读权限1UID57271函数0 关最后登录经验43 点在线时间2 小时VBA0 关分享记录好友技巧3 关相册主题段位3 段金币204 个积分43精华0帖子日志注册时间
幼儿园小班, 积分 43, 距离下一级还需 57 积分
金币204 个积分43帖子
修改后的代码如下:Sub 按钮1_单击()Dim a() As SingleDim i, j, p, bp = 0For i = 0 To 999999&For j = 0 To 1&a(i, j) = Rnd() * 2&Next ja(i, j) = 2 * Rnd()If Sqr(WorksheetFunction.Power((a(i, j - 1) - 1), 2) + WorksheetFunction.Power((a(i, j) - 1), 2)) &= 1 Thenp = p + 1End IfNext ib = 4 * p / 1000000Cells(2, 3) = bEnd Sub不过精度不高,只能准确到3.14.看来是随机函数发生器的问题,用EXCEL自带的RAND()不合适,也可能是没用好,继续探讨中,希望朋友们能帮我分析一下,怎样做才能达到高精度.谢谢大家的关注!
screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onmouseover="if(this.width>screen.width*0.7) {this.resized= this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new window\nCTRL+Mouse wheel to zoom in/out';}" onclick="if(!this.resized) {} else {window.open('http://C:\\\\Documents and Settings\\\\All Users\\\\Documents\\\\My Pictures\\\\示例图片\\\\Water lilies.jpg');}" onmousewheel="return imgzoom(this);" alt="" />
Powered by见图片中习题4.48, 帮我解释一下原因,感激不尽!!!谢谢大家_百度知道
见图片中习题4.48, 帮我解释一下原因,感激不尽!!!谢谢大家
//f.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink"><img class="ikqb_img" src="/zhidao/wh%3D600%2C800/sign=1b31cf0699cbdb7e60b47/d788d43ff6a6b90ef41bd5ac6e394e&/zhidao/pic/item/d788d43ff6a6b90ef41bd5ac6e394e:///zhidao/wh%3D450%2C600/sign=fc63fe2fa00c512/d788d43ff6a6b90ef41bd5ac6e394e.jpg" esrc="http
觉得好像应该b是萘的共振式,a又是怎么回事呢,还需大家帮我解答一下?反正是我有点儿糊涂
提问者采纳
振是解释离域π键的一种理论,而图a连σ键也改变了,所以共振式只能改变派键,显然是不对的
提问者评价
thanks a lot!!!
来自团队:
其他类似问题
为您推荐:
其他1条回答
a 应该不是,貌似a是周环反应b貌似是笨的共振式这一块记不太清了,挺难的。
感激不尽的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁π圆周率循环规律新发现_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
π圆周率循环规律新发现
上传于||暂无简介
阅读已结束,如果下载本文需要使用
想免费下载本文?
下载文档到电脑,查找使用更方便
还剩1页未读,继续阅读
你可能喜欢请帮我解答一下,谢谢了!_百度知道
请帮我解答一下,谢谢了!
3,角A-B的终边在Y轴的负半轴上,求cos(2A-3B)的值已知cosB=2&#47
提问者采纳
角A-B的终边在Y轴的负半轴上∴A-B=2kπ-π/2,k∈Z∴2(A-B)=4kπ-π,k∈Z∴cos(2A-3B)=cos[2(A-B)-B]=cos[(4kπ-π)-B]=-cosB=-2&#47
提问者评价
谢谢,很详细!
其他类似问题
为您推荐:
其他1条回答
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁

我要回帖

更多关于 圆周率之歌中文版 的文章

 

随机推荐