You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
749 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 蒙特卡洛模拟X平方x三次方
-> Math.random函数
-> math.max(a,b)函数
### 随机数的产生
-> f()等概率生产随机数 intMath.random
-> 将函数改造为 01 发生器
-> 采用位运算生成数字的位
-> 利用左移合并生成的数字
-> 遇到不合适的数字就重做
### 通过不等概率,返回等概率
-> 两次返回的相同则重做,两次相反则保留
-> p*(1-p) 返回0
-> (1-p)*p 返回1
-> 实现对数器,生成随机样本能够检验数据
### 二分法查找数字
-> 确定循环条件
-> 调整边界状态
### 二分法查找最左数字,即有重复数字出现
-> 调整二分边界状态,存最小索引
### 归并排序
-> 先左右排序(递归)
-> 后合并merge