emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Drake <silophophe@gmail.com>
To: Eric Schulte <eric.schulte@gmx.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <4F41677E.6040407@gmail.com> (raw)
In-Reply-To: <87ehtqeelk.fsf@gmx.com>

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

  reply	other threads:[~2012-02-19 21:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-16 19:07 [0][babel][R] Undesired conversion of integers to floats in R code block output Daniel Drake
2012-02-18 16:23 ` Eric Schulte
2012-02-19  7:02   ` Daniel Drake
2012-02-19 16:48     ` Eric Schulte
2012-02-19 17:40       ` Daniel Drake
2012-02-19 18:28         ` Daniel Drake
2012-02-19 19:27           ` Daniel Drake
2012-02-19 20:46             ` Eric Schulte
2012-02-19 21:19               ` Daniel Drake [this message]
2012-02-19 21:35               ` Achim Gratz
2012-02-20 17:36                 ` Achim Gratz

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F41677E.6040407@gmail.com \
    --to=silophophe@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).