MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
floatstr() question
-
Date: Tue, 13 Feb 1996 12:26:43 PST
-
From: slayer@kaiwan.com
-
Content-Type: text/plain; charset="us-ascii"
Hm, if I type this:
;floatstr(1.0,50)
I get what the changelog said it would, a string truncated to the maximum
number of digits allowed (15).
=> "1.000000000000000"
[used 2 ticks, 0 seconds.]
but if I type this:
;floatstr(1.0,-50)
I get a string that can go over the maximum digits allowed:
=> "1.00000000000000000000000000000000000000000000000000"
[used 2 ticks, 0 seconds.]
The problem arises when I try some decimal part that goes over this limit:
;floatstr(1.9,-50)
=> "1.89999999999999991118215802998747676610946655273438"
[used 2 ticks, 0 seconds.]
should negative precision numbers be truncated like positive ones, left
alone, or cause an error? anyone want to try $minint for precision?
no sig, just me.
Follow-Ups:
Home |
Subject Index |
Thread Index