From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] Util - Fixnum num_digits is wrong
Date: Sat, 08 Dec 2007 14:13:47 -0800 [thread overview]
Message-ID: <1197151959-sup-1679@south> (raw)
In-Reply-To: <20071203105210.GO1974@durance.shot.pl>
Excerpts from Shot (Piotr Szotkowski)'s message of Mon Dec 03 02:52:10 -0800 2007:
> Math.log and Float#/ returning Floats means the above approach is
> prone to the IEEE 754 representation inaccuracy.
>
> Wouldn?t the below make more sense?
>
> class Fixnum
> def num_digits base = 10
> to_s(base).size
> end
> end
Yes, but not as much as simply deleting the method. :)
--
William <wmorgan-sup at masanjin.net>
prev parent reply other threads:[~2007-12-08 22:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 8:25 Ian Taylor
2007-12-03 10:52 ` Shot (Piotr Szotkowski)
2007-12-08 22:13 ` William Morgan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1197151959-sup-1679@south \
--to=wmorgan-sup@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox