converting a signed float into unsigned float

Discussion in 'Ruby' started by Dipesh Batheja, Nov 15, 2006.

  1. I know this is simple, but i am unable to find how to do this. I have an
    floating number and i want to convert it to unsigned floating number.
    What do i have t do.

    --
    Posted via http://www.ruby-forum.com/.
     
    Dipesh Batheja, Nov 15, 2006
    #1
    1. Advertising

  2. ----- Original Message -----
    From: "Dipesh Batheja" <>
    Newsgroups: comp.lang.ruby
    To: "ruby-talk ML" <>
    Sent: Wednesday, November 15, 2006 10:17 AM
    Subject: converting a signed float into unsigned float


    >I know this is simple, but i am unable to find how to do this. I have an
    > floating number and i want to convert it to unsigned floating number.
    > What do i have t do.
    >

    fl_num = -1.456
    fl_num = fl_num.abs
     
    Bernard Kenik, Nov 16, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. bd
    Replies:
    0
    Views:
    673
  2. MangoMan
    Replies:
    1
    Views:
    412
    Paul Rubin
    Oct 11, 2003
  3. Carsten Fuchs
    Replies:
    45
    Views:
    1,660
    James Kanze
    Oct 8, 2009
  4. Rob1bureau
    Replies:
    1
    Views:
    843
    joris
    Feb 27, 2010
  5. pozz
    Replies:
    12
    Views:
    796
    Tim Rentsch
    Mar 20, 2011
Loading...

Share This Page