unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* number->string of float with radix
@ 2002-10-14 10:55 Bill Schottstaedt
  2002-10-18 21:53 ` Marius Vollmer
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Schottstaedt @ 2002-10-14 10:55 UTC (permalink / raw)


guile> (number->string 5 2.0)
standard input:1:1: In procedure number->string in expression (number->string 5 2.0):
standard input:1:1: Wrong type argument in position 2 (expecting INUMP): 2.0
ABORT: (wrong-type-arg)

"INUMP" is internal jargon -- "integer" or "exact integer" would be better.


Also, I wonder about these kinds of calls:

guile> (number->string 10.5 2)
"10.5"

It's actually not senseless to have base-2 float notation ("1010.1", "a.8" hex),
but if Guile just returns base 10, maybe it should warn the caller?  Otherwise,
for example, string->number does not invert number->string:

guile> (string->number "10.5" 2)
#f


_______________________________________________
Bug-guile mailing list
Bug-guile@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-guile


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

end of thread, other threads:[~2002-10-20 21:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-14 10:55 number->string of float with radix Bill Schottstaedt
2002-10-18 21:53 ` Marius Vollmer
2002-10-20 10:44   ` Bill Schottstaedt
2002-10-20 21:41     ` Marius Vollmer

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).