Skip to main content

The http://en.wikipedia.org/wiki/Numerical_differentiation#Practical_considerationsWikipedia article on numerical differentiation mentions the formula

$h=\sqrt \epsilon * x$$$ h=\sqrt \epsilon \times x $$

where $\epsilon$ is the machine epsilon (approx. 2.2e-16$2.2\times 10^{-16}$ for 64-bit IEEE 754 doubles), to calculate the optimum "small number" h$h$ to be used in differentiation, such as

$\frac{f(x+h)-f(x)}{h}$

But $$ \frac{f(x+h)-f(x)}{h} $$ But what if x$x$ is zero? Then h$h$ will be zero too, and division by zero is certainly not a way to do numerical differentiation. Is the article wrong? Is it otherwise correct, except that near zero (how near?) some small enough constant (how small?) should be used?

http://en.wikipedia.org/wiki/Numerical_differentiation#Practical_considerations mentions the formula

$h=\sqrt \epsilon * x$

where $\epsilon$ is the machine epsilon (approx. 2.2e-16 for 64-bit IEEE 754 doubles), to calculate the optimum "small number" h to be used in differentiation, such as

$\frac{f(x+h)-f(x)}{h}$

But what if x is zero? Then h will be zero too, and division by zero is certainly not a way to do numerical differentiation. Is the article wrong? Is it otherwise correct, except that near zero (how near?) some small enough constant (how small?) should be used?

The Wikipedia article on numerical differentiation mentions the formula

$$ h=\sqrt \epsilon \times x $$

where $\epsilon$ is the machine epsilon (approx. $2.2\times 10^{-16}$ for 64-bit IEEE 754 doubles), to calculate the optimum "small number" $h$ to be used in differentiation, such as $$ \frac{f(x+h)-f(x)}{h} $$ But what if $x$ is zero? Then $h$ will be zero too, and division by zero is certainly not a way to do numerical differentiation. Is the article wrong? Is it otherwise correct, except that near zero (how near?) some small enough constant (how small?) should be used?

added 1 characters in body
Source Link

http://en.wikipedia.org/wiki/Numerical_differentiation#Practical_considerations mentions the formula

$h=\sqrt \epsilon * x$

where $\epsilon$ is the machine epsilon (approx. 2.2e-16 for 64-bit IEEE 754 doubles), to calculate the optimum "small number" h to be useused in differentiation, such as

$\frac{f(x+h)-f(x)}{h}$

But what if x is zero? Then h will be zero too, and division by zero is certainly not a way to do numerical differentiation. Is the article wrong? Is it otherwise correct, except that near zero (how near?) some small enough constant (how small?) should be used?

http://en.wikipedia.org/wiki/Numerical_differentiation#Practical_considerations mentions the formula

$h=\sqrt \epsilon * x$

where $\epsilon$ is the machine epsilon (approx. 2.2e-16 for 64-bit IEEE 754 doubles), to calculate the optimum "small number" h to be use in differentiation, such as

$\frac{f(x+h)-f(x)}{h}$

But what if x is zero? Then h will be zero too, and division by zero is certainly not a way to do numerical differentiation. Is the article wrong? Is it otherwise correct, except that near zero (how near?) some small enough constant (how small?) should be used?

http://en.wikipedia.org/wiki/Numerical_differentiation#Practical_considerations mentions the formula

$h=\sqrt \epsilon * x$

where $\epsilon$ is the machine epsilon (approx. 2.2e-16 for 64-bit IEEE 754 doubles), to calculate the optimum "small number" h to be used in differentiation, such as

$\frac{f(x+h)-f(x)}{h}$

But what if x is zero? Then h will be zero too, and division by zero is certainly not a way to do numerical differentiation. Is the article wrong? Is it otherwise correct, except that near zero (how near?) some small enough constant (how small?) should be used?

Source Link

Optimum small number for numerical differentiation

http://en.wikipedia.org/wiki/Numerical_differentiation#Practical_considerations mentions the formula

$h=\sqrt \epsilon * x$

where $\epsilon$ is the machine epsilon (approx. 2.2e-16 for 64-bit IEEE 754 doubles), to calculate the optimum "small number" h to be use in differentiation, such as

$\frac{f(x+h)-f(x)}{h}$

But what if x is zero? Then h will be zero too, and division by zero is certainly not a way to do numerical differentiation. Is the article wrong? Is it otherwise correct, except that near zero (how near?) some small enough constant (how small?) should be used?