Re: Weird

  • From: Tim Gorman <tim@xxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 15 Mar 2004 21:26:03 -0700

Whoops!  My meat-based decimal-to-hexadecimal translater must¹ve fried a
transistor (³64² decimal is ³0x40² hex, not ³0x08² hex).  They say it¹s the
second thing to go, anyway...<sigh>...

> SQL> col nbr format 999,999,999,990.00
> SQL> select utl_raw.cast_to_number(hextoraw('4066')) nbr from dual;
> 
>                 NBR
> -------------------
>              -0.000
> 

Well, that¹s not very illuminating...  :-(

...seems that it took until the 6th century AD for Arabic scholars to
discover the number ³0² and until the 21st century AD for Stephen Lee to
discover the new number named ³bleen² (i.e. negative zero).  I¹m told it
resides somewhere between 4 and 5...



on 3/15/04 9:10 PM, Tim Gorman at tim@xxxxxxxxxxxxx wrote:

> The "64" (i.e. hex 0x8) is the exponent, while the "102" (i.e. hex 0x66) is
> the significant digit in "base-100's complement" notation...
> 
> So, this is what it looks like...
> 
>> SQL> select utl_raw.cast_to_number(hextoraw('0866')) nbr from dual;
>> 
>> UTL_RAW.CAST_TO_NUMBER(HEXTORAW('0866'))
>> ----------------------------------------
>>                               -2.00E+108
> 
> Looks like a pretty small number, if I¹m reading it right...
> 
>> SQL> col nbr format
>> 999999999999999999999999999999999999999999999999999999999999999
>> SQL> select utl_raw.cast_to_number(hextoraw('0866')) nbr from dual;
>> 
>>                                                              NBR
>> ----------------------------------------------------------------
>> ################################################################
> 
> 
> 
> on 3/12/04 3:45 PM, Stephen.Lee@xxxxxxxx at Stephen.Lee@xxxxxxxx wrote:
> 
>> > 
>> > By the way, I think this is coming from a Cobol app.  So, I suppose there
>> > could be something squirrel-ly going on with the cobol library.  Is there
>> > some way I can try to cram in a chr(64) chr(102) directly from sqlplus?
>> > 
>>> >> -----Original Message-----
>>> >> I think I am in need of some enlightenment here.
>>> >> 
>>> >>        AMT N_DUMP
>>> >> ---------- ----------------------------------------
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >>       -.00 Typ=2 Len=2: 64,102
>>> >> 
>>>> >>> -----Original Message-----
>>>> >>> 
>>>> >>> Have you tried to dump the column? See the example below (due
>>>> >>> to my language settings the decimal point is showing up as a comma.)
>>>> >>> 
>>> >> ----------------------------------------------------------------
>>> >> Please see the official ORACLE-L FAQ: http://www.orafaq.com
>>> >> ----------------------------------------------------------------
>>> >> To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
>>> >> put 'unsubscribe' in the subject line.
>>> >> --
>>> >> Archives are at //www.freelists.org/archives/oracle-l/
>>> >> FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
>>> >> -----------------------------------------------------------------
>>> >> 
>> > ----------------------------------------------------------------
>> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
>> > ----------------------------------------------------------------
>> > To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
>> > put 'unsubscribe' in the subject line.
>> > --
>> > Archives are at //www.freelists.org/archives/oracle-l/
>> > FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
>> > -----------------------------------------------------------------
> 


Other related posts: