PL/SQL (MOSC)

MOSC Banner

Quite an unexpected result with binary_float...

edited Sep 12, 2015 3:17AM in PL/SQL (MOSC) 2 commentsAnswered ✓

DECLARE

    lc_number   NUMBER         := 0;

    lc_binfloat BINARY_FLOAT   := 0;

    lc_binint   BINARY_INTEGER := 0;

BEGIN

    DBMS_OUTPUT.PUT_LINE(SIGN(0));

    DBMS_OUTPUT.PUT_LINE(SIGN(lc_number));

    DBMS_OUTPUT.PUT_LINE(SIGN(lc_binfloat));

    DBMS_OUTPUT.PUT_LINE(SIGN(lc_binint));   

END;

Output on 11.2.0.4 (64 bit) and 10.2.0.1 (32 bit) on Windows:

0

0

1

0

Uhm..... I guess 0 is not really really zero, but lc_binfloat = 0 it's true.

Should I file a bug? How?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center