small dbbrowser bug

This forum is to report technical problems with Rel.
Post Reply
tjerkheijboer
Posts: 9
Joined: Thu Jun 10, 2010 12:12 pm

small dbbrowser bug

Post by tjerkheijboer »

Hi I think i found a bug in the enhanced mode of the DBbrowser

if you have the following:

TYPE POINT POSSREP {X RATIONAL, Y RATIONAL};

VAR P BASE RELATION {POINT POINT} KEY {POINT};
P := RELATION {
TUPLE { POINT POINT(0.0,0.0)},
TUPLE { POINT POINT(0.0,1.0)},
TUPLE { POINT POINT(1.0,0.0)},
TUPLE { POINT POINT(1.0,1.0)}
};

and then do the following query:
EXTEND ((P RENAME (POINT AS POINT2)) JOIN P)
ADD ((THE_Y(POINT2) - THE_Y(POINT)) / (THE_X(POINT2)-THE_X(POINT)) AS SLOPE)

the visualization of the resulting relation is ok in the normal mode:

EXTEND ((P RENAME (POINT AS POINT2)) JOIN P)
ADD ((THE_Y(POINT2) - THE_Y(POINT)) / (THE_X(POINT2)-THE_X(POINT)) AS A)
RELATION {POINT2 POINT, POINT POINT, A RATIONAL} {
TUPLE {POINT2 POINT(0.0, 0.0), POINT POINT(0.0, 0.0), A NaN},
TUPLE {POINT2 POINT(0.0, 0.0), POINT POINT(0.0, 1.0), A -Infinity},
TUPLE {POINT2 POINT(0.0, 0.0), POINT POINT(1.0, 0.0), A -0.0},
TUPLE {POINT2 POINT(0.0, 0.0), POINT POINT(1.0, 1.0), A 1.0},
TUPLE {POINT2 POINT(0.0, 1.0), POINT POINT(0.0, 0.0), A Infinity},
TUPLE {POINT2 POINT(0.0, 1.0), POINT POINT(0.0, 1.0), A NaN},
TUPLE {POINT2 POINT(0.0, 1.0), POINT POINT(1.0, 0.0), A -1.0},
TUPLE {POINT2 POINT(0.0, 1.0), POINT POINT(1.0, 1.0), A -0.0},
TUPLE {POINT2 POINT(1.0, 0.0), POINT POINT(0.0, 0.0), A 0.0},
TUPLE {POINT2 POINT(1.0, 0.0), POINT POINT(0.0, 1.0), A -1.0},
TUPLE {POINT2 POINT(1.0, 0.0), POINT POINT(1.0, 0.0), A NaN},
TUPLE {POINT2 POINT(1.0, 0.0), POINT POINT(1.0, 1.0), A -Infinity},
TUPLE {POINT2 POINT(1.0, 1.0), POINT POINT(0.0, 0.0), A 1.0},
TUPLE {POINT2 POINT(1.0, 1.0), POINT POINT(0.0, 1.0), A 0.0},
TUPLE {POINT2 POINT(1.0, 1.0), POINT POINT(1.0, 0.0), A Infinity},
TUPLE {POINT2 POINT(1.0, 1.0), POINT POINT(1.0, 1.0), A NaN}
}

but
wrong in the enhanced mode;

maybe its because of the infs and the nan's?

cheers

Tjerk
Attachments
enhanced.jpg
enhanced.jpg (207.63 KiB) Viewed 2826 times
Dave
Site Admin
Posts: 368
Joined: Sun Nov 27, 2005 7:19 pm

Re: small dbbrowser bug

Post by Dave »

Sure enough, it's the InfinityS and NaNs that do it. I'll fix this in the next update.
Post Reply