ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/root.cal
(Generate patch)

Comparing ray/src/cal/cal/root.cal (file contents):
Revision 1.1 by greg, Sat Feb 22 02:07:21 2003 UTC vs.
Revision 1.2 by greg, Sat Sep 4 19:26:09 2010 UTC

# Line 1 | Line 1
1 + { RCSid $Id$ }
2   {
3          root.cal - calculate zeroes of functions using Newton's method.
4  
# Line 18 | Line 19 | abs(x) = if(x, x, -x);
19   lim(x) = if(x, max(x,err), -max(-x,err));
20   max(a,b) = if(a-b, a, b);
21  
22 < f1(f,x) = (f(x+FTINY)-f(x-FTINY))/FTINY/2;      { numerical derivative }
22 > f1(f,x) = (f(x+FTINY)-f(x-FTINY))/(2*FTINY);    { numerical derivative }
23  
24   err = 1e-6;
25   nit = 100;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines