Re: Accelerating the Buddhabrot with the Metropolis-Hastings algorithm




caos.snow@xxxxxxxxx wrote:
http://graphics.stanford.edu/courses/cs348b-03/lectures/metrofinal.pdf#search=%22%22Metropolis%20sampling%22%20%22

that seems to make lot of sense with what I see in Steckles's (Alex's)
code. I have a question however: why do you use a exp/log
transformation to calculate the aceptance function? Is is because the
values on the fraction are very big and log()-ing and exp()-ing fixes
it? Thx.

It's a hold over from my old MLT raytracer. The algorithm can produce a
lot of values that are very, very close to zero and exp(log(a')-log(a))
tends to be more stable than a' / a while giving results that are
equally usable. This is especially true when your primary data type are
floats rather than doubles. It's probably not needed because the
program doesn't rely on floats and it's not so much of a problem.

.



Relevant Pages

  • Re: indirect sort
    ... and cast the result to 'int'. ... Since the floating-point zero is all zeroes, that will come out as zero, as it should. ... You *might* be able to protect yourself from this happening by casting the doubles to floats before subtracting - i don't know what happens to really small denormal doubles when you cast to float. ...
    (comp.lang.java.programmer)
  • Re: Division by zero: float vs. int
    ... > when dividing by zero while floats just assumes the number is Infinity ...
    (comp.lang.java.programmer)
  • Re: Will the following code assert:
    ... IEEE standard floats have a defined bit pattern. ... There is also a -0 where the bit pattern is not all zero. ... Your assert will probably fail in these cases. ...
    (microsoft.public.vc.language)
  • Re: Float comparison
    ... Apart from division by zero, you can't generate a value outside ... Right, the floats follow defined rules, and under those rules, ... Reals are closed. ... applying that operation to members of the set always yields a member ...
    (comp.lang.c)
  • Re: Division by zero: float vs. int
    ... >> integer and float types. ... >> when dividing by zero while floats just assumes the number is Infinity ... Both integers and floats have a finite number of bits. ...
    (comp.lang.java.programmer)

Loading