大理大学学报 ›› 2025, Vol. 10 ›› Issue (6): 6-10.

• 数学与计算机科学 • 上一篇    下一篇

一个圆周率估计模型的构建与算法改进

  

  1. (1.楚雄彝族自治州民族中学,云南楚雄 675000; 2.大理大学数学与计算机学院,云南大理 671003)
  • 出版日期:2025-06-15 发布日期:2025-06-24
  • 通讯作者: 王彭德,教授,E-mail:wpd66@126.com。
  • 作者简介:刘家华,主要从事中学数学教育研究。
  • 基金资助:
    国家自然科学基金项目(41664005);云南省首批一流本科课程建设项目(教高厅函〔2019〕44号);云南省一
    流本科专业建设点(教高厅函〔2022〕14号);大理大学第八期教育教学改革项目(JGⅧ-9)

The Construction of Pi Estimation Model and the Improvement of Its Algorithm

  1. (1. Chuxiong Yi Autonomous Prefecture Ethnic Middle School, Chuxiong, Yunnan 675000, China; 2. College of Mathematics and
    Computer Science, Dali University, Dali, Yunnan 671003, China)
  • Online:2025-06-15 Published:2025-06-24

摘要: 圆周率的研究不仅是数学家和科学家的兴趣所在,也是数学和科学领域中许多问题与应用的基础。本研究基于蒙特卡罗方法构建了一个采用单位圆外接正多边形投点模型来估计圆周率,并对该模型进行了改进。在实验次数为2 000万次时,利用相对误差对该模型的精度进行比较和分析,并与蒲丰投针实验进行对比。结果显示,单位圆外接正八边形投点模型的精度明显优于蒲丰投针实验,其估计值为3.141 59。结果表明,该模型能够有效提高圆周率估计值的准确性。

关键词: 蒙特卡罗方法, 圆周率, 蒲丰投针, 相对误差分析

Abstract: The study of pi is not only of interest to mathematicians and scientists, but also serves as the foundation for many problems
and applications in the fields of mathematics and science. This study constructed a projection model for estimating pi, which is based
on the Monte Carlo method and uses regular polygons circumscribed about a unit circle, and then improved the model. When the
number of experiments was 20 million, the accuracy of the model was compared and analyzed by using relative error, and was also
compared with that of the Buffon's needle experiment. The results showed that the accuracy of the projection model of the unit circle
circumscribed by an octagon was significantly better than that of the Buffon's needle experiment, with an estimated value of 3.141 59.
The results indicate that the model can effectively improve the accuracy of pi estimation.

Key words: Monte Carlo method, pi, Buffon's needle, relative error analysis

中图分类号: