Re: Getting a grip on nested intervals and matrix encoding
Date: Mon, 5 Jul 2010 13:38:22 -0700 (PDT)
Message-ID: <fe46ee69-c3ef-4423-a7b8-f8500ae930d6_at_w15g2000pro.googlegroups.com>
On Jul 5, 12:25 pm, Vadim Tropashko <vadim..._at_gmail.com> wrote:
> > SELECT 2 AS a11, 2 - MOD ( 3, 2 ) AS a12, 1 AS a21, 1 - MOD ( 2, 1 )
> select MOD(2,1) from dual;
Hello Vadim,
In MySql...
SELECT MOD ( 2, 1 );
MOD ( 2, 1 )
So MOD works OK.
My question was about the calculation of the last node in the ancestor
chain...
SELECT 2 AS a11, 2 - MOD ( 3, 2 ) AS a12, 1 AS a21, 1 - MOD ( 2, 1 )
AS a22;
a11 a12 a21 a22
SELECT 1 - MOD ( 2, 1 );
1 - MOD ( 2, 1 )
Since I want zero and not one for a22 of the root node I am assuming I
need to special case the root node in my loop.
> > AS a22;
>
> > a11 a12 a21 a22
> > 2 1 1 1
> MOD(2,1)
> ----------------------
> 0
0
2 1 1 1
1
I'm just looking for validation that my assumption is correct and that I haven't screwed up somewhere.
Thank you,
Toodle-loooooooooooooo.................
creecode Received on Mon Jul 05 2010 - 22:38:22 CEST