From: Axel Friedrich Date: 2012-12-10T23:15:34+09:00 Subject: Binary Fixed-Point in Ruby? (Improved FixedPt?) Hi, does anybody have/know of an alternative or improved version of FixedPt ("http://rubyforge.org/projects/fixedpt/)? FixedPt handels fixed-point binaries (not decimals). For example, this should work: fi = FixedPt.new(0.1,5,7) p fi.bin gives: "11111" but should give something like: "01100" and p fi.to_f gives: 0.2421875 but should give something like.: 0.1016 I run the ruby-version of FixedPoint (not the compiled version). I want to use it for checking the fixed-point formats of calculations done with hardware. http://en.wikipedia.org/wiki/Fixed-point_arithmetic Kind regards, Axel -- Posted via http://www.ruby-forum.com/.