Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus/5.1299999999999999
@ 2012-03-05  8:59 Katsumi Yamaoka
  2012-03-10  0:33 ` Gnus/5.1299999999999999 Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Katsumi Yamaoka @ 2012-03-05  8:59 UTC (permalink / raw)
  To: ding

Hi,

Please see the User-Agent header of this article.  This seems due
to some math library of Cygwin that I recently updated into:

$ uname -a
CYGWIN_NT-5.1 localhost 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin

No difference is in Gnus v5.13 nor Emacs 23.3.  Only XEmacs is
sane.  What I can observe in Emacs's *scratch* buffer are:

5.13
 => 5.1299999999999999
(format "%s" 5.13)
 => "5.1299999999999999"

(format "%1.2f" 5.13)
 => "5.13"

This looks good at first, however it is spoiled by `string-to-number'
that `gnus-continuum-version' uses:

(string-to-number (format "%1.2f" 5.13))
 => 5.1299999999999999

Through some trial-and-errors, I concluded that there is no way
to express the floating number 5.130004 in this platform.  So,
I'm going to use this one hereafter:

(if (featurep 'emacs)
    (setq gnus-user-agent
	  (format "Gnus/5.13%04d %s Emacs/%s (%s)"
		  (round (* 10 (string-to-number gnus-version-number)))
		  gnus-version
		  (mapconcat 'identity
			     (nbutlast (split-string emacs-version "\\."))
			     ".")
		  system-configuration)))

Of course, what should be fixed is Cygwin, I believe.  Sigh.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-07-23  6:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-05  8:59 Gnus/5.1299999999999999 Katsumi Yamaoka
2012-03-10  0:33 ` Gnus/5.1299999999999999 Lars Magne Ingebrigtsen
2013-07-23  5:22   ` Gnus/5.1299999999999999 Katsumi Yamaoka
2013-07-23  6:09     ` Gnus/5.1299999999999999 Katsumi Yamaoka

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 NNTP newsgroup(s).