[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: Exact (LISP-ish) calculations in Ruby?
From: Gavin Sinclair <gsinclair () gmail ! com>
Date: 2009-11-19 9:20:17
Message-ID: 5131814b-0acd-4b5f-9cc4-f808518b4a61 () 2g2000prl ! googlegroups ! com
[Download RAW message or body]
On Nov 19, 1:08 pm, Ken Bloom <kbl...@gmail.com> wrote:
>
> Umm, there's a standard library for wiring in Rational:
>
> require 'mathn'
You've gotta love this...
$ irb
>> require 'mathn'
=> true
>> 3/4
=> 34
(It's just a printing "error".)
>> _.to_f
=> 0.75
That's Ruby 1.8.7.
--
Gavin Sinclair
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic