|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker wrote:
> It's worth noting that this is not a question for .general.
since it's a math question, but then again povray.new-users since it's a stupidly
simply one, or even povray.off-topic, but the experts like Ron aren't subscribed
declarations in 3.1g.
:-|
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In perl I get:
my $Calculator = 2^3*4^4;
print "$Calculator\n\n";
This prints 10
$Calculator = (2^3*4^4);
print "$Calculator\n\n";
This prints 10
$Calculator = (2^3)*(4^4);
print "$Calculator\n\n";
This prints 0
$Calculator = ((2^3)*(4^4));
print "$Calculator\n\n";
This prints 0
$Calculator = 2^(3*4)^4;
print "$Calculator\n\n";
This prints 10
--
Cheers
Steve email mailto:ste### [at] zeroppsuklinuxnet
%HAV-A-NICEDAY Error not enough coffee 0 pps.
web http://www.zeropps.uklinux.net/
or http://start.at/zero-pps
10:55pm up 50 days, 1:19, 2 users, load average: 1.08, 1.09, 1.03
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Steve wrote:
> In perl I get:
>
> my $Calculator = 2^3*4^4;
> print "$Calculator\n\n";
>
> This prints 10
> [snip]
Looks like you need to reread perlop. The caret (^) in Perl is the
bitwise exclusive or. Using ** will give you the expected answers.
HTH,
-Alex V.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" wrote:
>
> Ron Parker wrote:
>
> > It's worth noting that this is not a question for .general.
>
> Okeleeedoke. I expected a criticsm for not putting this in povray.advanced-users,
> since it's a math question, but then again povray.new-users since it's a stupidly
> simply one, or even povray.off-topic, but the experts like Ron aren't subscribed
> to that anymore, AND I didn't realize that the ^ was inoperative for general
> declarations in 3.1g.
Don't let it upset you too much. I think Ron is just having a bad hair day.
*BUT* he does bring up a valid point. Whenever an inconsistency arises
in one of the unofficial versions of the program they should indeed be
discussed in the unofficial patches group. That fact you were using
MegaPov when the problem occured should have been your first clue on
where to post the message. A good reason for this is when someone like
Ron, a member of the POV-Team, sees a question like this arise he may
be tempted to spend time looking at the source code for POV-Ray and try
to understand where the inconstancy lies. If he wastes his time looking
in the official source code, for problems that don't apply to it, he may
not be so generous next time trying to be of help. It is a matter of
courtesy to him, and the other Team members who monitor and maintain
these groups, to try to help keep them organized and on topic.
--
Ken Tyler
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Wed, 29 Nov 2000 19:41:21 -0800, Ken wrote:
>Don't let it upset you too much. I think Ron is just having a bad hair day.
Well, yes... annual performance reviews at work and all. The good news
is, I still have a job. :)
>Ron, a member of the POV-Team, sees a question like this arise he may
>be tempted to spend time looking at the source code for POV-Ray and try
>to understand where the inconstancy lies. If he wastes his time looking
And that's exactly what I did; I spent several minutes grepping for
HAT_TOKEN and not finding anything. It's just as well, though: the
new functionality has been merged into 3.5, so it needs to be fixed
there.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ron Parker wrote:
> >Ron, a member of the POV-Team, sees a question like this arise he may
> >be tempted to spend time looking at the source code for POV-Ray and try
> >to understand where the inconstancy lies. If he wastes his time looking
>
> And that's exactly what I did; I spent several minutes grepping for
> HAT_TOKEN and not finding anything. It's just as well, though: the
> new functionality has been merged into 3.5, so it needs to be fixed
> there.
Sorry mons.
I guess I thought the introduction of ^ was so cool and so necessary [as opposed
to pow(a,b)] that I forgot it wasn't in 3.1g.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Matt Giwer wrote:
> When in doubt use parenthesis. They rule.
I was going so wacky with parens that I was second-guessing myself and adding
2 or 3 extra pairs to every equation.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" wrote:
>
> It is interesting that when I do a #debug for a variable which I have
> declared as [ #declare angie=2^3*4^4;]
> povray tells me it is 1084576, when I paste this text (2^3*4^4) into
> Lotus1-2-3, the result is 2048.
Just out of curiosity if you know the answer is 2048 why don't you
just put 2048 in as your declared value ? Sure would make your
code more readable.
<duck>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Greg M. Johnson" wrote:
>
> Matt Giwer wrote:
>
> > When in doubt use parenthesis. They rule.
>
> I was going so wacky with parens that I was second-guessing myself and adding
> 2 or 3 extra pairs to every equation.
It is worth it to remove all doubt and certainly faster than working
through the evaluation hierarchy if it isn't second nature to you.
--
I would rather hide behind freedom of speech than
behind maudlin self-righteousness.
-- Cabell W. Johnson, 7
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ken <tyl### [at] pacbellnet> wrote:
: Just out of curiosity if you know the answer is 2048 why don't you
: just put 2048 in as your declared value ? Sure would make your
: code more readable.
Sometimes putting the result is less readable than putting the calculation
used to get the result.
For example, I bet that this:
sphere { <1,2,3>*.25, 10*.25 }
tells you more about what is happening than this:
sphere { <.25, .5, .75>, 2.5 }
--
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |