Petar
07-15-2002, 02:52 AM
Hi,
Does anyone know why in C3-3 ( Cubic Spline interpolaton, NR book), first derivation is scaned to be less/grater than 1e30.
Why 1e30!!
Thx,
Petar
Bill Press
07-15-2002, 07:32 PM
Hi, Petar.
That is explained in the main comment in the code. 1E30 is just a very unlikely value for any real problem, so it is used as a flag. The comment says:
If yp1 and/or ypn are equal to 1E30 or larger, the routine is signaled to set the corresponding boundary condition for a natural spline, with zero second derivative on that boundary.
Cheers,
Bill P.
windmaomao
02-13-2003, 03:44 PM
I used to wonder this too.
Bt i know they just want to save a variable space in a way which not general programmer will like :)