Results 1 to 2 of 2
  1. #1
    Join Date
    May 2012
    Posts
    16

    Unanswered: How to Oracle handle double values

    I have an SQL statement like this

    I have a code like this
    Code:
    select floor(10*trunc(to_binary_double(125.3),12)) from dual
    125.3 there becomes 125.300003 why is that?
    i tried to look for some explanation over the net and cant find any.
    Any help would be greatly appreciated

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I get different results
    Code:
    18:46:37 SQL> select floor(10*trunc(to_binary_double(125.3),12)) from dual;
    
    FLOOR(10*TRUNC(TO_BINARY_DOUBLE(125.3),12))
    -------------------------------------------
    				       1253
    
    20:32:46 SQL>
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •