文件名称:NewTon
介绍说明--下载内容均来自于网络,请自行研究使用
Newton迭代法,用Newton迭代法求方程,(内附题目)
#include<stdio.h>
#include<math.h>
#define N 100
#define PS 1e-4
#define TA 1e-4
float Newton(float (*f)(float),float(*f1)(float),float x0 )
{
float x1,d=0
int k=0
do
{
x1= x0-f(x0)/f1(x0)
d=(fabs(x1)<1?x1-x0:(x1-x0)/x1)
x0=x1
k++ -Newton iterative method, using Newton iteration method of equation# include <stdio.h># Include <math.h># Define N 100# define PS 1e-4# define TA 1e-4 float Newton (float (* f) (float), float (* f1) (float), float x0) {float x1, d = 0 int k = 0 do {x1 = x0-f (x0)/f1 (x0) d = (fabs (x1) < 1? x1-x0: (x1-x0)/x1) x0 = x1 k++
#include<stdio.h>
#include<math.h>
#define N 100
#define PS 1e-4
#define TA 1e-4
float Newton(float (*f)(float),float(*f1)(float),float x0 )
{
float x1,d=0
int k=0
do
{
x1= x0-f(x0)/f1(x0)
d=(fabs(x1)<1?x1-x0:(x1-x0)/x1)
x0=x1
k++ -Newton iterative method, using Newton iteration method of equation# include <stdio.h># Include <math.h># Define N 100# define PS 1e-4# define TA 1e-4 float Newton (float (* f) (float), float (* f1) (float), float x0) {float x1, d = 0 int k = 0 do {x1 = x0-f (x0)/f1 (x0) d = (fabs (x1) < 1? x1-x0: (x1-x0)/x1) x0 = x1 k++
(系统自动生成,下载前可以参看下载内容)
下载文件列表
newton.c
实验15 Newton迭代法.doc