ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/cal/cal/polynomial.cal
Revision: 1.2
Committed: Tue Oct 23 22:19:07 2018 UTC (5 years, 6 months ago) by greg
Branch: MAIN
CVS Tags: rad5R4, rad5R3, HEAD
Changes since 1.1: +2 -2 lines
Log Message:
Comment consistency!

File Contents

# Content
1 { RCSid $Id: polynomial.cal,v 1.1 2018/10/23 22:18:17 greg Exp $ }
2 {
3 Simple Horner's rule evaluation of N-degree polynomial
4 given as coefficient array:
5
6 c(i) : select(i,coef0,coef1,coef2,...,coefN);
7 }
8
9 eval_poly(x,c,i) : if(c(0)-i-.5, x*eval_poly(x,c,i+1), 0) + c(i);
10
11 polynomial(x,c) : eval_poly(x,c,1);