|
![](/i/fill.gif) |
On Mon, 17 Jan 2000 16:17:16 -0500, Greg M. Johnson wrote:
>Again, I hound this point not to attack the giants whose shoulder we stand on--pov
>developers--but to have fun at solving a mathematical mystery : what IS pov doing?
void func_exp_xy(void)
{
if (((*calc_stack_top)>0) && ((*calc_stack_top)<16) &&
(FFLOOR(*calc_stack_top)== *calc_stack_top))
{
fint= *(calc_stack_top--);
ftemp1= (*calc_stack_top);
for (; fint>1; fint--) (*calc_stack_top)*= ftemp1;
}
else
{
calc_stack_top--;
*(calc_stack_top)= pow( *(calc_stack_top),*(calc_stack_top+1));
}
}
translated:
in the equation x^y,
if y is an integer between 1 and 15 inclusive
calculate x^y by multiplying x by itself y times.
otherwise,
call the C function pow(x,y) and return its result
directly.
Presumably, pow(x,y) itself does something when presented
with invalid parameters, but what that is isn't specified
in the MSVC documentation. It may be specified in the ANSI
C spec; I haven't checked.
--
These are my opinions. I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html
Post a reply to this message
|
![](/i/fill.gif) |