# Weird problem

**URL:** <https://www.ruby-forum.com/t/weird-problem/109587>\
**Category:** Rails\
**Created:** [July 17, 2007, 4:52am UTC](https://www.ruby-forum.com/t/weird-problem/109587 "2007-07-17T04:52:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dark-omen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Post date:** [July 17, 2007, 4:52am UTC](https://www.ruby-forum.com/t/weird-problem/109587/1 "2007-07-17T04:52:32Z")

</div>

Ok so I have an entry in the database that sets the discount of a  
product, and I have it as a decimal.  
Here is what I used when I created the table:

t.column :discount, :decimal, :precision =\> 3, :scale =\> 2, :default =\>  
0

However, when I create a new product and add the discount to like 10.0%  
it always comes out as 9.99. Does anyone know why it is doing this?
