unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludovic.courtes@laas.fr (Ludovic Courtès)
Cc: guile-devel@gnu.org
Subject: Re: Exposing `scm_i_mem2number ()'
Date: Thu, 16 Mar 2006 11:07:52 +0100	[thread overview]
Message-ID: <87hd5yzoqv.fsf@laas.fr> (raw)
In-Reply-To: <87u0a9xou6.fsf@laas.fr> (Ludovic Courtès's message of "Wed, 08 Mar 2006 10:33:53 +0100")

Hi,

About `scm_c_locale_string_to_number ()'...

ludovic.courtes@laas.fr (Ludovic Courtès) writes:

> While writing it, it occurred to me that R5RS does not make it clear
> whether `string->number' converts from a number's external
> representation or not.

As discussed in [0], while R5RS does not explicitly state that
`string->number' converts from a number's external representation, it
makes a connection with `number->string' which in turn explicitly
converts to a number's external representation:

  - procedure: number->string z
  - procedure: number->string z radix
      RADIX must be an exact integer, either 2, 8, 10, or 16.  If
      omitted, RADIX defaults to 10.  The procedure `number->string'
      takes a number and a radix and returns as a string an external
      representation of the given number in the given radix such that

      (let ((number NUMBER)
            (radix RADIX))
        (eqv? number
              (string->number (number->string number
                                              radix)
                              radix)))

      is true.  It is an error if no possible result makes this
      expression true.

So the additional bit of documentation I suggested in my previous post
(stating that `locale' in `scm_c_locale_string_to_number ()' has nothing
to do with the number representation) is acceptable.

Can someone comment on it or commit it?

Thanks,
Ludovic.

[0] http://groups.google.com/group/comp.lang.scheme/tree/browse_frm/thread/dc6a98bbc7cda398/7490c0724e5eb305?rnum=1&hl=eo&q=string-%3Enumber+group%3Acomp.lang.scheme&_done=%2Fgroup%2Fcomp.lang.scheme%2Fbrowse_frm%2Fthread%2Fdc6a98bbc7cda398%2F5de6eb2de0105bdb%3Flnk%3Dst%26q%3Dstring-%3Enumber+group%3Acomp.lang.scheme%26rnum%3D1%26hl%3Deo%26#doc_13b48a9567f63165


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2006-03-16 10:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-15 15:57 Exposing `scm_i_mem2number ()' Ludovic Courtès
2006-02-15 21:57 ` Marius Vollmer
2006-02-16 12:17   ` Tomas Zerolo
2006-02-16 13:35   ` Ludovic Courtès
2006-03-08  9:33     ` Ludovic Courtès
2006-03-16 10:07       ` Ludovic Courtès [this message]
2006-03-17  0:58         ` Kevin Ryde
2006-03-17  9:01           ` Ludovic Courtès
2006-03-21  0:53             ` Kevin Ryde
2006-02-15 22:11 ` Kevin Ryde

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.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=87hd5yzoqv.fsf@laas.fr \
    --to=ludovic.courtes@laas.fr \
    --cc=guile-devel@gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).