forked from nosuggest/Reflection_Summary
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
shataowei
committed
Nov 26, 2019
1 parent
adb0f47
commit 5d21306
Showing
3 changed files
with
76 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 迭代公式推导 | ||
- ![](https://tva1.sinaimg.cn/large/006y8mN6gy1g9bfple4x4j303x00i742.jpg) | ||
- ![](https://tva1.sinaimg.cn/large/006y8mN6gy1g9bfr2t8flj306l00mmwz.jpg) | ||
- ![](https://tva1.sinaimg.cn/large/006y8mN6gy1g9bfruh1klj3043015wea.jpg) | ||
|
||
# 实现它 | ||
``` | ||
def get_ans(nums,count=10000): | ||
ans = nums | ||
if not ans: | ||
return ans | ||
Times = 0 | ||
while Times<count: | ||
ans = 0.5*(ans+nums/ans) | ||
Times+=1 | ||
return ans | ||
``` |