From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Drake Subject: Re: [0][babel][R] Undesired conversion of integers to floats in R code block output Date: Sun, 19 Feb 2012 13:19:58 -0800 Message-ID: <4F41677E.6040407@gmail.com> References: <4F3D53D6.40407@gmail.com> <87boowrtyv.fsf@gmx.com> <4F409E93.5010800@gmail.com> <878vjyg466.fsf@gmx.com> <4F413412.5050108@gmail.com> <4F413F30.60302@gmail.com> <4F414D3D.5010602@gmail.com> <87ehtqeelk.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:57449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzEDO-0001hR-Qg for emacs-orgmode@gnu.org; Sun, 19 Feb 2012 16:22:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RzECv-0003fw-F0 for emacs-orgmode@gnu.org; Sun, 19 Feb 2012 16:22:38 -0500 Received: from mail-pw0-f41.google.com ([209.85.160.41]:48475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RzECv-0003fq-9Q for emacs-orgmode@gnu.org; Sun, 19 Feb 2012 16:22:09 -0500 Received: by pbcwz17 with SMTP id wz17so5919721pbc.0 for ; Sun, 19 Feb 2012 13:22:08 -0800 (PST) In-Reply-To: <87ehtqeelk.fsf@gmx.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: "emacs-orgmode@gnu.org" On Sun 19 Feb 2012 12:46:15 PM PST, Eric Schulte wrote: >> >> A further followup, at the risk of descending into minutia. The >> culprit seems to be the emacs function string-to-number. >> >> On my 32-bit Arch machine: >> (string-to-number "123456789"): 123456789 (#o726746425, #x75bcd15) >> (string-to-number "987654321"): 987654321.0 >> GNU Emacs 23.4.1 (i686-pc-linux-gnu, GTK+ Version 2.24.9) of >> 2012-02-01 on shirley.hoetzel.info >> >> On a 64-bit Ubuntu (11.10) machine: >> (string-to-number "123456789"): 123456789 (#o726746425, #x75bcd15) >> (string-to-number "987654321"): 987654321 (#o7267464261, #x3ade68b1) >> GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.5) of >> 2011-08-14 on allspice, modified by Debian >> > > Ah, nice debugging! > > That must be the issue, as I'm working on a 64-bit machine. > > Maybe one workaround could be to prefix the numbers with a letter in > R-land so that emacs interprets them as strings. > > Cheers, > Poking around the web I found that emacs guarantees 28 bits as a minimum precision. For a while I did as you suggested, prefixing all subjects ids with 'id'. But it's cleaner if I reinstall a 64-bit version of Arch. From your experiments, I already know its 64-bit version of emacs supports at least 30 bits. Thanks again for your help. Dan