James Byrne wrote:
> 
> I cannot drop to floating point.  It has to be integer arithmetic.

Use BigDecimal (part of the standard library).  It does 
arbitrary-precision decimal arithmetic without the problems of floats. 
I think the syntax would be something like

(BigDecimal.new(1) / BigDecimal.new(trate)).to_s

But check the docs to be sure.  There's certainly no need to jump 
through the hoops you're going through right now.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to