|
|
If I have understood the documentation
for the new sum() and prod() functions
right, then POV-Ray v3.5 for Windows
behaves very oddly in some cases.
I have observed two different beahiours:
1)
When I run some code with these
functions, POV-Ray just "hangs" and
does not finish parsing, even if the
calculations are very short. In this
state it does not react when I press
the Stop button.
When I try to close it down, then it
says "POV-Ray is currently rendering -
do you want to stop ?".
If I answer Yes, then POV-Ray closes
down as it should. If I answer No,
then POV-Ray just continues to "hang".
The Pause button is working OK.
2)
When I run some other code with these
functions, POV-Ray finishes but
produces wrong results.
Can anyone confirm this behaviour ?
I have inserted my test code below.
The relevant documentation is here:
http://www.povray.org/documentation/view/140/
(Section 6.1.6.1)
My PC runs Win98SE and has a 166MHz MMX
Pentium processor with 96MB of RAM.
Tor Olav
#version 3.5;
// Test of sum() function
// Hangs. Should have given 1.233701
#declare Fn = function(x) { sum(i, 1, 2, atan2(1, 1)*atan2(1, 1)) }
// Hangs. Should have given 0
// #declare Fn = function(x) { sum(i, 1, 2, pow(x, i) + pow(x, i)) }
// Hangs. Should have given 0
// #declare Fn = function(x) { sum(i, 1, 2, pow(x, 2)*pow(x, 2)) }
// Hangs. Should have given 4
// #declare Fn = function(x) { sum(i, 1, 2, pow(1, 2) + pow(1, 2)) }
// Finishes, but with wrong result: 66 instead of 17
// #declare Fn = function(x) { sum(i, 1, 2, pow(i, 2)*pow(i, 2)) }
// Finishes, but with wrong result: 2.826822 instead of 1.534895
// #declare Fn = function(x) { sum(i, 1, 2, sin(i)*sin(i)) }
// Finishes, but with wrong result: 2 instead of 0
// #declare Fn = function(x) { sum(i, 1, 2, sin(x)*sin(x)) }
// Test of prod() function
// Hangs. Should have given 0.380504
// #declare Fn = function(x) { prod(i, 1, 2, atan2(1, 1)*atan2(1, 1)) }
// Hangs. Should have given 0
// #declare Fn = function(x) { prod(i, 1, 2, pow(x, i) + pow(x, i)) }
// Hangs. Should have given 0
// #declare Fn = function(x) { prod(i, 1, 2, pow(x, 2)*pow(x, 2)) }
// Hangs. Should have given 4
// #declare Fn = function(x) { prod(i, 1, 2, pow(1, 2) + pow(1, 2)) }
// Finishes, but with wrong result: 128 instead of 16
// #declare Fn = function(x) { prod(i, 1, 2, pow(i, 2)*pow(i, 2)) }
// Finishes, but with wrong result: 1.653644 instead of 0.585451
// #declare Fn = function(x) { prod(i, 1, 2, sin(i)*sin(i)) }
// Finishes with correct result: 0, but gives wrong result for Fn(1)
// #declare Fn = function(x) { prod(i, 1, 2, sin(x)*sin(x)) }
// #declare SumFn = function(A, B) { A + B } // Uncomment for tests below
// Test of sum() function
// Hangs. Should have given 18
// #declare Fn = function(x) { sum(i, 1, 2, SumFn(i, 1)*SumFn(i, 2)) }
// Finishes, but with wrong result: 3 instead of 4
// #declare Fn = function(x) { sum(i, 1, 2, SumFn(x, 1)*SumFn(x, 2)) }
// Finishes, but with wrong result: 4 instead of 7
// #declare Fn = function(x) { sum(i, 1, 2, SumFn(x, 1)*SumFn(i, 2)) }
// Test of prod() function
// Hangs. Should have given 72
// #declare Fn = function(x) { prod(i, 1, 2, SumFn(i, 1)*SumFn(i, 2)) }
// Finishes, but with wrong result: 2 instead of 4
// #declare Fn = function(x) { prod(i, 1, 2, SumFn(x, 1)*SumFn(x, 2)) }
// Finishes, but with wrong result: 3 instead of 12
// #declare Fn = function(x) { prod(i, 1, 2, SumFn(x, 1)*SumFn(i, 2)) }
#debug "\n"
#debug str(Fn(0), 0, -1)
#debug "\n\n"
Post a reply to this message
|
|
|
|
"Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
news:web.3e1e2ad581e209a5b417814a0@news.povray.org...
>
> If I have understood the documentation
> for the new sum() and prod() functions
> right, then POV-Ray v3.5 for Windows
> behaves very oddly in some cases.
>
> I have observed two different beahiours:
>
> 1)
> When I run some code with these
> functions, POV-Ray just "hangs" and
> does not finish parsing, even if the
> calculations are very short. In this
> state it does not react when I press
> the Stop button.
>
> When I try to close it down, then it
> says "POV-Ray is currently rendering -
> do you want to stop ?".
>
> If I answer Yes, then POV-Ray closes
> down as it should. If I answer No,
> then POV-Ray just continues to "hang".
>
> The Pause button is working OK.
>
> 2)
> When I run some other code with these
> functions, POV-Ray finishes but
> produces wrong results.
>
>
> Can anyone confirm this behaviour ?
>
> I have inserted my test code below.
>
> The relevant documentation is here:
> http://www.povray.org/documentation/view/140/
> (Section 6.1.6.1)
>
> My PC runs Win98SE and has a 166MHz MMX
> Pentium processor with 96MB of RAM.
>
>
> Tor Olav
>
> [...]
Hello Tor Olav,
I get identical results and have a 450MHz MMX
PIII with 1 GB RAM.
I've tried some different things and I think if a function gives
0 as answer, the sum_function uses 1 instead, for:
#declare Fn = function(x) { sum(i, 1, 2, pow(x, 2)) }
with x =0: 2 instead of 0,
and sum(i,1,8,pow(x,2)) gives 8 as answer.
There may be wrong more things, but this is what I
discovered so far.
Jaap Frank
Post a reply to this message
|
|
|
|
"Jaap Frank" <jjf### [at] xs4allnl> wrote in news:3e1ee7c2$1@news.povray.org:
>
> "Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
> news:web.3e1e2ad581e209a5b417814a0@news.povray.org...
>>
>> If I have understood the documentation
>> for the new sum() and prod() functions
>> right, then POV-Ray v3.5 for Windows
>> behaves very oddly in some cases.
>>
>> I have observed two different beahiours:
>>
>> 1)
>> When I run some code with these
>> functions, POV-Ray just "hangs" and
>> does not finish parsing, even if the
>> calculations are very short. In this
>> state it does not react when I press
>> the Stop button.
>>
>> When I try to close it down, then it
>> says "POV-Ray is currently rendering -
>> do you want to stop ?".
>>
>> If I answer Yes, then POV-Ray closes
>> down as it should. If I answer No,
>> then POV-Ray just continues to "hang".
>>
>> The Pause button is working OK.
>>
>> 2)
>> When I run some other code with these
>> functions, POV-Ray finishes but
>> produces wrong results.
>>
>>
>> Can anyone confirm this behaviour ?
>>
>> I have inserted my test code below.
>>
>> The relevant documentation is here:
>> http://www.povray.org/documentation/view/140/
>> (Section 6.1.6.1)
>>
>> My PC runs Win98SE and has a 166MHz MMX
>> Pentium processor with 96MB of RAM.
>>
>>
>> Tor Olav
>>
>> [...]
>
> Hello Tor Olav,
>
> I get identical results and have a 450MHz MMX
> PIII with 1 GB RAM.
>
> I've tried some different things and I think if a function gives
> 0 as answer, the sum_function uses 1 instead, for:
>
> #declare Fn = function(x) { sum(i, 1, 2, pow(x, 2)) }
>
> with x =0: 2 instead of 0,
>
> and sum(i,1,8,pow(x,2)) gives 8 as answer.
>
> There may be wrong more things, but this is what I
> discovered so far.
Thank you for verifying this Jaap.
I'm not sure if this is the same
bug as the one described here:
http://news.povray.org/povray.bugreports/26015/
Can anyone tell if it is ?
And have some with a Mac or a
Linux PC tried the examples that
I posted ?
Tor Olav
Post a reply to this message
|
|