python c语言混编_Python与Fortran混编配置-f2py-编程工具交流-专业Fortran论坛 -

[Python] 纯文本查看 复制代码{lamb} python

Python 2.7.11 |Anaconda 2.4.1 (64-bit)| (default, Dec 7 2015, 14:10:42) [MSC v.1500 64 bit (AMD64)] on win32

Type "help", "copyright", "credits" or "license" for more information.

Anaconda is brought to you by Continuum Analytics.

Please check out: [url=http://continuum.io/thanks]http://continuum.io/thanks[/url] and [url=https://anaconda.org]https://anaconda.org[/url]

>>> import newton

>>> print newton.__doc__

This module 'newton' is auto-generated with f2py (version:2).

Functions:

f = f(x)

df = df(x)

newton_raphson()

.

>>> newton.newton_raphson()

Enter origin x0 :

5

f(x)= 23.064 when x= 3.589 at iteration 1

f(x)= 6.533 when x= 2.677 at iteration 2

f(x)= 1.680 when x= 2.124 at iteration 3

f(x)= 0.317 when x= 1.845 at iteration 4

f(x)= 0.024 when x= 1.762 at iteration 5

f(x)= 0.000 when x= 1.755 at iteration 6

f(x)= -0.000 when x= 1.755 at iteration 7

1.754878

>>>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值