all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: handa@m17n.org, emacs-devel@gnu.org
Subject: Re: numeri
Date: Sat, 29 Nov 2008 19:01:22 +0000	[thread overview]
Message-ID: <49319182.7070400@harpegolden.net> (raw)
In-Reply-To: <uhc5qfkcd.fsf@gnu.org>

Eli Zaretskii wrote:


> 
> Actually, why not make the above return the number 4?  The Unicode
> Data File Format says that this property's value is ``an integer or
> rational number''.  We could even use 0.2 for characters such as
> "VULGAR FRACTION ONE FIFTH".  Isn't that better than `1/5'?
> 
> 

Bear in mind that 1/5 (0.2) isn't actually exactly representable by 
binary floating point, bit like the way 1/3 (0.333(3 recurring)) can't 
be written properly in decimal, so try in emacs lisp:

(format "%.20f" 0.2)

I'd tend to hold off on allowing the vulgar fractions to map to numbers 
without the programmer to do a conversion step and "own" the associated 
potential information loss - at least until there is no loss:  Emacs 
Lisp could one day get CL-like exact rational numbers I guess (though 
bignums would probably be a higher priority...)












  reply	other threads:[~2008-11-29 19:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-29 14:36 numeri Eli Zaretskii
2008-11-29 16:04 ` numeri Andreas Schwab
2008-11-29 17:22   ` numeri Eli Zaretskii
2008-11-29 17:39     ` numeri Andreas Schwab
2008-11-29 18:05       ` numeri Eli Zaretskii
2008-11-29 18:38         ` numeri Eli Zaretskii
2008-11-29 19:01           ` David De La Harpe Golden [this message]
2008-11-29 21:26             ` numeri Eli Zaretskii
2008-11-29 22:50           ` numeri Stefan Monnier
2008-12-01 12:09             ` numeri Kenichi Handa

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=49319182.7070400@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=handa@m17n.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.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.