POV-Ray : Newsgroups : povray.beta-test : Radiosity Status: Giving Up... : Re: Radiosity Status: Giving Up... Server Time
29 Jul 2024 12:27:12 EDT (-0400)
  Re: Radiosity Status: Giving Up...  
From: Warp
Date: 31 Dec 2008 20:37:04
Message: <495c1e40@news.povray.org>
clipka <nomail@nomail> wrote:
> Only base-2 logarithms? Hey, big deal :)

> Base-x logarithms (with constant x) are easily done computing the base-2
> logarithm and dividing the result by a constant (namely the base-2 logarithm of
> x).

  In fact, the opcode which calculates the base-2 logarithm is given a
factor. That factor is, rather obviously, the logarithm of the real base
you want it to calculate. So you get, in fact, a logarithm in *any* base
with one single opcode.

  Btw, another advantage of using the FPU rather than calculating in
software is that you could, at least in theory, have the FPU calculating
your operation while the CPU does other (non-FPU) operations at the same
time. I don't know if any compiler is able to opimize like this, though.

  (Of course the same is probably true of the SSE unit as well.)

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.