|
|
In article <442416b6$1@news.povray.org>,
"Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote:
> I've got a weird problem with POV-Ray and I/O...
>
> What I do is write a series of floats and vectors to a file to save the
> transformation of a sphere. I have a macro which gets called and checks if
> the matrix is perpendicular and valid. The file is written after that check.
>
> Nontheless, I get "1.#QNAN" in my file, which of course can't be read. The
> problem doesn't appear all the time, seems to be slightly persistent when I
> make no scene-changes, but generally, it happens right out of the blue. It's
> a single file with which it happens, it runs properly on about 50 other file
> (I'm using my Rolling-Script in conjunction with my particle system).
>
> Any idea how to check if POV-Ray writes a QNAN instead of a value? I'm
> stumped, because POV-Ray doesn't return warning messages or faults with
> divide by zero or such. Why should it write a QNAN then?
>
> Regards,
> Tim
The IEEE standard defines two classes of NaN: quiet NaNs (QNaNs) and
signaling NaNs (SNaNs). A QNaN is a NaN with the most significant
fraction bit set; an SNaN is a NaN with the most significant fraction
bit clear. QNaNs are allowed to propagate through most arithmetic
operations without signaling an exception. SNaNs generally signal an
invalid-operation excep-tion whenever they appear as operands in
arithmetic operations.
I was just thinking that Division by zero in float should not give a
NAN strictly speaking because you can never really express a ZERO in
float, instead it will be a small residual value.
--
klp
Post a reply to this message
|
|